SCRIPT PROGRAMMING The terminal emulator is not active during execution of script commands such as INPUT and OUTPUT. This means: 1. If the host sends the escape sequence that tells the terminal to identify itself, it is ignored. You have to put the appropriate INPUT and OUTPUT commands in your script program. Here is a macro to set your terminal type in Kermit and to set up the appropriate response string as well as terminal type string: def term if not def \%1 def \%1 vt320,- set term type \%1,- if error end 1,- assign _ttype \%1,- if eq \%1 vt320 assi _tid \27[\{63}63\;1\;2\;4\;8\;9\;15c,- if eq \%1 vt220 assi _tid \27[\{63}\62\;1\;2\;4\;8\;9\;15c,- if eq \%1 vt102 assi _tid \27[\63\;6c,- if eq \%1 vt100 assi _tid \27[\63\;1c,- if eq \%1 vt52 assi _tid \27/Z Whenever you switch terminal emulations, do "term vt102" instead of "set term type vt102" (substitute your preferred terminal type). In any script that responds to ESC Z (or whatever), have it "output \m(_tid)", and any prompt that asks for your terminal type you can "output \m(_ttype)". And be sure to execute a "term" command in your MSKERMIT.INI file, so your initial terminal type is set. 2. A host-generated escape to put the terminal in Tektronix mode has no effect. Put explicit SET TERMINAL TYPE TEK commands in the appropriate places in your script program. 3. Screen formatting escape sequences have no effect. If you have SET INPUT ECHO ON, they are simply displayed as-is. If the remote host is sending ANSI (VTxxx) escape sequences during execution of the script program, then users of IBM PCs can use the ANSI.SYS or similar console driver to interpret the escape sequences. This is particularly useful when running a script that logs in to a full-screen system, such as an IBM mainframe through a protocol converter. But beware: ANSI.SYS is not totally compatible with Kermit's VT emulator, and it may produce unwanted side effects, the most annoying of which is suddenly popping your PC into 40-column mode! If you experience difficulties with your screen display while using Kermit script programs, use SET INPUT ECHO OFF. Or remove ANSI.SYS from your CONFIG.SYS file and reboot. PAUSE, WAIT, and similar commands also cause port input to be echoed to the screen if INPUT ECHO is ON. Use SET INPUT ECHO OFF to defeat this effect. If the REINPUT command fails to find the requested text in the INPUT command buffer, it will wait (up to the timeout interval) for more characters to arrive from the communication channel. INPUT / REINPUT combinations will not work if the INPUT buffer is smaller than the amount of text that separates the INPUT text from the REINPUT text. You can increase the size of the INPUT buffer by including the desired size in your KERMIT=INPUT environment variable. The default size is 256 bytes. Script programming hint: To test whether a readable floppy disk is available in drive A:, do this: SPACE A: IF FAILURE ECHO No diskette in drive A:. The ON_EXIT macro is intended only for automatic execution when MS-DOS Kermit exits. It only works once, to prevent recursion (as would happen, for example, if you put an EXIT command in your ON_EXIT definition). .