7.0

Table Of Contents
The first matching string is highlighted in the script.
4. To find the next matching string, choose Search | Find Again or pressing F3.
Related topics:
Use the Editor (Page 222)
Import and Export Scripts (Page 222)
Find and Replace Strings in a Script (Page 224)
Go to a Line in a Script (Page 225)
Change the Editor Language (Page 225)
Toggle Bookmarks (Page 226)
Jump to Bookmarks (Page 226)
Use Functions created for PlanetPress Watch/Server in Scripts (Page 227)
12.1.4 Find and Replace Strings in a Script
The Replace With dialog box lets you search for and replace text strings in the editor. The available options
help you limit the search, making replacements quicker and easier.
To find and replace strings in a script:
1. Choose Search | Replace, or press CTRL+R.
The Replace With dialog box appears. The last used strings are displayed in the Text to find and
Replace with boxes.
2. Set the replacement settings and options.
Text to find: Enter a new search string or select a previous search from the drop-down list.
Replace with: Enter the string that will replace the string displayed in the Text to find box.
Case sensitive: Select to limit the search to instances of text with the same case as the text in the
Text to find box.
Whole words only: Select to limit the search to complete words that match the text in the Text to find
box. Whole words are defined as strings that have a space or punctuation before and after the word.
Regular expressions: Select to treat the regular expressions of the scripting language as text. If you
clear this option, the regular expressions of the language are blocked from the search.
Prompt on replace: Select to have PlanetPress Watch/Server display a prompt before it replaces text.
When you use the Replace All function, you are prompted each time matching text is found. The prompt
includes an All button for replacing all matching text. This suppresses any further prompting.
Global: Select to search the entire content of the script.
Selected text: Select to find matching text only within a text block you select. The text must be
selected before you run the search.
Forward: Select to search the script forward, from the location of the cursor or from the beginning of
the script, depending on what you choose as the origin (From cursor begins where the cursor is
currently located in the script, Entire scope begins from the beginning of the script or beginning of script
selection). If you limit the scope to selected text, you move forward only within the selection. When the
search reaches the end of the script or script selection, the search finishes. It does not loop back to the
beginning.
Backward: Select to search the script backward, from the location of the cursor or from the end of the
script, depending on what you choose for the origin (From cursor begins where the cursor is currently
located in the script, Entire scope begins from the beginning of the script or beginning of script
selection). If you limit the scope to selected text, you move backward only within the script selection.
When the search reaches the beginning of the script or script selection, the search finishes. It does not
loop back to the beginning.
From cursor: Select to start the search from the position of the cursor.
Entire scope: Select to search either the entire script, or a script selection. The scope corresponds to a
script selection if you make a selection before executing the Find.
3. Do one of the following:
Click OK to replace the first string encountered. If you selected Prompt on replace, a dialog box
opens to ask you whether to proceed with the replacement. You can OK to replace the first string
only, or you can click All to replace that string as well as every other string that matches the
replacement settings.
Using Scripts - Detailed Directions
Objectif Lune Inc. © 2009 224