Execute Script image\Script_Button_shg.gif (command)

Short Cut:

None

Menu(s):

Fileâ–ºCommand script

Applicability:

Input

Output

Utilities

gINT Levels:

All

 

Execute Script

To execute a command script, select the File:Command Script:Execute Script menu item or click on the Command Script image\Script_Button_shg.gif button and then Execute Script.

The following dialog will appear:

image\Exescrpt_shg.gif

When selecting the Execute Script command, the project file is specified with a full path within the script. If the file does not exist in the specified path, the program looks in the following additional places:

This should allow you to create a script on your system and have it run successfully on another system that has a different folder setup for gINT without modification.

To execute a command script you must first create a script. You can either create a script using a text editor or, a much simpler approach, use the Write Script command.

If you execute a script from Input, when the script is completed, control will return to Input.

 

EXECUTING A SCRIPT FROM OUTSIDE gINT

You can also run a command script from outside the program. This invokes the Execute Script run option. The Load Output Spec Only and Load Full Spec are only available using the Execute Script command from within the program.

 

Execute a script externally with one of the following methods:

  1. Windows command line

Start gINT with:

<gint program files path>\gint.exe /script=<script file name>

 

This can be done from the Start:Run in Windows 98, NT, Win2000 and Win XP.

For example:

"c:\program files\gintw\gint.exe" /script=c:\gintw\datatmpl\test.gsc

 

The quotes (") around the file name and path are required when there is a space in the path and or file name. If you only supply the script file name without a path, the program will first search the data template folder and then the gINT program folder.

  1. Script File Association

In any Windows file management utility (File Manager, Explorer, etc.), double clicking on a *.GSC file will run gINT and execute that script. For this to work, you must first associate the GSC extension to gINT.

  1. From another Windows Program

Another way to execute a command script is from another Windows program.

For example, you can have a GIS program that displays borehole locations on screen. The user selects a few and then specifies that he/she wants to view them. The GIS program code can then write the appropriate command script file (write "Preview" under "**Command") and then execute gINT with an appropriate command line. On completing the script while in this mode, gINT exits and returns control to the calling program.

As a GIS programmer, you can set up many options for the user to preview, print, and export to DXF, GDW, and BMP files (any type of output that gINT supports) using as many report forms as you wish.

See the documentation of the program from which you wish to call gINT for details on how to start from another Windows program.