Is there a way to search for only bolded words in the RTF?
Thanks
Marv









Is there a way to search for only bolded words in the RTF?
Thanks
Marv
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm






You can use the build in search and check with the conditions if the results are bold etc. or you write your own search engine through fast loops and check the format of every charakter (but as you should know this could take a long time).
This shouldn't be not too hard to figure out...









Thanks for your thoughts Gustav. I am using the built in search feature. The problem I am having is checking the results, if the word(s) are bolded.
Marv
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm









Well since this thread is 2,000 years old now, and I have been told it was simple to figure out, I sure would appreciate some help.
I am trying to redesign the MMF2 Tech Manual to make it easier to navigate for everyone.
How do you search an RTF for only bolded text using the standard search?
PS For anyone mentioning bringing up old threads, "may fleas from a 1,000 camels infest your arm pits".
Thanks,
Marv
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm







I'm not sure if this is at all possible. Are you creating the text within the rtf object at runtime?? if so you could use some sort of variable system to record the caret position when you bold a word. other than that i'm not sure.









Thanks for the response. RTF text is being loaded into an RTF Box at runtime.. Using an Edit Box for the search.
Marv
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm

Well, the RTF object has a condition "Character -> Is bold?", which checks if bold is turned on at the current caret position.
Wouldn't you able to use this and what's written the above (search first and then check if it's bold)?
If you can't change the caret position, an option would to copy the text into a 2nd rtf object.







I can confrim what Hernan is saying to be true. I have just quickly tested it and found that you can perform a search using this method.
I did it by using the following method
Button "Search" clicked
- find and select Text (Edit Box)
-Set Alterable value A of RTF object to 1
Alt val A of RTF=1
+Character is bold
-Set counter to 1
Alt val A of RTF=1
+ X(negated) Character is bold
-Set counter to 2









Thanks Hernan.
I found a solution and I will share:
I negated Character in RTF is Bold
>Find and Select Next
Marv
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm