Utilities | Scripting

Top  Previous  Next

The GAMSIDE has a very simple scripting facility. A script can be created by entering commands in a text file or by recording a script.

 

Start recording

After selecting a file for the script file, simple file commands will be written to the script file. Commands such as file open file close, run and compile allow these commands to be played back later.

 

Stop recording

Stop recording script commands

 

Play script

Execute the commands stored in the selected script file.

 

Available script commands

 

Command

Argument1

Argument2

Notes

FileOpen

<filename>



ViewClose

<filename>


Close file only when displayed in viewer

FileClose

<filename>



FileSave

<filename>



FileSaveAll




FileCompile

<filename>

<parameters>


FileRun

<filename>

<parameters>


FileWait

<filename>


Wait for compile/run to finish

Message

<text>


Display a message box

 

Example:

 

The following example shows a run of the trnsport.gms mode. The file was recorded and later edited to add the message command.

 

*GAMSIDE script V1

fileopen;%ProjDir%trnsport.gms;

filerun;%ProjDir%trnsport.gms; gdx=trnsport

filewait;%ProjDir%trnsport.gms;

fileopen;%ProjDir%trnsport.lst;

fileopen;%ProjDir%trnsport.gdx;

message;The example is finished