Script View Context Menu
The Script view of the Screen pane contains a scripting environment where you can create or edit screen content. In this environment you can write script, add and remove references, and introduce custom elements to further refine the objects in your screens. Supported script languages are C# and VB.NET. The Script view has a context menu and a toolbar, which contains options to validate script and manage assemblies for the currently selected screen.
Context Menu Options
The script view provides additional functionality through its right-click context menu:
| Option | Description | Keyboard Shortcut |
|---|---|---|
|
Cut |
Removes the selected text and places it on the clipboard. |
Ctrl+X |
|
Copy |
Copies the selected text and places it on the clipboard. |
Ctrl+C |
|
Paste |
Inserts the contents of the clipboard at the current location. |
Ctrl+V |
|
Find |
Opens the Find and Replace dialog box, with the Find tab in focus. See Find and Bookmark Text in Script below. |
Ctrl+F |
|
Replace |
Opens the Find and Replace dialog box, with the Replace tab in focus. See Find and Replace Text in Script below. |
Ctrl+H |
|
Make editable |
Converts a read-only portion of script to make it editable. It is recommended that you do not edit these portions without a compelling reason to do so. If deemed necessary to make it editable, you can do so - but be aware that it cannot be undone. Knowing this, to remove the read-only protections, right-click the gray script area to access the context-menu options, and then click Make editable. It will remain editable from that point forward. |
|
Find and Bookmark Text in Script
Right-click and select Find (or type Ctrl+F) in the script view to open the Find and Replace dialog box, with the Find tab in focus.
- When you first open the dialog box, the Find what field is automatically populated, based on the text selected in the script, or the text where the cursor is resting. If not, simply type text or click the down arrow and select a recent search term.
- Indicate where to look for the string, by selecting one from the following drop-down menu items:
- From cursor — Search from the current cursor location down
- Entire scope — Search within the entire screen
- Selection Only — Search only within the selected text
- Select from the following Find Options to narrow the search:
- Match case — Finds only occurrences of the text that match the case (for example, uppercase, lowercase) of the text entered in the Find what field
- Match whole word — Look for only whole words
- Search up — Search up from the cursor position
- Search hidden text — Include any hidden text in the search
- Use regular expressions — Regular expressions (also referred to as regex or regexp) are like wildcards in that they let you find matching strings of text. However, they are more powerful than wildcards. For more information about using Backreferences to match text, refer to Regular-Expressions.info.
- Prompt on replace — Prompt to confirm each replacement
- Click Find Next to jump to the next occurrence of the string.
- Click Bookmark All to place a bookmark at the line where the found string occurs.
Find and Replace Text in Script
Right-click and select Replace (or type Ctrl+H) in the script view to open the Find and Replace dialog box, with the Replace tab in focus.
- When you first open the dialog box, the Find what field is automatically populated, based on the text selected in the script, or the text where the cursor is resting. If not, simply type text or click the down arrow and select a recent search term.
- Type the replacement text or click the down arrow and select a recent term.
- Indicate where to look for the string, by selecting one from the following drop-down menu items:
- From cursor — Search from the current cursor location down
- Entire scope — Search within the entire screen
- Selection Only — Search only within the selected text
- Select from the Find Options to narrow the search (see description above).
- Click Find Next to jump to the next occurrence of the string.
- Click Replace to replace the current occurrence of the found string.
- Click Replace All to replace all occurrences of the found string.
