home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
274.lha
/
Scripit_v1.0
/
Docs
/
Commands.txt
< prev
next >
Wrap
Text File
|
1989-08-06
|
10KB
|
263 lines
Scripit Command Format
==========================
MENU menu menuitem <subitem>
Simulate a menu selection from the selected window's menu. The
input is 'menu' 'menuitem' and if needed 'subitem'. This command
needs at least the first two to work. Note 1 explains naming
conventions. (If the window has the MENUVERIFY flag set,
Scripit will send a MENUVERIFY msg and wait for a reply to it
before sending the actual menu select message.)
GADGET [ID num] [#num] [X num] [Y num] [gadname] [opt1] [opt2]
This controls the gadgets of the selected window. It needs a
gadgetname (or number) to identify the gadget and, depending
on the gadget type needs more arguments to modify that
gadget's contents. It will send both a GadgetUp and a
GadgetDown message if the window's flags request that.
(See Note 4 for more info.)
GADGET boolgadget
Triggers a selected bool gadget from the selected window.
GADGET stringgadget newstring
Replaces the string in a string gadget with a new string and
simulates a 'return' on the gadget. [opt1] is the new string.
GADGET propgadget horz vert
Changes the position of a proportional gadget. The input values
reflect the horizontal and vertical prop position of the gadget.
(Values allowed: 0-65535) [opt1] is the horizontal position,
and [opt2] is the vertical position.
GADGETDOWN Does the same job as 'GADGET' except that it will only send
GadgetDown messages and not GadgetUp messages.
GADGETUP Does the same job as 'GADGET' except that it will only send
GadgetUp messages and not GadgetDown messages.
WAIT <delay>
Suspends script execution for delay * 1/50th seconds. Default
delay time is 25, i.e. 1/2 second.
LMB x y
Simulate clicking the left mouse button while the pointer
is at position x,y.
Related : SELECTUP Sends only LMBUp message.
Commands : SELECTDOWN Sends only LMBDown message.
RMB x y
Simulate clicking the right mouse button while the pointer
is at position x,y.
Related : MENUUP Sends only RMBUp message.
Commands : MENUDOWN Sends only RMBDown message.
DOUBLECLICK Simulate a double click. This can be one of the following types:
DOUBLECLICK GADGET boolgadget
DOUBLECLICK RMB
DOUBLECLICK LMB
The delay between the two clicks is controlled by the double-
click setting in Preferences.
VERBOSE [ON] or [FULL]
Turns on debug text printout to the console window. Default
mode is off. VERBOSE ON will turn it on, any keyword other
than 'ON' will turn it off except VERBOSE FULL which will turn
on full debug display.
SCRIPT [scriptfile]
Transfers script file execution to another Scripit file.
Control will NOT return to the current file when the new script
file ends.
SUBSCRIPT [scriptfile]
Transfers script file execution to another Scripit file.
When that file ends, control will return to the current file.
(Be careful of scripts that call themselves!)
(Both SCRIPT & SUBSCRIPT were broken in previous version. They
are working now.)
DRAG x,y,x2,y2,[steps]
This is intended for use with WorkBench. It will click on an icon
at x,y (if it exists) and will keep holding down the button while
moving the icon to x2,y2 where it will release the button. It is
the equivalent of (RMBDOWN x,y + MOUSEMOVE x2,y2 + RMBUP x2,y2).
Steps, if specified, will make the drag into an actual drag by
inserting interim MOUSEMOVE commands between the RMBDOWN and
RMBUP. The number of interim moves is the number of steps
specified.
MOUSEMOVE x,y
Simulates mouse movement to x,y. (Sends a MOUSEMOVE message.)
DELTAMOVE x,y
Simulate mouse movement by x,y. (Sends a DELTAMOVE message.)
RAWKEY code,qualifier
Sends a RAWKEY event to the program owning the selected window.
This command is only intended for script generated by the auto-
script generator, "Recorder."
ITICK x,y
Sends an INTUITICKS event to the program. This is only intended
for scripts generated by the Recorder.
POINTER x,y [l] [L] [r] [R]
Pointer will move the mouse pointer to position x,y on the current
screen. This will _really_ move the pointer not just simulate it.
The qualifier (one of the following l,L,r,R) simulates left mouse
button down, left mouse button up, right mouse button down, right
mouse button up.
DRAW x,y x2,y2 x3,y3 ..... xn,yn
A specialized command used for drawing on DeluxePaint's screen.
It simulates the following:
POINTER x,y l
POINTER x2,y2 L
POINTER x2,y2 l
POINTER x2,y2 L
....
POINTER xn,yn l
POINTER xn,yn L
WAITFOR screen window <maxdelay> [ABORT]
WAITFOR is the same as SELECT except that it will wait until the
requested screen/window becomes available and then it will
select it. Maxdelay specifies the maximum time WAITFOR will wait
for the requested screen/window to appear. (delay in 1/50th
seconds.) Default delay is 200. The 'ABORT' option will abort
the whole script if the Maxdelay time expires.
RUN <program>
Simply runs another program. Control returns immediately to the
script which continues executing.
RUNBACK <program>
Simply runs another program. Control returns immediately to the
script which continues executing. The program will not have any
input or output streams.
EXECUTE <program>
Executes another program. Script processing will wait until the
program exits.
END Quits the script execution.
LABEL <labelname>
Defines a label that marks the current position in the script.
(Label names are allowed to be of any length, however only
the first 24 characters are used. You can use any characters
that you like in label names, however you might need to use
double-quotes around it if you want to use spaces.)
GOTO <labelname>
Script execution moves to the position of the specified label
in the script.
Note 1: Argument format for Screen, Window, Menu and Gadget Selection:
-------
The required item can be selected by specifying:
a. The item's name. This is NOT case-sensitive. Abbreviations
are allowed. (i.e. 'Pro' will match the first item that starts
with 'Pro' e.g. 'Project'.) Leading spaces are ignored.
b. The item's number. This is the sequential number of the item
in its list. This must always start with '#' and a number.
(e.g. 'MENU #1 #4 #3' will select the first menu, the fourth
menuitem, and the 3rd subitem.)
Note 2: Arguments can be seperated by one or more spaces, tabs, or commas.
------- Any string argument can be surrounded with double-quotes to
include spaces in its text. (e.g. "Text string") All numeric
arguments are integer. (i.e. no fractions allowed)
Note 3: Always use 'WAIT' to introduce delays between functions that move,
------- resize, open, close windows to allow enough time for Intuition
and/or the program to respond to the previous command. (e.g.
If you do a MOVETO 0,0 and then a MAXSIZE without a delay
between the two, Intuition will probably not have moved the
window yet at the time Scripit is requesting a resize. This
will mess up the resize and can have serious effects.)
Note 4: Gadgets can be selected by one of the following methods:
-------
a. Gadget ID:
This is the gadget's ID number. Most programs have unique ID
numbers for each gadget. You can find out a gadget's ID by
using the 'Lister' program.
b. Gadget Name:
This is the text that is normally attached to a gadget. Few
programs attach text to gadgets. (Also use Lister for gadget
names.)
c. Serial Number:
This is just a serial number of the gadget. It is reliable
in some programs, and unreliable in others.
You can specify multiple search criteria and Scripit will search
based on the following logic:
1. Search for ID. If found ID, then gadget found, unless more
than more gadget with the same ID was found.
2. Search for gadget name, first gadget that matches the name
will be selected.
3. Scan for serial number.
Examples:
a. Bool Gadget:
GADGET ID 323 #6 X 10 Y 34 "gadname"
This will search for ID 323 first, then "gadname", then #6. The
X and Y settings are fed into the message sent to the program
because some programs need to know where the pointer is when the
gadget was clicked on.
b. String Gadget:
GADGET ID 323 #6 X 10 Y 34 "gadname" "newstring"
or
GADGET ID 323 #6 X 10 Y 34 "newstring"
c. Prop Gadget:
GADGET ID 323 #6 X 10 Y 34 "gadname" x,y
or
GADGET ID 323 #6 X 10 Y 34 x,y
Copyright 1989 Khalid Aldoseri.