AutoPlay Media Studio 9

RichText.FindText

RichText.FindText

This is the first topic This is the last topic  

RichText.FindText

This is the first topic This is the last topic  

OverviewExamples

table RichText.FindText (

string ObjectName,

string SearchFor,

number Start = 1,

number End = -1,

boolean CaseSensitive = false,

boolean WholeWord = false )

Example 1

-- Search for the text "apple".

tbSearchResult = RichText.FindText("RichText1", "apple", 1, -1, false, false);

 

if (tbSearchResult) then

   strMessage = "Apple was found starting at position "..tbSearchResult.Start;

   strMessage = strMessage.." and ending at position "..tbSearchResult.End;

   Dialog.Message("Search Result", strMessage);

else

   Dialog.Message("Search Results", "Apple was not found in the search.");

end

Searches the entire text in the richtext object named "RichText1" for the text "apple" and shows the indexes where it was found in a dialog message. If it was not found, a notification message is also shown.

See also: Related Actions


Learn More: Indigo Rose Software - AutoPlay Media Studio - Buy Now - Contact Us