Find methods

The Find interface supports one method, Execute.

Execute([strFind], [strReplace], [strFindIn], [boolMatchCase=false], [boolMatchWholeWords=false], [boolMatchPatterns=false], [boolForward=true], [boolWrap=true], [intFindReplaceAction=0], [boolSetFindDialogOptions=false])  
Returns  Boolean 
Description  Indicates whether the search was successful, and moves the selection to the found text.
  • strFind - The string or pattern to locate
  • strReplace - The string to replace strFind with
  • strFindIn - Restrict the operation to strFindIn elements. strFindIn can be an element name with or without tag delimiters
  • boolMatchCase - match the case when searching
  • boolMatchWholeWords - match whole words
  • boolMatchPatterns - interpret pattern matching characters
  • boolForward - search forward
  • boolWrap - search wraps past the end of the document
  • intFindReplaceAction - Type of find/replace action to perform. The possible values are
    • 0: Find (default)
    • 1: Replace
    • 2: Replace, then Find
    • 3: Replace All
  • boolSetFindDialogOptions - in addition to performing the find/replace, also initialize the HoTMetaL PRO Find dialog fields with the values specified with the other arguments.
 
Usage 
JScript 
Selection_object.Find.Execute(["strFind"], ["strReplace"],
["strConstraintString"], [boolMatchCase=false],
[boolMatchWholeWords=false], [boolMatchPatterns=false],
[boolForward=true], [boolWrap=true], 
[intFindReplaceAction=1], [boolSetFindDialogOptions=false]);
 
VBScript 
Selection_object.Find.Execute(["strFind"], ["strReplace"],
["strConstraintString"], [boolMatchCase=false],
[boolMatchWholeWords=false], [boolMatchPatterns=false], 
[boolForward=true], [boolWrap=true], 
[intFindReplaceAction=1], [boolSetFindDialogOptions=false])
 
Example 
// SoftQuad Script Language JSCRIPT: 
// find the next occurrence of "hello" in a "PARA" element
Selection.Find.Execute("hello","","PARA"); 
 


Right arrow
Next Topic
Left arrow
Previous Topic
Table of contents
Table of Contents

Copyright © SoftQuad Software Inc. 1999