Searching for text in an RTF Object Knowledge Object

You can use the Search RTF Object Knowledge Object to search for specific text in an RTF object that was created with the Create RTF Object Knowledge Object. See Creating an RTF Object Knowledge Object.

To search for text in an RTF Knowledge Object:

  1. Drag the Search RTF Object icon from the Knowledge Objects window to the flowline.

    If you have not saved your file, you will be prompted to do so. Click OK, then enter a filename.

    The Search RTF Object: Introduction screen is displayed.

  2. Click Next, or select ID.

    The Search RTF Object: ID screen is displayed.

  3. Enter the RTF object ID variable name you would like to search for. This was created when you used Create RTF Knowledge Object and identifies the RTF document.

    The RTF object ID variable name is identified by an equal sign at the beginning of your entry--for example, =MyVariable.

  4. Click Next, or select Text or Phrase.

    The Search RTF Object: Text or Phrase screen is displayed.

  5. Enter the text or phrase you would like to search for.

    You can enter a variable value by preceding the name of the variable with an equal sign--for example, =myVariable.

  6. Click Next, or select Start Position.

    The Search RTF Object: Start position screen is displayed.

  7. Enter the starting position in the RTF document for the text you would like to search for. This is the starting position if you counted the characters in an RTF document, where the position of the first character is 0. For example, the position of the second character is 1; the tenth character is at position 9.

    You can specify a variable value for the start position by putting an equal sign at the beginning of your entry--for example, =MyVariable.

  8. Click Next, or select Result.

    The Search RTF Object: Result screen is displayed.

  9. Enter a variable name for the search results. Precede the name with an equal sign--for example, =Results.

    This variable will hold the position of the text where it is found in the file. If the text does not exist in the indicated file, this variable returns the value -1.

  10. Click Next, or select Finish.

    If you have not previously created the variable, you will be prompted to do so. Click Yes.

    The Search RTF Object Knowledge Object is entered on the flowline.

You must distribute RTFObj.u32 with your piece. This Knowledge Object copies this file to same location as your piece.


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/authorware/7/using_aw_en/05_wor75.htm