BASIC Script

Runs an embedded or external BASIC script or creates a user defined function which may be called in subsequent expressions or BASIC scripts. BASIC scripting can be used for advanced flow, COM objects, API calls and the creation of custom dialog boxes.

This action includes a BASIC Script IDE which is an Interactive Design Environment used for developing, examining, testing and executing BASIC scripts. To access the BASIC Script IDE, click Edit Script located in the BASIC Script action's General tab properties.

AWE's built-in AML language is easy to use, includes drag-and-drop functionality and very robust, however there may be occasions when it is necessary to use BASIC scripting to access advanced objects or increase execution time. This action is ideal for such occasions.

Declaration

<AMSCRIPT FILENAME="text"></AMSCRIPT> OR <AMSCRIPT>Script text</AMSCRIPT>

Example

<AMSCRIPT FILENAME="C:\Logs\Macro.bas"></AMSCRIPT>

- or -

<AMSCRIPT>Sub Main MsgBox(&quot;Hi&quot;)End Sub </AMSCRIPT>

 

To enter Basic Script properties:

  1. In the Available Actions pane, expand the Advanced folder and double-click the 'Basic Script' action or drag this action onto the Steps pane.

  1. In the Location of script parameter of the General tab, select one of the following drop-down options then enter the applicable properties:

  2. To set the Description tab properties, refer to Description Tab Options.

  3. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  4. When finished, click OK to save settings and close the properties dialog box.

See Also

Introduction to Scripting, BASIC_Script_IDE, Execute DLL, Run, Create Array, Create Variable

General Tab

Property

Type

Required

Default

Markup

Description

Location of script

Text

Yes

(Empty)

FILENAME=

"C:\Temp\myScript.bas"

Specifies where the script is located. The available options are:

  • Script is embedded in task file

  • Script is located in an external file.

Click the Folder icon to navigate to the desired external .BAS file or manually enter the full path and filename of the.BAS file in the provided text-box.

Click Edit Script to access the BASIC Script IDE, an Interactive Design Environment used for developing, examining and testing BASIC scripts.

Description Tab

The Description tab allows you to customize the text description of any step when it appears in the Steps Pane.

More on setting custom step description

Error Causes Tab

The Error Causes tab properties are part of AWE's Error Handling functionality which allows you to instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More about error causes properties

On Error Tab

The On Error tab properties are part of AWE's Error Handling functionality which allows you to determine what a task should do if a particular step encounters an error.

More about On Error properties

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, % Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables

More on expressions

More on the expression builder

See Also

About Actions

BASIC Scripts and Custom Functions

Introduction to Scripting