User Tag List

Results 1 to 4 of 4

Thread: RTF Trouble

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Location
    land, Australia (A.T.M)
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RTF Trouble

    I was wondering how to search for a particular string and colourize it, it sounded easy but I can't seem to do it... I'm not to familiar with RTF Codes or anything so I dunno..

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Sweden, Lund
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RTF Trouble

    Are you familiar with loops?
    You can loop through the text looking for the string...

    -Start loop "search" GetNChars( "Rich Edit Object" ) times

    -On loop "search"
    -GetText$( "Rich Edit Object", LoopIndex("search"), LoopIndex("search")+Len( <string> )) = <string>
    +Select characters from LoopIndex("search") to LoopIndex("search")+Len( <string> )
    +Set font colour to <color>
    +Deselect block

    Where <string> can be text from an edit box or whatever.
    There are a few tricks that can improve the search time if needed.

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Location
    land, Australia (A.T.M)
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RTF Trouble

    Hey man thanks, I figured loops but I don't use them that often. :P

  4. #4
    No Products Registered

    Join Date
    Jul 2006
    Location
    Sweden, Lund
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: RTF Trouble

    No problem!
    You might need to set the caret position at the end of the loop, I think it gets placed at the selection.

Similar Threads

  1. Trouble Using ini
    By Godspeed8118 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 9th January 2013, 11:22 AM
  2. Box 2D trouble
    By Kalis in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 26th June 2011, 10:23 AM
  3. More trouble!
    By FlinkGigitty in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 7th March 2010, 08:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •