SCRIPT: Version 1.1 By Richard Rogers Copyright January 1991
What is SCRIPT: ?
SCRIPT: is an AmigaDOS device driver (like AUX: CON: SPEAK:) that allows
you to save all the input and output of a device to a file similar to the UNIX
command 'script.' But SCRIPT: can do a few other neat tricks, which I'll get
to in a moment. SCRIPT: will work with any AmigaDOS device, and can be used
with both WorkBench (programs must have a WINDOW tool type) and the CLI/Shell.
Requires WorkBench 1.2 version 33.43 or later.
How to install:
Copy the file Script-Handler to the l: directory on your boot-disk. Next,
add the following lines to the boot-disk's devs:mountlist file using any plain-
text (ASCII) text editor, such as ED:
SCRIPT:
Handler = l:Script-Handler
Stacksize = 5000
Priority = 5
GlobVec = 1
#
To have the SCRIPT: device automatically available when you boot your Amiga, add this line to the s:startup-sequence file on the boot-disk using an ASCII editor:
mount SCRIPT:
If your Amiga is in a "normal" configuration with all system directories,
files, and commands where they are on the WorkBench 1.2 disk, you can install
SCRIPT: automatically by typing EXECUTE EXECUTEME. This is somewhat risky if
your boot-disk deviates from the 1.2 or 1.3 distribution disk.
How to use:
If you didn't add the MOUNT SCRIPT: command to your startup-sequence, you
will have to type MOUNT SCRIPT: at a CLI/Shell before you can use SCRIPT:. You
only have to do this once each time you boot your Amiga.
The simplest way to use SCRIPT: is to type NEWSHELL SCRIPT: or
NEWCLI SCRIPT:. This is the equivalent of the 'script' UNIX command. A CON:
window will open, and you can use the CLI/Shell as normal. Everything you
see in the window will be saved to the file t:typescript. When you have
finished doing what you want to be scripted, type ENDCLI or ENDSHELL. This
will terminate the CLI/Shell and close the file.
You can change the file SCRIPT: uses by entering any valid AmigaDOS path
after the SCRIPT:. For example:
NEWSHELL SCRIPT:df0:myfile saves to df0:myfile
NEWCLI SCRIPT:sys:foobar/boogley saves to sys:foobar/boogley
NEWSHELL SCRIPT:PRT: sends file directly to the printer
NEWCLI SCRIPT:NIL: sends the file to nowhere
NEWSHELL SCRIPT:SPEAK: reads the file to you (slowly :)
I don't promise SCRIPT: will work if you don't include a device in the path
name, but it seems to save the file to sys: if you don't.
You can also change the device that gets scripted by using a colon : to
separate the script-file name and the device name. Using an empty script-file
name will save the file to t:typescript. Examples:
NEWSHELL SCRIPT::NEWCON:0/0/400/200/MyWin use t:typescript & NEWCON:
NEWCLI SCRIPT:PRT::NEWCON:0/0/400/200/MyWin use PRT: and NEWCON:
NEWCLI SCRIPT:df0:myfile:AUX: use df0:myfile and AUX:
NEWCLI SCRIPT:CON:0/0/320/200/Aux:AUX: use CON: and AUX:
NEWSHELL SCRIPT:PIPE:a:SER: use PIPE:a and SER:
It is possible to script the SCRIPT: device. This is useful when you need to
send the input and output from some device to more than one place. Say you
have a modem and you're letting people login to your Amiga through AUX:. You
may want to have a hard copy of everything your remote users do, and also a
small CON: window so you can watch the AUX: I/O. To do this, you would use: