Quick Link II Fax (250-3027B) Automating Quick Faxback Doc. # 3237 Link II Fax Quick Link II Fax can quickly connect you to your accounts on the major on-line services. Before it can do this, however, you must set Quick Link II Fax with the proper information. When configured, you can connect to Dow Jones, CompuServe, and GEnie with just one mouse click. Services setup SERVICES Setup, accessed from the SETUP menu, allows you to specify account information for the Dow Jones, CompuServe, and GEnie online services. Choosing SERVICES from the SETUP menu calls the Sub-menu, allowing you to set the NETWORK NUMBERS and ACCOUNT INFORMATION. This is where the actual account information is keyed into Quick Link II Fax. Network Numbers Enter the local telephone numbers in the appropriate text boxes for accessing the TELENET, TYMNET and COMPUSERVE'S or GE's own networks. Use a comma to cause a 2 second delay in dialing when needed, as when switching to an outside line when using an internal phone system. Click the SAVE button to permanently store the updated telephone numbers to disk. Account Information Enter the applicable account and password information to be used for connecting to each service. Leave blank the information for unused services. Select the network to be used for accessing to each of the services. The SAVE button accepts all changes, and saves the new services information. The OK Button accepts the changes and removes the dialog box from the screen. The CANCEL button removes the dialog box but does not apply any changes. Connecting to online services Once the account information is keyed in, simply pulling down the CONNECT menu and selecting the appropriate Online Service will automatically dial your modem, log you in, and enter your password. Macro keys The Macro Key function allows you to define a custom meaning or sequence of keystrokes to the selection of function keys, F1 through F12. These Macro Keys can cause a user defined literal string (series of characters) to be transmitted or they can be used to launch a script file. Choosing MACRO KEYS from the SETUP menu brings up a sub-menu: Set 1 and Set 2. The first 5 function keys are set from Set 1, the last 5 from Set 2; choosing one calls the matching MACRO KEY definition dialog box, which allows you to enter a literal string you want transmitted when each of the function keys are depressed, or to specify a Script file name if you want a Script file launched when the function key is pressed. If you wish the edit field to contain a Script file name, check the Script checkbox next to the edit field and a file selection window will appear allowing you to automatically select the script file. The next box may contain either a literal string or a script file name, but not both. In the example below, note that the definition for F1 is defined as a literal string while the definition of F2 is a Script File. Additionally the "\r SYMBOL" in the definition for F1, instructs Quick Link II Fax to send a Carriage Return after typing out the characters. Clicking SAVE saves the macro keys for future sessions. For more information on Scripts, refer to the next section. Scripts Scripts are miniature programs-within-a-program, and can totally automate your on-line sessions (the ON-LINE SERVICES module of Quick Link II Fax is actually a script file, for example). Properly programmed, a Script can call a BBS, log on to it, and automatically read your mail, and log out, all by pressing a single key. This section describes how to run and write Scripts. Running Scripts Scripts are actually files that contain within them a list of instructions and commands. Scripts, therefore, are on your disk and must be opened and run as follows: 1. With a Macro Key, as described previously in this Chapter. Checking the Script checkbox in the MACRO KEYS dialog box calls another dialog box to select a script file from your hard disk. 2. Choose RUN SCRIPT from the CONNECT menu, which calls the same dialog box to open and run a Script file on your hard disk. 3. By dialing a telephone number from the Data Phone List with an associated script. Quick Link II Fax Script Language Elements The Quick Link II Fax Script language is made up of commands that may be used to create a script file. A script file may be created using the Notepad on the Edit Menu. You may also use any external editor to create the script file. A Script file is used to instruct Quick Link II Fax to perform a predefined set of operations. Script files can be defined to automatically perform the dialing and logon process necessary to automatically connect to a remote computer. The script can also be programmed to perform specific steps once the connection to a remote computer is made. The commands that comprise the script language may be entered in either upper or lower case. Each line of the Script may contain only one command. The commands may be indented to any point you wish in order to enhance readability. Blank lines may also be inserted in the script files to show breaks in sections on the Script statements. You may include comments in the Script file by placing a semi-colon in the first position of the line that contains a comment. Any information appearing on the line after the semicolon will be considered as comments, even if the information includes otherwise valid script commands. When sending strings to a remote computer, a string may be defined to include a literal value, a Return character or an ASCII character represented by its decimal value. Literal character strings must be enclosed by double quotes. A return character is defined by including a '\r SYMBOL' in the command line. An ASCII character is defined by including a '\ddd' in the command line, where ddd is the decimal value of the ASCII character. For example, you would use this feature to send a Control-C to a remote computer. When a script is running, a message will be displayed in the status area of the Menu Bar. You may abort a Script execution by simply pressing the Escape key. Script Language commands The Quick Link II Fax script language is comprised of the following commands: Baud Statement: This Statement allows you to specify the baud rate to be used when the Script file is executed. Format: Baud "rate" "Rate" can be set to 110, 150, 300, 600, 1200, 2400, 4800, 7200, 9600, 12000, 14400, 19200, 38400, or 57600. Clearstring Statement: This command will clear the contents of the special variable called InString. This variable is created by the use of the second form of the In Statement defined below. Format: Clearstring CLS Statement: This command will clear the QL II Fax Terminal Window and has the same effect as selecting Clear Screen on the Edit Menu. Format: CLS The CLS statement will not impact the contents of the Line Buffer. Data Statement: This statement is used to specify the number of data bits, either 4, 5, 6, 7 or 8 to be used during the execution of the script. Format: Data "#" Where # is either 4, 5, 6, 7 or 8. Dial Statement: This command will instruct QL II Fax to dial a specified telephone number. Format: Dial "xxx-xxxx" Where xxx-xxxx is the telephone number to be dialed. QL II Fax will use the dialing prefix defined on the Modem Setup Dialog Box. You must have an AT command set compatible modem and have English Responses set on to use this statement. Example: Dial "1-714-362-5822" The Example above would instruct QL II Fax to dial the Smith Micro Software support BBS. Echo Statement: This command will cause a literal string that follows the command to be displayed in the local Terminal Window. Format: Echo "xxxxxx" Where xxxxxx is a literal string to be echoed to the Terminal Window. The string must be enclosed by double quotes. Example: Echo "This is a SAMPLE string" The string, THIS IS A SAMPLE STRING, will be displayed in the local Terminal Window. End Statement: This command is used to mark the logical end of a set of script commands. Format: End Execution of the Script instructions is halted upon encountering an END command. Goto Statement: This command will transfer the execution to a specified procedure name. Format: Goto Procedure: Where Procedure: is the name of a procedure defined in the Script file. The procedure name must end with a colon. The following script code shows the use of the GOTO statement. Example Start: Echo "This is an example" Goto Step 2: Step 1: End Step2: Goto Step1: If you follow the execution of the script above, the last procedure executed is Step1: that terminates the script with the END Statement. If Statement: The If Statement allows you to test the contents of a special variable called InString. InString is created by using the second form of the In Statement defined below. Format: If InString = "xxxxxxx" Goto Procedure: Where xxxxxxx is a literal string not longer than 40 characters. If InString equals the specified literal string then execution is transferred to the procedure specified in the Goto. Example: If InString = "Password" Goto Step2: In Statement: There are two forms of the In Statement. The first form of the statement will cause QL II Fax to wait "n" seconds for a string of characters to be received from a remote computer. Format: In "xxxxxx" n Where xxxxxx is a string for which you want QL II Fax to wait. QL II Fax will wait up to "n" seconds for a message to be received from a remote computer. If after waiting "n" seconds, the string is not received, the remainder of the commands in the Script file will be bypassed. Example: In "Password?" 30 Quick Link II Fax will wait 30 seconds for the string, Password?, to be received from the remote computer, before continuing with the execution of the script. The second form of the In Statement allows you the capability to receive one character at a time from your modem. Each character will be added to a special buffer called InString. Format: In InString InString may contain up to 40 characters of input and will generate an error if more than 40 characters are received. In String may be used in an If statement for testing and controlling the flow of the Script execution. Out Statement: This command will cause a string to be transmitted to a remote computer. Format: Out "xxxxxx" Where xxxxxx is a string to be transmitted to a remote computer. Example: Out "DEMOPASS/r" QL II Fax will transmit the string, DEMOPASS, to the remote computer followed by a Return character (\r). Pause Statement: This statement will cause the execution of a script file to be temporarily halted until the user presses a key on the keyboard. Format: Pause A message will be displayed in the terminal window, instructing the user to Press a Key to Continue. Parity Statement: This statement is used to specify the parity to be used during the execution of the script. Format: Parity "x" Where x is "N" for none, "O" for odd, "E" for even, "M" for mark, and "S" for space parity. RtsCts Statement: This statement is used to specify whether the RTS/CTS hardware flow control is to be used when executing this script. Format: RtsCts "xx" Where xx is "ON" for on or ""OFF" for off. Stop Statement: This statement is used to specify the number of stop bits, either 1, 1.5 or 2 to be used during the execution of the script. Format: Stop "#" Where # is either 1, 1.5 or 2. Until Statement: This command will cause QL II Fax to wait until a specified time before continuing with the execution of the script. Format: Until "hh:mm" The time must be specified in the form of 24 hour military time. Wait Statement: This command will cause QL II Fax to delay for 'n' seconds before proceeding with the next script command. Format: Wait n Where 'n' is the number of seconds you want Quick Link II Fax to wait before proceeding to the next script command. Example: Wait 15 QL II Fax will wait 15 seconds before executing the next step in the script file. XonXoff Statement: This statement is used to specify whether the Xon/Xoff flow control is to be used when executing this script. Format: XonXoff "xx" Where, xx is "ON" for on or "OFF" for off. In addition to the above Script commands, the QL II Fax script language includes a number of predefined variables that may be used in writing a script. Many of these variables are used by Quick Link II Fax to provide automatic connection to Compuserve, Dow Jones and GEnie. The following list of variables are included in the script language: Variable Meaning Compunet Telephone number for CompuServe's own network Telenet Telephone number for Telenet Tymnet Telephone number for Tymnet Cacct CompuServe account number Cpass CompuServe password Dpass Dow Jones password Guser GEnie user number Gpass Genie password You will find a number of script files (.SRP) in your Quick Link II Fax default directory that use the above script commands and variables for accessing CompuServe, Dow Jones and GEnie. These files are listed below: File Use COMPUSRV.SRP Connects to CompuServe DOWJONES.SRP Connects to Dow Jones EMAIL.SRP Connects to the American Email BBS at Smith Micro Software, Inc. GENIE.SRP Connects to GEnie You can use the above files as examples for creating your own scripts. Also, if you are not in the United States and want automatic access to CompuServe, Dow Jones or GEnie simply modify the proper script file, from the list above, to operate with your country's telephone access system. (br/all-11/4/94)