FindText()

Syntax:

textObject.FindText( String, StartPosition, CaseSensitive )

Return:

The Index position of the first character in the parameter String if it is found and the value -1 if it is not found.

Parameters:

String - a string to find within a Text object. String can be any string surrounded by quote marks or a variable name containing a string. This pararemeter is required.

StartPosition – the Index position to start the search at. StartPosition is a zero-based index. This parameter is optional and the default is to start at index number 0.

CaseSensitive – sets whether the search will take account of the case of the text to match uppercase and lowercase. The options are true or false. This parameter is optional and the default is false.

Remarks:

This function allows you to find a character, word or phrase within a Text object. You can start the search from the beginning of the text or at any point within the text. If used with a while loop you can find the number of occurrences of the string within the text.

image\Script_Button.jpgExamples