In this article
The Syntax Highlighter automatically color-codes key words, and provides lists of selectable options under specific conditions while you are scripting to assist you with completing your code. This means that while scripting you no longer need to remember the functions, or look up which properties belong to which classes and which parameters the various methods accept.
To use the code completion functionality:
- Start typing into the scripting area the function you wish to use.
- Click on the function you wish to use to add it to the script field.
A drop-down list of the possible functions that include the characters you have typed, is presented, the first item in the list being highlighted.
Figure 1 - Example of the code completion functionality
Or
- Use the Up and Down arrow keys on your keyboard to move the highlight through the list.
- Click the Information icon
for an item or press the Ctrl+Space keys on your keyboard while the item is highlighted, to open a pop-up with more information.
- Once you have selected a function, you can hover the mouse pointer over it to display the possible options.
- To open a complete list of all the available functions, press Ctrl+Space without first typing anything into the scripting area.
- As you type further characters into the field, the options available are presented. In the example below - a ( character has been typed after the f. The corresponding required ) character is then added automatically and the cursor is positioned between the two ready for your next entry.
- Continue typing the script, in this case a " character. Again, the required second " character is added automatically.
- Add in this case the qid, and then the point . character on the end.
While you move through the list, addition information may be presented.
Figure 2 - Additional information
Figure 3 - The Information icon opens a help pop-up
Figure 4 - The options relevant to the selected item
You can now drag the scroll-handle on the right edge of the list, or use the Up and Down arrow keys on your keyboard, to move through the list and select the function you wish to use.
Tip!
Note that Ctrl+Space will open a list of the relevant functions at the cursor at any time, so you can get assistance while editing the script later.
Figure 5 - The complete list of functions
Figure 6 - The ( and ) characters are added
Figure 7 - The two " characters are added
When you add the point character, a list of the methods available for f() is presented.
Figure 8 - The list of the methods available for f()
Continue building the script as required.