home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
274.lha
/
Scripit_v1.0
/
Docs
/
ARexx.DOC
< prev
next >
Wrap
Text File
|
1989-08-06
|
5KB
|
173 lines
The Scripit ARexx Interface
---------------------------
Scripit can be loaded in 'resident' mode, in which case it will open a port
for ARexx and wait for commands and requests from ARexx.
To load Scripit in Resident mode:
Scripit -x [portname]
Where [portname] is the name of the port that Scripit will open. If no
portname is specified, 'XIT' will be used.
After that, Scripit will just sit and wait for commands from ARexx.
From ARexx:
-----------
To find Scripit's port:
address 'XIT'
To issue a command to Scripit:
'commandname arg1 arg2 ... argN'
For Example:
address 'XIT'
'select Screen Window'
'closewindow'
Or:
address 'XIT' 'flash'
Example ARexx Script:
/* Test ARexx Scripit */
address XIT
'verbose off'
'wb open dh2'
'wb open access'
'wb open Access!'
'waitfor Access #5'
'menu Phone Re-dial'
This script will:
1. Find Scripit's portname.
2. Make sure that verbose mode is off. (just in case it was turned
on earlier by another script.)
3. Open the Workbench DH2 icon.
4. Open the 'Access' drawer from DH2's window.
5. Load Access!
6. Wait for all of Access's five windows to come up.
7. Send a 'Phone' 'Re-dial' command to Access.
Getting Results from Scripit:
-----------------------------
The command sent from ARexx to Scripit can be any valid Scripit command.
There is also a set of special 'Query' commands that only work with ARexx.
The Query commands return a result string to ARexx from Scripit depending
on what the Query command was. You MUST, however, turn on the RESULTS
option in ARexx before using any Query command, otherwise no result will
be returned.
The file 'Test.rexx' has an example rexx script that sets the RESULTS
option on, loads Scripit, waits for Scripit to load, then sends the some
query commands to Scripit.
The following is the list of Query commands:
Query Commands: For use with ARexx only
----------------------------------------
QUERY WINDOW
Returns the name currently selected window.
QUERY SCREEN
Returns the name of the screen of the currently selected window.
QUERY WINDATA
Returns data on the currently selected window in the following
format:
[LeftEdge] [TopEdge] [Width] [Height]
QUERY SCREENDATA
Returns data on the currently selected screen in the following
format:
[LeftEdge] [TopEdge] [Width] [Height]
QUERY WINLIMITS
Returns the window limits of the currently selected window in the
following format:
[MinWidth] [MinHeight] [MaxWidth] [MaxHeigth]
QUERY ACTIVEWINDOW
Returns the name of the currently active window.
QUERY ACTIVESCREEN
Returns the name of the currently active screen.
QUERY SCREENFLAGS
Returns a string with the mode of the current screen.
QUERY WINDOWFLAGS
Returns a string with the mode of the current window.
QUERY TEXTMODE
Returns the current text mode of the selected window.
Format: [Left] [Top] [FrontPen] [BackPen] [DrawMode]
e.g. 10 10 1 0 JAM1
QUERY FONT
Returns the current font of the selected window.
Format: [Fontname] [Fontsize]
e.g. topaz 11
QUERY MODE <mode>
Sets the current result returning method to ARexx. Mode can be
SHORT, LONG, or BOTH.
QUERY POINTERPOS
Returns the current position of the pointer in the front screen.
Format: [pointer x] [pointer y]
QUERY MOUSEPOS
Returns the current position of the mouse relative to the
currently selected window.
Format: [mouse x] [mouse y]
QUERY PATH <filename>
Returns the full path to the file or directory specified.
The returned string will contain the full pathname to the file.
QUIT This will tell Scripit to leave the resident mode, close its
ARexx port, and quit completely. Only use this if you really
want Scripit to unload itself.
Note: In all QUERY commands, QUERY can be replaced with a question mark.
----- e.g. 'Q WINDOW' is the same as 'QUERY WINDOW'.
Copyright 1989 Khalid Aldoseri.