0% found this document useful (0 votes)
20 views

Target Scripts

This document provides an introduction to using scripts in Target to automate tasks. Scripts allow users to record a series of actions and replay them automatically. Typical uses of scripts include automating repetitive tasks, creating standard map layouts, running Target functions from the command line, and processing large amounts of data overnight. The document describes how to create, view, and run scripts in Target. It also provides an example script that records adding a line path and profiles to a map.

Uploaded by

orange breccia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Target Scripts

This document provides an introduction to using scripts in Target to automate tasks. Scripts allow users to record a series of actions and replay them automatically. Typical uses of scripts include automating repetitive tasks, creating standard map layouts, running Target functions from the command line, and processing large amounts of data overnight. The document describes how to create, view, and run scripts in Target. It also provides an example script that records adding a line path and profiles to a map.

Uploaded by

orange breccia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Working with Scripts in Target

Scripting refers to the act of creating and running a file that will carry out many operations in a row. If you perform a task
repeatedly in Target, you can automate the task using a script. Geosoft Scripts are ASCII files (with a *.gs extension) that
contain a series of actions or commands that are grouped together in a single file to accomplish a task automatically. This
How-to Guide is intended to provide you with a basic introduction to Geosoft Scripts in Target.

Some typical uses for scripts include:


Automate complex or repetitive tasks
Create standard map layouts
Run Target functions from the DOS command prompt
Process large amounts of data overnight
Geosoft Scripts work by recording the actions you perform on a dataset. When you run a script, the commands you
recorded are executed on data in a specified project. You can run scripts either interactively in Target or from the command
line using the Oasis montaj Scripts Processor (OMS.exe).

For more information on using Scripts, see the Creating Scripts In Oasis montaj Technical Note, available online at:
www.geosoft.com/resources/technotes/

Batch Processing with Scripts


Target Scripts are ASCII files that define a series of processing actions to be performed on selected datasets. You can run
scripts interactively in Target using the script toolbar buttons or the Scripting commands found under the GX menu.

To Create a Script File


1. On the GX menu, select Scripting and then select Record Script.
The Create Script File dialog appears

www.geosoft.com 1
Target How-To Guide

2. Specify a File name


3. Click Save.
4. Perform your scripting actions.
5. On the GX menu, click Stop recording.... The system stops recording your actions. All of your actions were
recorded and saved to the specified script *.gs file.

Click the Help button for more information on creating a Script file.

To view a Script
1. On the Edit menu, click Edit a File.
The Edit file... dialog appears.

2 www.geosoft.com
Target How-To Guide

2. Using the Browse button, select the script file from your project folder.
3. Click OK. The system opens up the file in your default text editor.

Example
In the example below, we created a script file using the script file record option. This operation writes a script file (*.GS) by
recording each GX that you run during the session until you stop script recording (from the GX menu). The resulting (*.GS)
file contains sufficient parameter and database information to run the selected GXs in the same sequence. We recorded a
script of two different GXs - added a line path and line profiles to a map.
Below is the recorded script file test.GS.
The two GXs that were recorded are shown beside the GX command: PATH and PROFILE.

www.geosoft.com 3
Target How-To Guide

/-------------------------------------------------------------------------
/ LOG OPENED : Mon Sep 10 15:37:30 2012
/-------------------------------------------------------------------------
CURRENT Map,"e:\testing\Magnetics.map"
CURRENT Grid,"e:\testing\mag.grd(GRD)"
CURRENT Database,"e:\testing\Mag.gdb"
SETINI PATH.LINE_COLOR="K"
SETINI PATH.LINE_THICKNESS="0.15"
SETINI PATH.TICKFLAG="0"
SETINI PATH.LABEL_FORMAT="TL"
SETINI PATH.LABEL_DIR="0"
SETINI PATH.LABEL_COMPASS="0"
SETINI PATH.LABEL_LOCATION="1"
SETINI PATH.LABEL_SIZE="2.5"
SETINI PATH.LABEL_COLOR="K"
SETINI PATH.LABEL_WEIGHT="0"
SETINI PATH.H_OFFSET="2"
SETINI PATH.V_OFFSET="0"
SETINI PATH.GAP="0"
SETINI PATH.THINRES="0.02"
GX path.gx
CURRENT Map,"e:\testing\Magnetics.map"
CURRENT Grid,"e:\testing\mag.grd(GRD)"
CURRENT Database,"e:\testing\Mag.gdb"
SETINI PROFILE.CHANNEL="mag"
SETINI PROFILE.SCALE="100"
SETINI PROFILE.BASE=""
SETINI PROFILE.LOG="0"
SETINI PROFILE.LOGBASE="1.0"
SETINI PROFILE.SMOOTH="0"
SETINI PROFILE.COLOR="MY"
SETINI PROFILE.THICKNESS="0.15"
SETINI PROFILE.STYLE="0"
SETINI PROFILE.PITCH="5"
SETINI PROFILE.PFILCOL="N"

4 www.geosoft.com
Target How-To Guide

SETINI PROFILE.NFILCOL="N"
SETINI PROFILE.GAP=""
SETINI PROFILE.JOIN="1"
SETINI PROFILE.PLOTORDER="1"
GX profile.gx
/-------------------------------------------------------------------------
/ LOG CLOSED : Mon Sep 10 15:37:46 2012
/-------------------------------------------------------------------------

For more information on using Scripts, see the Creating Scripts In Oasis montaj Technical Note, available online at:
www.geosoft.com/resources/technotes/

How-To Guide Publication Date: 29/04/2014


Copyright 2014 Geosoft Inc. All rights reserved.

www.geosoft.com 5

You might also like