ILWIS objects

 

Scripts    

 

 

Scripts are used to perform a sequenced list of ILWIS commands and expressions. By creating a script, you can build a complete GIS or Remote Sensing analysis for your own research discipline. Scripts are more or less equivalent to batch files in ILWIS version 1.4.

Lines in a script may contain commands for object management (e.g. copy or delete), display of data objects (open or Show), and for the creation and calculation of data objects. All MapCalc, and TabCalc formulas, and all ILWIS expressions to perform operations may be used. Other scripts and other Windows applications can also be called from within a script. A script can use parameters. For more information on valid script expressions, refer to Appendices : ILWIS commands, Appendices : ILWIS expressions or Appendices : ILWIS script language (syntax). For more information on using parameters in scripts, see How to use parameters in scripts.

Names of scripts:

In ILWIS 3, object names comply with Windows long file names. Also Universal Naming Convention (UNC) paths are supported. For more information, see How to use long object names.

To create a script:

The Script editor appears in which you can type your script expressions.

To edit a script:

The Script editor appears.

Tips:

Using parameters in scripts:

Parameters in a script replace (parts of) object names, operations, etc. Parameters in scripts work as DOS replaceable parameters in DOS batch files, and must be written on the Script tab in the Script editor as %1, %2, %3, up to %9. For more information, see How to use parameters in scripts

 

To run a script:

If your script does not contain any parameters it will immediately be executed. If your script does contain parameters the Run Script dialog box will appear.

In the Run Script dialog box, all parameter names are listed as specified on the Parameters tab of the script editor.

When the OK button is clicked and when all parameters are correctly specified, the script will be executed.

For more information about running script, e.g. to run a script from the command line see How to run scripts.

You can create your own Help file for a script so that you can explain the meaning of parameters to other users of the script. For more information, see the Run Script dialog box.

Example:

In How to use parameters in scripts, two script examples are given. A more elaborate example of a script to create slope maps in percentages and in degrees is presented in Map & Table calculation : creating and running scripts.

Technical information:

A script consists of an ASCII object definition file (.ISL, ILWIS Script Language) and an ASCII data file (.ISF, ILWIS Script File).

See also: