Macros
Autolog supports up to 16 macros, called $0 through $9 and $a through $f.
These macros are Autolog's text "variables." A macro can contain text,
numbers, or other information you'd like to pass to Autolog from another
application or store for future reference.
You can define macros three ways:
-
Use the setmacro command to define each
macro individually.
-
Create an Autolog macro file (with the file extension
.amf) that contains each macro definition you need, then load
that macro file with the macro command.
-
Define the macros you need in your autolog command when you start
up Autolog.
You can use macros wherever you can use text in a script
file or in a command you enter directly. For example, if $0 is the
name of the place you're calling, say "Soft Machines Update System," you
could use this "prompt" colon command in
a script:
:<Calling $0>
$0 will be replaced by the actual text stored in macro 0 when the script
file executes. Calling Soft Machines Update System is what
will be displayed.
As another example, macros can be used in say commands. For
instance, if $1 is your password, you could use this say
command:
say "$1^M"
to send the remote system your password and a carriage return.
A macro could contain the name of a file, as in these examples:
transmit $2
go $3
A macro can even contain the name of an Autolog command. For instance,
if $4 is defined as ztransmit, you could
use this command:
$4 myfile.txt
to send the remote system a copy of the file myfile.txt using
ZMODEM protocol.