AREXX Support July 24 1992
AREXX is now the standard batch language for Amiga machines under release
2.0 and further. Using AREXX you can control several applications, operate
user interfaces, convert data, do arithmetic and in general connect
together the rough edges of software. Currently there are 3 ways I'm using
AREXX and there may be more. You don't need AREXX to run Vapor Paint, but
you can do some fun stuff with it. Vapor Paint will tell you if AREXX is
not running when you start up. Also, using any macros at all requires
AREXX, since I use some of its parsers!. These features are disabled if
AREXX (RexxMast) is not running.
Vapor Paint's public AREXX port is called Vapor.
For example, from the CLI you could type :
Rx "address 'Vapor';ZIN"
to zoom in . CLI wants the "" on the outside, thus forcing ''
within the expression. Note the use of ; to continue the context.
AREXX is © William S. Hawes
Macros In Pums|
AREXX can be used to decode .vee files and convert the data
therein into other formats (using the VeeRead.rexx program). Thus,
if you want to drive another paint program with data from Vapor
Paint Vectors, you can (if it has an AREXX interface). If worse
comes to worse, you can write a file for the other program to read.
Every Key command has an AREXX name. If there is a "Y or N"
requester normally associated with the key command, it is answered
"yes". If there is a file requester to be answered, put the file name
or directory after the command. If a Pum is invoked by the command,
a special syntax is used : each numerical in the pum is filled
in order by numbers supplied in the AREXX command line. You can
go to a specific numerical with the syntax "#n=". The numbers for
the numericals in a pum are given in the Keys Help file. Time
values are in floating-point "Frames", e.g. one second = 30.0 frames.
(or whatever the Frame rate is currently set to..)
The key command "Pum" is used to alter existing icon values.
This ability to supply values from AREXX can be repressed by the
mysteriously named AREXX command "REXXFEED 1". Thus you can start up
a save, animate or load and still have the "user" fill in the requests.
Be sure to reset it with "REXXFEED 0".
Raw mouse moves are simulated with three AREXX commands:
"VS": starts a move
"VM" moves to the x, y in REAL coordinates. This way, you have better
accuracy than with a mouse. The time stamp just goes up sequentially.
"VE" ends the move and calls the Mouse tool currently in effect.
You can also input vectors directly, without using the Raw mouse
conversion routines with XS, XM,XE, e.g.
"XM " xx yy zz RR MM SS
If arguments are left off of XM , they are given default values,
and S is advanced automatically.
Other AREXX commands can be used to build a bit of interface:
Notice puts up a notice window with the following string inside.
YorN puts up a "Y or N" requester with a string inside.
the Variable "VRETURN" is set to YES or NO
TBar puts a phrase in the title bar for non-interactive messages.
String with a phrase, prompts for string input, which is
returned in VRETURN. Characters after a '\' are used as a default.
WBFront brings workbench to the front for more useful interfacing...
SCFront brings the Vpaint workscreen to the front.
EyePos reads a type and a number and makes that icon the current one.
E.G. EyePos SQ 4. For "random access navigation".
SpriteC Turns all sprites on or off. For use during single framing.
Sending AREXX Macros from Vapor Paint
Vapor Paint can invoke a variety of AREXX macros either automatically
or from Key commands. Vapor paint macros can end with either no suffix,
.rexx or .vapr.
Some AREXX macros are automatically called by Vapor Paint at certain times:
VSTART.vapr is called at the beginning of the session (to set global
preferences or whatever).
VCLEAR.vapr is called when the workspace has been cleared. (k key)
You can invoke two kinds of AREXX macros via the keyboard:
If you have AREXX files in the usual AREXX search order named
"vapor0.vapr" through "vapor9.vapr" they can be called up with the
ALT-[number] keys: e.g. ALT-6 invokes vapor6. These names are permanent
- so just by existing, these macros are always available.
Another kind of macro involves using right-amiga+key combination to set
the AREXX macro's filename (or, if a one-line command, that one line
command), and after that, Right Amiga + that key will invoke that macro.
There is a row of Macro buttons in the icon area, which call the
"VMAC1.vapr" through "VMAC6.vapr" macros.
An Amiga+key macro can be set from AREXX itself, with the SMAC command:
SMAC <rawkey in decimal> macroname or One-Line command
which is best stuck in VSTART.vapr, 'cuz that decimal rawkey stuff
is a little obscure. (however, they are the keys' REAL identifiers.)
That Decimal Rawkey number is reported when you set the macro by hand
from the keyboard.
To reset the macro key on purpose, press "CNTL" before invoking the macro
again. You'll be able to edit the old text.
There is a also a facility for calling macros from a big, button filled
menu: PumLeft (aka alt+Space bar). Some macros are hard coded, like
QUIT,LOAD,SAVE and HELP. The rest are set by the user, with the ARexx
commands: SetMenu,SetMenuX and ClearMenu. ClearMenu resets the menu buttons
to the default macros alone. To set other menus:
SetMenu [column],[row] [Name],[Macro name or 1 line command]
(column goes from 0 to 19, row from 0 to 3, for a total of 80 macros)
SetMenu 0,6 Banana,TBar I want a banana!
In some cases, you want to be able to let the user use a pum instead of
setting the value directly.. for that, say:
SetMenuX 0,6 New Color,NewCol
Macro and AREXX Examples
For example, here's
how to erase the Vfiles: directory:
/* VAPOR0.vapr erase vframes: directory */
Options failat 5
"Yorn Erase all in Vframes:?"
if Vreturn = "NO" then exit
"DELETE >Nil: Vframes:#? Quiet
/* swap back to Vapor.. */
Tbar "Vfiles: all gone"
Here's an AREXX program directly typed from the CLI shell:
rx "host 'Vapor';'VS';do i = 0.0 to 1.0 by 0.02;'VM ' 0.1 i;end;'VE'"
draws a short line with 50 points using whatever the current Mouse Tool
Here is a typical Vstart Macro:(mine)
/* Vapor paint start up file */
/* set up macros ... */
/* also, set default options */
"Pumtop #1 = 0.0"
"Pumtop #2 = 0 0 0 0.004 0.004 0.3"
"Pumtop #8= 8 1"
"Pumtop #10= 6 68 "
"Pumtop #12= 65535 65535 65535 " 3*65535/4
"Pumtop #16= 65535 65535 65535 65535"
/* track sprint = on */
Tbar " Welcome to Vapor Paint!! "||DATE()||" "||" "||TIME()
Macro Examples: Smac.Vapr
And to set up my favorite macros...
/* set some macros and 1-liners!*/
"SMAC" 19 "NewCol 65535 0 0"
"SMAC" 36 "NewCol 0 65535 0"
"SMAC" 53 "NewCol 0 0 65535"
"SMAC" 21 "NewCol 65535 65535 0"
"SMAC" 34 "NewPen 6"
"SMAC" 35 "NewPen 10 0"
"SMAC" 09 "NewPen 10 10"
"SMAC" 10 "NewPen 10 14"
"SMAC" 08 "NewPen 6 3"
"SMAC" 07 "TinyAn.vapr"
"SMAC" 39 "Vapor9.vapr"
"SMAC" 40 "NewPen 17 25"
"SMAC" 80 "PumTop #5= 0.0005" /* changes default Radius with F1-6 */
"SMAC" 81 "PumTop #5= 0.0010"
"SMAC" 82 "PumTop #5= 0.0020"
"SMAC" 83 "PumTop #5= 0.0040"
"SMAC" 84 "PumTop #5= 0.0080"
"SMAC" 85 "PumTop #5= 0.0160"
k=5 /* greys */
do i = 0 to k;"SMAC" i+1 "NewCol " 65535*i/k 65535*i/k 65535*i/k
"tbar SMACS installed! use Alt-8 to reinstall!"
Macros from inside Pums!
Since the "new" icon bar features six macro buttons , These buttons can be
used to execute macros to fill in the Pum's values. These buttons call
macros named by this convention:
V(icon name)Mac(button number)
e.g.: VCLMac1, VPNMac5, etc.
You can do whatever you want with a few restictions:
TBAR is obscured,
PUM works fine, but is permanent (i.e Cancel does not restore anything)
Currently, only CL, PN and AN are supported. But if the pum itself was
launched by a macro, then the macro button won't work!
Another New Feature: You can ask Vapor Paint to return some of its
internal information as variables in your Arexx macro! For instance,
"GetRMNum" sets the variable RM_NUM to the number of "raw mouse vertices"
"GetRMVal n" will set RM_TIME,RM_X and RM_Y from the raw mouse vertice N.
(See new file "AREXX_RVI" for better doc on this!)
This is the Last|
[Back to the main page|
Back to the main Vapor Paint page ]
jhhl-at-panix.com / 324 Wall St. Apt 5 / Kingston NY 12401
© 1998-2017 Henry Lowengard