Description
AutoScript provides help when you are coding scripts by displaying a list of possible completions for the statement you are typing. The list can include variables, controls, events, functions, and properties.
Usage
To turn AutoScript on, select Design>Options from the menu bar in any painter that has a Script view, select the AutoScript property page, and check the elements you want to display.
When AutoScript is on, a listbox displays when you pause as you enter code in the Script view. The list includes all syntax elements you selected on the AutoScript property page that it is syntactically correct to paste into the script at the cursor. The first item that matches any letters you've already typed is highlighted.
Double-click to paste an item from the list into the script or click outside the popup window to dismiss it. If you had started typing a word, the item you select from the list replaces the word. A word is delimited by white space, a period, or a parenthesis.
Pasting functions The list displays function names with their arguments. Each version of an overloaded function displays on a separate line. When you select a function from the list, AutoScript pastes the function prototype into the script.
Example
Create a new window and place on it a MultiLineEdit and a CommandButton control. Check all except the last item on the AutoScript property page and then pause after typing the letters
ml into the clicked event script for the command button.
The listbox that displays includes all functions and properties that apply to the command button, the variables that are in scope, and the names of the controls that have been placed on the same window. The default name for the MultiLineEdit control (mle_1), is highlighted.
Double-click the name of the MultiLineEdit control to paste it into the script and add a period:
mle_1.
The listbox that displays includes all functions and properties that apply to MultiLineEdit controls.
See also
Writing scripts Declaring variables and external functions Defining functions Defining user events
|