Using your functions

You use user-defined functions the same way you use built-in functions. You can call them in event scripts or in other user-defined functions.

For more information about calling functions, see the Resource Guide.

Pasting user-defined functions

When you build a script in the Script view, you can type the call to the user-defined function. You can also paste the function into the script. There are several ways to paste a user-defined function into a script:

Using the System Tree, AutoScript, or the Browser pastes the function’s prototype arguments as well as its name into the script.

For more information about AutoScript, see “Using AutoScript”.

StepsTo paste a user-defined function into a script from the Browser:

  1. Select Tools>Browser from the menu bar.

  2. Do one of the following:

  3. Double-click the Functions category in the right pane.

  4. Select the function you want to paste and select Copy from its pop-up menu.

  5. In the Script view, move the insertion point to where you want to paste the function and select Paste from the pop-up menu.

    The function and its prototype parameters display at the insertion point in your script.

  6. Specify the required arguments.