home *** CD-ROM | disk | FTP | other *** search
- ------------------------------------------------------------------------------
- Script.doc -- Access! (C) 1987/88 By Keith Young --
-
- Other text files in this archive:
- Access!me The origional 'doc' file describing most of Access!'s
- features.
-
- Future.txt This author's ramblings about what the future may hold
- for Access! (please read)
-
- Update.doc Documentation describing additions/changes to the current
- release of Access! (please read)
-
- ------------------------------------------------------------------------------
- Time: -23:-
- Date: 8/14/88
- Subject: Script Commands and Formats
-
-
- Scripts -- I am in the process of adding 'real' scripts (as opposed
- to the 'psuedo scripts' that _were_ available through the macro keys).
- This release has a limited (first) verson of the new scripting language
- and it will be expaned in future releases. Below are listed the various
- commands (and format for each command) that are currently implemented.
- There should also be an example script in the arc.
- ( anything within the [] is optional, but may effect the way the command
- works ).
-
- ----------------------------------------------------------------------------
- ASEND
-
- Format: ASEND [drive:dir/filename]
-
- Discusion: This will start an ASCII text send of the filename given.
- Or if there is an ASCII send in progress, it will abort
- the send. This command just 'starts' (or stops) the send
- in motion then continues with the script.
-
- ----------------------------------------------------------------------------
- BEEP
-
- Format: BEEP
-
- Discusion: Causes an audible 'beep' of the terminal.
- This can be used to signal certain events such as the
- script finishing, a certain string being recieved, etc.
-
- ----------------------------------------------------------------------------
- BYE
-
- Format: BYE
-
- Discusion: This will cause the the terminal to hangup the modem.
-
- ----------------------------------------------------------------------------
- CAPTURE
-
- Format: CAPTURE [drive:dir/filename]
-
- Discusion: Opens an ASCII capture file with the specified name.
- Or if there is an ASCII capture already in progress,
- it will close the capture file. This command just
- 'starts' (or stops) the capture then continues with
- the next script command.
-
- See Also: TOGLCAP, ASEND
-
- ----------------------------------------------------------------------------
- DELAY
-
- Format: DELAY x
-
- Discusion: Causes a delay of 'x' seconds. eg. DELAY 10 will delay
- the execution of the script for 10 seconds (there is
- a minimum of 1 second).
-
- ----------------------------------------------------------------------------
- DISPLAY
-
- Format: DISPLAY "Strings with spaces in them must have quotes |"
-
- Discusion: This command is used for displaying messages to the local
- screen (not sent to the modem). This can be used to help
- you debug your scripts, using several of these in various
- parts of your script will let you know where you currently
- are within the script (this is my 'printf()' 8)
-
- See Also: DISPEN, BEEP, ON, WAIT, SEND
-
- ----------------------------------------------------------------------------
- DISPEN
-
- Format: DISPEN x
-
- Discusion: Sets the 'pen color' for DISPLAYed messages. Where 'x' is
- a number from 0-15 for one of the 16 colors of the terminal.
-
- See Also: DISPLAY
-
- ----------------------------------------------------------------------------
- EXIT
-
- Format: EXIT
-
- Discusion: Exit the current script. (need I say more? 8)
-
- ----------------------------------------------------------------------------
- GOTO
-
- Format: GOTO Label
-
- Discusion: The normal execution of a script is from top to bottom.
- You can use GOTO to jump to a specified position ( a label)
- in the script (can be either a forwards or backwards jump).
- See then 'General' section below for the format of a label.
- ( I know... a GOSUB would be nice... I'll look into it 8)
-
- See Also: ON, WAIT, General (below)
-
- ----------------------------------------------------------------------------
- SEND
-
- Format: SEND "Send this out to the modem, plus a return char-> | "
-
- Discusion: Sends a string to the modem. Strings with spaces in them
- must have quotes. A '|' char is interpreted as a CR.
-
- See Also: DISPLAY, ASEND
-
- ----------------------------------------------------------------------------
- TOGLCAP
-
- Format: TOGLCAP
-
- Discusion: The first time this cammand is used, it will open an ASCII
- capture file with the name specified in the DEFINE window
- of Access! as the "Def.Capture:". Subsiquent (sp) calls will
- toggle the capturing on/off without closing the file. It
- 'suspends' and 'unsuspends' the capturing, this works
- _exactly_ the same as hitting <L-Amiga> <c> from within the
- program and can be used along with the keyboard command.
- To close a capture file after it's been started using this
- command, use the CAPTURE command with no filename. (this
- file will also be closed when you quit the program but not
- automatically when the script finishes).
-
- See Also: CAPTURE, ASEND
-
- ----------------------------------------------------------------------------
- ON
-
- Format: ON "Password:" SEND "MyPassword|"
- ON "?a?sword?" SEND "MyPassword|"
- ON "NO CARRIER" GOTO Exit
- ON "Hey Fred" BEEP
- ON "dir" ASEND dh0:Acc!BBS/filelist (hint, for the future 8)
-
- Discusion: Even though only one 'on string' is allowed at a time
- (currently), this is a powerful command. It tells the
- terminal to store the 'string' in memory and if/when the
- term recieves it (no matter where else it may be in the
- script at the time) to stop what it's doing and perform
- the specified command. As mentioned above, currently only
- _one_ ON string is stored in memory at a time... each
- call to ON will replace it with the new string to look for.
- This command along with WAIT (below) and GOTO make a powerful
- team if used wisely. (hopefully, future versions will allow
- multiple ON strings for matching... this (and a few other
- 'parsing' and conditional-type commands) would make a simple
- automated BBS a trivial thing to do... all with just a script
- .... I like it <grin> )
-
- See Also: WAIT (in particular), and every other command <grin>
-
- ----------------------------------------------------------------------------
- PRINT
-
- Format: PRINT
-
- Discusion: Toggles the printer on/off.
-
- ----------------------------------------------------------------------------
- WAIT
-
- Format: WAIT "Password:"
- WAIT "?as?word?"
-
- Discusion: Causes the execution of the script to _stop_ until the
- specified string is recieved. When/if the string is
- received, the script continues at the next instruction.
- If the string is never recieved, the script never continues,
- and must be manually aborted. You might want to setup an
- ON string (see above) before using WAIT for a way to bail
- out in case the string you are WAITing for doesn't arrive.
-
- See Also: ON, GOTO, General (below)
-
- ----------------------------------------------------------------------------
- General
-
- I'd like to make a few comments that apply to the scripts in general...
-
- o The commands ON and WAIT have a 'string' as thier argument. This string
- is 1) case sensitive 2) must be 20 chars. or less 3) you may use a '?'
- char. as a wild-card to match any single char. (this is useful if you
- are not sure of the 'case' of a particular char. in a string you will
- be waiting on, or if you are like me and just plain don't know how
- to spell it 8).
-
- o You may use 'white space' to whatever degree suits your taste of
- formatting. ( TABs SPaces and (I think) LFeeds )
-
- o A '|' char. is interpreted by the script parser as a <return> char.
-
- o A ';' charactor is used to specify a comment line, anything after the ';'
- charactor is ignored by the script parser. Currently, comments must be
- on a line by themselves and may _not_ be on the same line as a command.
-
- o A label is specified by a ':' char following a case sensitive string.
- Generally, a descriptive word with the first letter in Upper-case should
- be used, although this is not required. Here is a short example of how
- the GOTO command and labels might be used (see the supplied example script
- file for further examples)...
-
- Top:
- ;---------------------------------------------------------------------
- ; First set up an ON string in case something goes wrong... note that
- ; you can use all the 'white space' you want between the command
- ; and it's argument and at the beggining of the line
- ;---------------------------------------------------------------------
- ON "NO CARRIER" GOTO Exit
- WAIT "Name:"
- SEND "Roger Rabbit|"
- WAIT "Password:"
- SEND "IDunWorkForNo'Toons|"
- WAIT "Command:"
- ;---------------------------------------------------------------------
- ; Ok, we're logged on to this 'made up' BBS, so lets open up a capture
- ; file and read new messages
- ;---------------------------------------------------------------------
- CAPTURE dh0:msgs/filename
- SEND "rtn|"
- ;---------------------------------------------------------------------
- ; Now we'll reset the ON string to set up a little loop to send a
- ; return char each time we get a 'Read Action:' prompt... until we
- ; get back to the main 'Command:' prompt that we are WAITing for
- ;---------------------------------------------------------------------
- ON "Read Action:" GOTO Again
- Again:
- SEND "|"
- WAIT "Command:"
- ;---------------------------------------------------------------------
- ; We're through reading new messages, so close the capture, send the
- ; logoff string to the BBS, hang up the modem, then Beep to signal
- ; that the script is done and finally Exit
- ;---------------------------------------------------------------------
- CAPTURE
- SEND "Goodbye|"
- Exit:
- BYE
- BEEP
- EXIT
-