Kermit Script Files: (PART 1 of 4) This is a tutorial on MS-DOS Kermit scripts. A script is a file containing Kermit commands to be executed. This script feature applies to MS-DOS Kermit version 2.30 and above. Versions prior to this release may or may not have all of the functions described in this series of messages. MS-DOS Kermit, version 2.30, may be copied from the terminal room located at 251 Mudd or may be purchased from the User Services Business Office at 321 SIA. Scripts may contain any Kermit command, just as a TAKE file in Kermit terminology, but may also include other special commands such as INPUT, OUTPUT, PAUSE, ECHO, and CLEAR to automatically detect and respond to information flowing though the serial port. These actions would otherwise be performed by the user during CONNECT. The login sequence of a host computer is a classic example. INPUT: tells Kermit to look for certain characters from the other computer. OUTPUT: tells Kermit to send the given characters to the other computer. ECHO: displays the given string on your screen. PAUSE: tells Kermit to wait a specified number of seconds before continuing. CLEAR: empties the buffers of the serial port to forget earlier material. For complete details about scripts, see the MS-DOS Kermit User Guide. Below are some examples of common script uses. There are some general settings which you will probably want to use all the time so these commands have been placed in the file called GENERAL.SCR below. ==============================CUT HERE============================== ; GENERAL.SCR ; COMMENT Kermit script with general settings. ; ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc. ; ; Add this section onto the top of any of your login script files -- ; PACX.SCR, ROLM.SCR or DIAL.SCR. ; If no timeout period is given, the default is 1 second ; set terminal VT102 ; Set terminal type set input echo on ; Echo responses set input timeout quit ; Stop if no response after the provided time period set speed 9600 ; Can change to 4800, etc. set parity none ; Do not use any parity set handshake none ; Do not use any hanshaking characters set flow xon ; Use XON/XOFF flow control set local off ; Do not use local echo ; ; ADD DIAL.SCR HERE IF DIALING UP. ; THEN ADD PACX.SCR or ROLM.SCR. ; COMMENT - End Kermit General Settings Script ==============================CUT HERE============================== There are three common ways to connect to any computer: 1. Using the LDS-125 PACX boxes we currently have on campus at Columbia University or the ROLM data phones which will soon replace them. 2. Using a modem to dial from one computer to another. (* Note: A user must still go through the PACX or ROLM switch even when dialing up in order to connect to CUCCA's host systems). 3. Using a direct line (cable) which runs from one computer to another. (* Note : A script file here would only need to set the speed or baud rate) Always use: GENERAL.SCR | | Use only if dialing: DIAL.SCR Omit this if connected / | \ directly to the PACX. / | \ Use if going thru a / | \ switch (e.g. when PACX.SCR | ROLM.SCR Omit this step for connecting to the \ | / hardwired host connections CUCCA host systems). \ | / or direct host dialup. \ | / Script for logging in CUNIX.SCR Or CU20B.SCR, CUVMA.SCR, to a particular system. CLIO.SCR, etc. Suppose you usually use the LDS-125 PACX box to connect to one of the many computers on campus. Instead of always typing the same commands interactively, you may want to use the following script called PACX.SCR: ==============================CUT HERE============================== ; PACX.SCR ; COMMENT Kermit script for connecting to CU systems thru PACX ; ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc. ; ; For use with the CUCCA mainframe systems connected via PACX lines. ; Add this section to the beginning of any of your login script files ; (CUNIXC.SCR, etc.) AFTER your general script settings file (GENERAL.SCR). ; echo Make sure your PACX box is turned on and ready\13 echo Type carriage return when ready... output @con pause 2 ; Wait 2 secs output \13 ; Give a CR (carriage return) (\13 = ASCII CR) input 10 => ; Expect to see PACX prompt " => " within 10 seconds pause 1 ; Wait 1 second ; ; ADD CU20.SCR, CUVM.SCR, SIM.SCR, CLIO.SCR, or CUNIXC.SCR HERE. ; COMMENT - End Kermit PACX Settings Script ==============================CUT HERE============================== Then you could add a script which actually connected you to a specific computer. For example, suppose we usually connected to CUNIXC through a PACX box. Then we could run the GENERAL.SCR, followed by the PACX.SCR, followed by the CUNIXC.SCR below: ==============================CUT HERE============================== ; CUNIXC.SCR ; COMMENT Kermit script for connecting to CU CUNIXC system. ; ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc. ; ; For use with the CUCCA's CUNIXC system. ; Add to the bottom of either PACX.SCR or ROLM.SCR. ; output cunixc\13 ; Type cunixc and a carrige return (ASCII 13) ;output cunixa\13 ; Change to cunixa or any other UNIX system pause 1 ; Wait 1 second input 10 login: ; Expect to see CUNIXC's login prompt output USERNAME\13 ; Type username (replace with yours) & CR set input echo off ; Privacy, please input word: ; Expect to see password: (abbrev.) echo \13Type your password: ; Make our own prompt. output @con ; Type in password at your console output \13 ; Add a real carriage return set input echo on ; Back to normal viewing connect ; Connect to system ; COMMENT - End of CUNIXC Script ==============================CUT HERE============================== Notice the @con command in the script example above. It is here that you type your password to the console. You could replace the @con with your actual password in the script but this is not a good idea for security reasons. Anyone who ran your script would be able to login to your computer account, or at least look at your script file to see your password. How do you actually run these scripts? You insert the MS-DOS Kermit 2.30 diskette in your floppy disk drive (or put the KERMIT.EXE file on your hard disk) and type KERMIT. The script files must be on this disk as well. At the KERMIT-MS> prompt, you type TAKE