Action Editor

Autocomplete

Autocomplete is the action 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 action editor, a black tooltip will appear nearby with the word on it. This is the action editor's autocomplete feature at work. Whenever you type something that the action 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.

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 System, the action 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 "System." 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 action 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 variables and files, it's 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:

Variable...

Opens the Insert Variable dialog where you can select a session variable or global variable you want to insert into the code window.

File Path...

Opens a file browse dialog where you can select a file from your system whose full path you want to insert.

Folder Path...

Opens a folder browse dialog where you can select a folder from your system whose path you want to insert.

File Reference...

Opens the Insert File Reference dialog where you can insert a reference to a file in your project. This path references the location your file will be installed to, or where it exists during the install.

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.

Syntax Check

Often when developing, silly errors can be made when writing code. This option allows you to check to make sure your action script is syntactically correct on the current action event. This feature can also be found on the Advanced button of the action editor.

Note: It does not check for logical or other programming errors, simply syntax.

Action Properties

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