home *** CD-ROM | disk | FTP | other *** search
- ; -A COMMENTED X.25 PAD CONNECT SCRIPT-
-
- ; Last revision date 01/20/93 (update this each time
- ; you edit, and save the edited file under another
- ; name to keep this one intact).
-
- ; This script file is a fully functional example
- ; provided to help explain the contents and uses of
- ; a Notes Connect script (.SCR) file. It was created
- ; for dialing in to a Sprint PAD (Packet Assembler-
- ; Disassembler); however, this file may also be used
- ; as a starting point for creating new script files
- ; for other PADs. All non-blank lines not beginning
- ; with a semicolon should be edited for compatibility
- ; with commands and replies specific to the PAD you
- ; are dialing in to (consult with the vendor for
- ; further information). All blank lines and lines
- ; beginning with a semicolon are ignored by the
- ; Notes program; lines beginning with a semicolon
- ; are remarks to the reader. All other lines are part
- ; of the actual script.
-
- ; Note that there is also a sample ACQUIRE script
- ; provided, which also highlights many of the
- ; features of the scripting language (from the menu,
- ; click Tools, Call, Additional Setup, Scripts, then
- ; Edit to view the ACQUIRE script comserv.scr).
-
- ;===============================================
-
- ; In Notes' scripting language, the "DESC" parameter
- ; controls what is seen in the "Connect script"
- ; section of the "Call Setup" dialog box:
-
- DESC This script logs into a Sprint (or identical) PAD.
-
- ; The "TYPE" parameter differentiates between a "Connect"
- ; script and an "Acquire" script. For PAD dialing the
- ; TYPE must be "CONNECT". A Connect script differs from
- ; an Acquire script in that it is executed after the modem
- ; file, and is used to interact with a remote device, in
- ; this case an X.25 PAD.
-
- TYPE CONNECT
-
- ; "Arguments" are user-editable PAD requirements such
- ; as addresses, usernames, passwords, etc. They can be
- ; typed into the Notes Name & Address book, or into the
- ; "Call Setup" dialog box, where they can be changed
- ; "on-the-fly" as needed for each call:
-
- ARG1 1. REMOTE DTE ADDRESS:
- ARG2 2. None entered:
- ARG3 3. None entered:
- ARG4 4. None entered:
-
- ; Send "@," "D," followed by a <CR> (empty quotes, no
- ; semicolon) in order to autobaud to PAD at 8 bits, no
- ; parity. Responses must be enclosed in quotes, and
- ; each line not followed by a carriage return must end
- ; in a semicolon. These particular replies are specific
- ; to Sprint:
-
- REPLY "@";
- REPLY "D";
- REPLY ""
-
- ; Notes will WAIT 10 seconds (user-extendable if desired)
- ; for the PAD to ask for a terminal type (TERM). On error
- ; or failure this script will branch to the user-editable
- ; label--"TIMEOUT", in this case (see end of script),
- ; else REPLY to PAD with "D1" (required by Sprint):
-
- WAIT 10 FOR "TERM"
- ERROR TIMEOUT
- REPLY "D1"
-
- ; Set up PAD parameters to CCITT values required by
- ; Notes, branch to "TIMEOUT2" label (at end of this
- ; script) if PAD does not respond with its "@" prompt
- ; (also Sprint specific) within one second:
-
- REPLY "SET 1:0,2:0,3:0,4:20,5:0,7:0,8:0,9:0"
- WAIT 1 FOR "@"
- ERROR TIMEOUT2
-
- REPLY "SET 10:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0"
- WAIT 1 FOR "@"
- ERROR TIMEOUT2
-
- REPLY "SET 19:1,20:255"
- WAIT 1 FOR "@"
- ERROR TIMEOUT2
-
- ; Attempt to connect to remote DTE address entered
- ; as Argument 1 (ARG1) above. If other Arguments such
- ; as a password, etc., were required they would also
- ; go here in the form of REPLY "^2", REPLY "^3", and
- ; so forth; the vendor would need to be contacted
- ; for the additional appropriate replies and legal
- ; syntax. WATCH 5 seconds for one of the following
- ; responses and parse the response (responses are
- ; Sprint specific, END or FAIL are script commands,
- ; messages to the right of a FAIL command are
- ; user-editable and purely informational--for Script
- ; Log I/O purposes only):
-
- REPLY "^1"
- WATCH 5
- "CONNECTED" END
- "REJECTING" FAIL > Call rejected
- "ILLEGAL ADDRESS" FAIL > Illegal DTE address
- "?" FAIL > Unrecognized DTE address
- ENDW
-
- ; ENDW tells the program to End Watch, permitting
- ; the program to "fall through" to an unlabeled
- ; failure and user-editable message:
-
- FAIL > Timed out trying to connect
-
- ;===================================================
- ; Note concerning LABELS
-
- ; The script author may create as many labels as needed
- ; in order to send to the log a report on the point at
- ; which the script failed and why. Two labels were
- ; employed in this script. The message to the right
- ; of the FAIL command is what will be printed in the
- ; log.nsf file. Note that each label must begin with a
- ; colon:
-
- :TIMEOUT
- FAIL > Timed out waiting for PAD "TERM" type inquiry
-
- :TIMEOUT2
- FAIL > Timed out waiting for PAD "@" response
-
-
- ; <end of script>
-
-