exec32 Scripting Language


The Script Pane

Press F6 to access the Script Pane.

Opening a Script

Open a script (files with the extension of ".e") by selecting it in the file navigator, and double-clicking (or press ENTER). The script is opened, and read in as the current script. From this point, you may:

Once a script is opened, it is possible to run another script, perhaps from the Script pull-down menu, or from a hypertext link. Doing so will reload the first script after second script has run.

A screenshot of the exec32 scrip pane, one of several views (or panes) available

The Default Script

A script will always be open. "default.e" will be loaded as the default script when you start exec32. You can use it for quick and dirties. Your "default.e" script will be displayed when you enter the Script Pane. If you open another script and wish to return to the default.e, you can do so by selecting Open Default Script from the File pull-down menu.

Edit Your Script

You can edit the current script by clicking the Edit Script button, or by using the F7 hotkey. This will load the script into your favorite editor. That way, you get syntax color highlighting, macros, etc. - features of your editor. Save your code before trying to check the syntax or run the code.

Preprocessor / Include Files

exec32 includes a preprocessor that merges in include files into your script. The include file should contain subs or functions that can be called from your script. An include should not contain a sub main(). Includes extend the functionality of the script language, and help you reuse code.

Your script and includes are processed into "exec32.e", written to the exec32 installation directory, before interpreted by the script engine.

To specify an include file, use this syntax:

#include lib.bas

Where lib.bas is a script file that contains procedure that resides in your C:\Program Files\Rsc\exec32\include directory. You can specify some other include directory by editing the exec32.ini file.

Syntax Check

Perform a syntax check on the script by clicking the Syntax Check button, or by using the F8 hotkey. This will load the script (and any include files) into the scripting engine, and parse out the procedures, displaying them in the Procedures list box. If an error occurs, the line and column, and the offending line will be displayed in a message box. If you are using include files, the script preprocessor will merge in include files prior to loading the script into the scripting engine. Thus the offending line number might be offset by include test. You may wish to load exec32.e into your text editor to locate the line number.

Running Your Script

Run the script's main procedure by pressing F9. You can run any other procedure by clicking the procedure name from the Procedures list box. Here are a few more ways to run scripts:

Opening Another Script

To open some other script, go to the file browser (press ESC), and navigate to the directory where your scripts reside, select the desired script, and press ENTER or CTRL-O, or double-click it. That will not run the script, but will instead open it in exec32's Script Pane.

Creating a New Script

To create a new script, go to the navigator (press ESC), and go to the directory where you would like to save the script. Right-click in the files display, and select New File, or press CTRL-N, or select New File from the Edit pull-down menu. Enter the name of the new script. A script will be created in the directory with a header and main() procedure already entered for you.

' -----------------------------------------------------------
' Script     :
' Description:
' Date       : 03-03-2001
' Author     : rps
' Changes    :
' -----------------------------------------------------------

sub main()
dim r, tmp

end sub
You can save it as another name by selecting Save As from the File pull-down menu.

Trace Logging

You can turn on trace logging by selecting Trace Log from the Script pull-down menu, or by using the trace function. To view the trace log, select View the Log from the Script pull-down menu.

Back...