Script Editor

Autocomplete

Autocomplete is the script editor's ability to automatically complete keywords for you when you press Tab.

As you type the first few letters of a keyword into the script editor, a black tooltip will appear nearby with the word on it. This is the script editor's autocomplete feature at work. Whenever you type something that the script editor recognizes as a keyword, it will display its best guess at what you are typing in one of those little black tooltips. Whenever one of those little black tooltips is visible, you can press the Tab key to automatically type the rest of the word. Or, if you prefer, just keep on typing!

Autocomplete Dropdown

Another feature of the autocomplete is the ability to display a dropdown of options that can be automatically completed.

If you press Ctrl + Space while your cursor is in the code window, a drop-down list will be displayed containing the names of all of the actions, constants and global variables. You can choose one of list items and then press Tab or Enter to automatically type it out for you.

Note: This dropdown cannot be accessed if your cursor is inside a set of quotes (a string).

The autocomplete dropdown is also available for completing action names after the category has been typed. For example, when you type a period after the word Video, the script editor recognizes what you've typed as the beginning of an action name, and presents you with a drop-down list of all the actions that begin with "Video." If you like, you can choose one of the actions from that list and then press either Tab or Enter to automatically type that word out for you. You don't have to use the drop-down list, though...you can continue typing the rest of the action yourself if you want.

Tip: Once you've typed something that the script editor recognizes as the name of an action, a little bit of Quick Help appears near the bottom of the window listing the names of the action's parameters and indicating what type of value is expected for each one.

Right-Click Insert

If your project contains many different objects, pages and files, its often difficult to remember the exact name or spelling that was used. The following options are available when right clicking in the code window and selecting Insert:

Object Reference

Displays a list of all of the object names that can be accessed on that page. You can highlight the object name and click OK (or double-click the object name) to automatically type it in the code window at the current cursor position.

Page/Dialog Reference

Displays a list of all of the page and dialog names in your project. You can highlight the page or dialog name and click OK (or double-click the page/dialog name) to automatically type it in the code window at the current cursor position.

File Reference

Opens the Select File dialog where you can browse for a file you want to reference. The selected file will be added to your project's resources (if not already),  and its file path will automatically be typed in the code window at the current cursor position.

Menu Handler...

Opens an Insert dialog where you can select the menu ID item you would like to reference.

Right-Click Property Tables

If you use the Get/SetProperties actions for objects, this will allow you to easily create a table template containing all of the available properties for the selected object.

Search and Replace

Sometimes its useful to be able to search for specific text in the code window and replace it if needed. The following options are available when you right-click in the code window and select Advanced:

Find

Opens a Find dialog where you can specify a string of text you would like to search for in the code window.

Note: The Mark All option of the Find requires the "Show left margin" setting to be enabled in order to display the locations the string was found. You can find the "Show left margin" option on the Misc tab of the Editor Settings.

Replace

Opens the Find & Replace dialog where you can specify the string of text you would like to search for in the code window and the string you would like to replace it with.

Action Properties

Once an action has been added to the code window, you can double-click it to show it's properties in the Action Properties dialog. This feature can be enabled or disabled by clicking the Advanced button on the script editor.