You are on page 1of 395

IVT User Manual, Version 23.

0 1: Introduction, highlights and main topics

Page: 1

1: Introduction, highlights and main topics Click on any the following links for immediate help or introduction to variou important topics: NEW USERS TABLE OF CONTENTS MAJOR FEATURES HELP ON HELP FAQ NEWS SCREEN USER OPINIONS Acknowledgements Welcome to the HELP-system of IVT. Click on this link if you want to find out what IVT is... This is a hypertext application that allows you to find any topic quickly and efficiently. I have tried to make this help a genuine on-line manual. Use F1 for help-on-help, TAB to go from one link to the next, ENTER to follow a hyperlink, BACKSPACE to return. You can also use the mouse to navigate through this manual. Click on a link t follow it, click the right mouse button to return from a link. This manual is also available in HTML form (see your download site). Below you'll find the most important topics in a logical order. There is also a table of contents that lists all chapters and sections. See "about" to get an idea of the size of these manual pages (when printed, the total manual is over an inch thick!). Overview of topics in order of importance: Starting IVT Session Management Status line Cutting & Pasting Supported protocols Special keys Scroll back history IVT.RC files Setup screens Cut/Paste with mouse Using a printer Keyboard macros File transfer Crypt IVT.RC files Screen saver Locking the keyboard IVT Escape Sequences Challenge response Various examples Command line parameters, environment and all that. Making, managing and disconnecting sessions. Describes how to make most of the bottom line. Yank data into multiple buffers, paste anywhere. Transport protocols and session protocols. Summary of all IVT special keystrokes. How to view lines that scrolled from the screen. Describes all things you can put in start-up files. Changing configuration on the fly. How to use the rodent to do the cut/paste. How to print to a device or file, auto or manual. How to make those repetitive tasks easier. X, Y and ZMODEM file transfer with ALT+F9. To hide passwords. Timer controlled or manual idle task. Automatically after some time or manually. All recognized VT220 and IVT special sequences. How to do secure login over a network. Example configurations, scripts, etc. IVT supports serial lines Serial communication Multiplex protocol Script language Using Variables Expressions Tells you how to use RS232 communications. Runs several sessions on a SINGLE serial connection! IVT supports a scripting language Describes the major features of this powerful language. Global, session, parameter and local variables. Valid expressions in scripts. Support programs for IVT PRIVT EMU_TYPE IVTM LOGINC KEYP IVT.TIC IVTCOM Print Unix files on any IVT printer. Determine type of emulator used at login-time. Multiple login sessions on a single (serial) connection IVT Challenge/Response protocol server for Unix. Program your (IVT/VT220) keys from Unix. Terminfo file for IVT. A Unix script to run commands on your IVT PC. 1.1: Global description IVT is a multi-session, LAN-oriented (but serial lines supporting) VT220 terminal emulation program for Windows. This build is compiled without support for SSH-2. The URL to download it from is described here. The version you are using now is the Windows GUI application version of IVT. This will run on WinNT, Win2K, 2003, XP, Vista and Windows 7. If you are a Unix user who normally uses a PC to run some sort of VT100 emulator to contact your Unix hosts, this program is for you! IVT contains many features to make life easier and is meant to be a program you want to spend most of your (working) time in.

IVT User Manual, Version 23.0 1: Introduction, highlights and main topics 1.1: Global description

Page: 2

"Multi-session" means it supports several simultaneous connections to one or more hosts in a SINGLE window. Creating sessions is very easy, and there are numerous ways to switch between sessions, to monitor background session activity and to close sessions. The command line parameters can be used to do a variety of things, including automatic creation of all your sessions (including login). There is the session group editor to allow interactive editing of groups. When output scrolls from the screen, the history pager can bring it back. One of the major features is copy and paste with the mouse and/or the keyboard. Check out the special way to copy words and phrases from the screen This really saves a lot of typing! IVT is very, very configurable, using IVT.RC files. This Windows version is also able to save the setup in the Windows registry. See "IVT and the Windows registry" for details. Also, IVT supports a scripting language. This powerful language can automate many tasks. It has variables and complex expressions. It can, for example, automate the login process, while keeping your passwords hidden by encryption. The standard setup comes with a password learning system that does this for you already. The bottom line of the screen is normally a status line that displays many important bits of information. Click the fields to change them, right-click them for help. The keyboard is very customisable and programmable. It can automate many tedious tasks for you. You can program keys, for example. It can also lock the keyboard under timer control (or manually with ALT+l). Almost all settings of IVT can be viewed and changed by using the setup screens. IVT can drive a printer to save all output (or explicit screen prints) to a real printer or to a file. Printouts are automatically sized to fit the paper AUTOLOG is very handy for making transcripts of sessions (log to file). IVT also transfers files, using X/Y/Zmodem protocols with automatic recognition of a ZMODEM file transfer. If you have RZ on Unix, you can drop a file on the IVT window and it will start the transfer. If you use IVT over a serial line you can still run several sessions over tha single modem connection by using the Multiplex protocol and the ivtm multiplexing program. There are many more features - see the table of contents for ideas... 1.2: Development history IVT started out as an MS/DOS program that could make sessions using the NetBios protocol. It was developed as part of the LAURA project, a billion guilder (500 million US dollars) project for the RABO bank in the Netherlands (1989 - 1995). I needed a program that could create a NetBios session to a Unix machine, leave the session in place and exit (this allowed other DOS programs to use the session for source management between Unix and DOS by sending shell-commands on the session, as used by an Olivetti Software Factory package). The original way was to use an existing emulator and start a sub-shell from there, but that gave plenty of problems with free memory. I noticed that version 0.0 of IVT (Internal VT, where VT220 was the name of the original Olivetti terminal emulator) was blindingly fast compared to the Olivetti program. A long 'ls -l' listing that got interrupted would still produce output for 10-20 SECONDS because the network buffers got processed so slowly - one had to sit and wait for it to catch up... IVT was instantaneous. After adding minimal support for special keys and a few simple escape sequences, I made an IVT terminfo entry which enabled me to work under Unix much more comfortably. Ever since 1991, I've been extending IVT with features that made life easier for me as a Unix person. Especially multi-session and cut/paste were added right at the very beginning. Mouse support was added later. Users at the RABO project started to use IVT, rather than the VT220 or the later KERMIT program. When the project moved on to OS/2, IVT was ported quickly to that platform. When TCP/IP was introduced instead of NetBios, IVT adapted that as well. When LAURA was installed at the branch offices, remote support was done using networks that were easily compromised. Root passwords were routinely

IVT User Manual, Version 23.0 1: Introduction, highlights and main topics 1.2: Development history

Page: 3

transmitted over these networks. I became involved in securing this procedure As a part of this work, IVT was extended with a secure login protocol called challenge/response. That is now a compile time option. The machines that used this protocol have all died now, but the secure login support in IVT is still there, and the LOGINC program that implements the Unix part of this protocol is still part of the IVT distribution kit. Every time a user found something nice in competing products that IVT could not do also, it became a feature of IVT within weeks, if not days. After the LAURA project got zapped in 1995, I left and took IVT with me. Bein a consultant for a software house, I introduced IVT into every organization I was sent to, converting my co-workers to use it without any trouble. Only people using large X-windows displays considered themselves better off. Even then, if you have many different hosts that you connect to, IVT's multi session support tends to give a lot less clutter on your desktop (many sessions, yet only a single - large - window). A scripting language was added to facilitate automatic login. The CREATE statement saved me many thousands of keystrokes through the years. The newer password learning and automatic login system is even nicer. Beginning of 1998, I was forced to use Windows NT workstations with a to a modified SAMBA server, which meant I could not use it to access Unix hosts I did not administrate. Now, IVT is a 32-bit native Windows app, with full TELNET support over Winsock. It even has rlogin support. Its VT220 emulation is one of the most accurate around. It is a drop-in replacement for any Windows telnet program. The TELNET engine is also very complete. It can be downloaded from my home page. The program still had its own home-rolled non-GUI dialog interface. In 2001, I finally gave in and made IVT a GUI program, rather than a textmode console application. Now IVT has control over the font, vertical scroll bars, better mouse control, decent resizing of the window and much more. Older versions were not very intuitive in these areas. In 2003 Kerberos was added so IVT can make secure, kerberized TELNET sessions almost 2 years, it remained unfinished due to lack of "keyboard time" (there was a life to lead, as well). The summer of 2003 finally left enough spare to PuTTY. In the beginning of 2005 I finally found time to fix another old problem, tha of the font management and window resizing. Before version 19.0, all sessions of IVT shared a single font. This also made it impossible to implement the SIZEFONT feature, as this requires that each session has a unique font. Many thousands of lines of code were changed to improve the SCRMODE, GUI_FONT and SIZEFONT statements. In 2006, IVT got a GUI menu bar and a GUI status bar, complete with icons and tooltips. So now IVT is a true Windows program with all normal bells and whistles. Support for MS/DOS and OS/2 was finally dropped. In 2008, the text mode status bar was dropped. Januari 2007 was used to add a decent script language parser (using GNU Bison and Flex) to IVT. This makes the language more readable and consistent, allow nested expressions, logical AND and OR operators, an ELSE clause to go with the IF statement, and many more improvements. The internal number-representation was upgraded from 32-bit to 64, so the script language can handle large numbers and large files. The rest of 2007 was used to improve many details like printer handling, example scripts,project files, key-broadcasting and many, many others. In february 2008 this was released as version 21.1. Shortly after, work on version 22.0 started - UTF-8. Until then, IVT saw a screen of text as simple arrays of characters and their attributes (color and underline and so on). It could never display more than 256 different characters on a screen. UTF-8 allows to display all characters of the Unicode definition on screen simultaneously. This meant that IVT had a drastic rewrite of the lowest levels to allow Unicode everywhere (screen, file names, script, dialogs and so on). It also implied that typing these characters needs to be supported, so lots of new code to support IME. Tens of thousands of lines of code were changed to support UTF-8, so now you can type Chinese and Thai and Korean if you so desire. Again, PuTTY provided most of the technical ideas, but the implementation in IVT differs on many points. By the end of 2008 IVT is a robust, fast and complete Windows emulator. Now almost 20 years of age and in to version 22, but with a steadily growing user base and some really big fans...

IVT User Manual, Version 23.0 1: Introduction, highlights and main topics 1.3: Where can I obtain IVT?

Page: 4

In januari 2009 a tab bar was added as yet another, more intuitive way to switch between sesssions. 1.3: Where can I obtain IVT? Currently, IVT can be obtained from http://www.softwarevoordelig.nl/en. This is the freeware (use at your own risk) version of IVT. A commercial version of IVT with support for Kerberos V5 authentication and encryption and integration in various DCE and Kerberos environments is available from www.softwarevoordelig.nl/en. That version also includes the SSH-2 protocol. I would appreciate some feedback: ivtsupport@softwarevoordelig.nl. Send me mail if you like it, dislike it or if you would like support. See also this legal notice. 1.4: List of major features. Throughout the manual you'll find topics that are highlighted as being a "major feature". All such topics have a hyperlink to the previous and next topics. This screen serves as a start and an end of the list. Follow this list to get a quick impression of the strong points of IVT. Follow this link to go to the first such item. 1.5: Legal notice In no event shall Ruurd Beerstra be liable to you or anyone else for any lost sanity, lost savings, lost information, loss of the right to use IVT, or other incidental or consequential damages arising out of the use, inabilit to use, or as a consequence of failure or refusal to use IVT. So there. 1.6: Acknowledgements I'd have long since given up on development of IVT if it hadn't been for the many enthusiastic responses and support from many different people. I get a kick out of it when some demanding IT professional out there switches from Reflexion, CRT or even X-workstations to IVT because they find it works better. Their input can be seen in the "new features" list, since many features were added upon specific request from them. Some people spend many hours going through all these manual pages and take the time and trouble to write complex scripts and use features in a way I'd never expected. This has uncovered many bugs, disfeatures and problems through the years that I never would have found by myself. So I would like to send an especially big "thank you" to: - My wife Annie, for putting up with it all; - Gert Leerdam, for using IVT since the first unnumbered version (all those years ago at the Rabobank), and the constant praise (while simultaneously asking for extensions and new features all the time :-); - Same Ferencik, for the well over a hundred detailed bug reports, requests, evaluations, tests and just plain hard work to improve IVT. Thanks! - Chris Benson of Treepax, for advertising IVT to many DCE users; - Tony Lowrey of Entegrity, for supplying a DCE test-environment and docs; - Ard van der Leeuw, for being critical; - Erwin Buist, who kept on asking... - Bruno Furrer, for using all that weird serial hardware; - Sean Currie, for all the time it must have taken... - Jan Bessels, who asked for many of the powerful mouse-drive cut/paste features and the HTML-version of this manual; And all those others....

IVT User Manual, Version 23.0 1: Introduction, highlights and main topics 1.7: Command line parameters of IVT 1.7: Command line parameters of IVT

Page: 5

IVT accepts the following parameters on the command line (click on any of the hyperlinks for more information): VERSION: xx.yy. USAGE: IVT [{-|+}<options>] [VARS] <host> <loginname> [args] -A : Automatic startup from CREATE statements in IVT.RC -agrp : Automatic startup, use group code 'grp'. -B : Suppress display of graphic introduction (banner) screen. See also SPLASHTIME. -cfile: Use 'file' as the ONLY IVT.RC file. -h : Enter hypertext manual of IVT (complete on-line documentation!) -n : No attempt to do autologin. -p : Secure mode - No sub-processes started ever -s : Secure mode - No multiple sessions, no sub shell -u url: Parse URL and open a new tab in a running instance (or starts IVT) -x : Turns status line off -L : Suppress appending of .LOGIN to NetBios hostnames -N : Use NetBios protocol stack -d : Direct mode (Ignored, no LAURA NAMESERVER support compiled) -l : List (Ignored, no LAURA NAMESERVER support compiled) -Pprof: Select prof as startup PROFILE. -S : Use serial protocol -D : use DUMMY protocol. -W : Use WINSOCK/TELNET protocol. -4 : Force use of IPv4 -6 : Force use of IPv6 Multiplex protocol available. File transfer available. Scripting language available. Receive file (ESC g) and Run command (ESC R) available. Support for encrypted .RC files available. Challenge/response protocol available.

1.8: Version number of IVT IVT is under continuous development. New features get added regularly and the few bugs that may exist get fixed real fast. When problems exist, it is important to be able to identify the version used. Therefore, the version number is displayed when IVT is invoked with bad parameters (see usage). It is also displayed in the about screen. Furthermore, the support e-mail address is displayed there too, so you know where to send questions for support. See "development history" for a description of how IVT came into this world. See the news screen for a detailed description of new features. Compile time features are shown when you invoke IVT with bad parameters. 1.9: The news screen explained The F4-N screen documents the development of IVT. The $IVTBUILDNR uniquely identifies each build of IVT. Every time something significant is changed in the functionality, the change is documented in the news screen, identified by date and IVT version number. The idea is that, every time you get a new version of IVT, you use F4-N to read up on the changes and extensions in functionality that might affect you. When you run a new version for the first time, IVT will show this news screen automatically (but see NO_SHOWNEWS). The last character of the version number is changed every time an executable is released (bug fixes, very minor changes). The minor digit of the version number is changed every time something significant is changed (new features, changed functionality). The major digit of the version number is changed after major overhaul. 1.10: Passing command line options As shown in the usage screen of IVT, it is possible to specify a lot of different options on the command line. The options can either be preceded by a + or by a -. Using a - will turn an option ON, using a + will reverse the meaning of an option. So -s will turn secure mode ON and +s will turn it off.

IVT User Manual, Version 23.0 1: Introduction, highlights and main topics 1.10: Passing command line options

Page: 6

Some options take an argument. This must NOT be separated by spaces from the option letter itself, so: -cc:/my/startup.rc must be used to force IVT to read only the specified start-up file and no others (the option is -c and the argument is c:/my/startup.rc). You can also use the OPTIONS keyword in an IVT.RC file to change the options that were specified on the command line. Currently, options are not stored in IVT variables so there is no easy way to find out (in a script) what options are in effect. 1.11: Assigning script variables from the command line Between the last option and the hostname on the command line, you can specify multiple arguments in the form of: Variable=value "Variable=Value with spaces" IVT will GSET all variables to the specified values, making these variables available in all subsequent sessions (unless destroyed using UNSET). This way, you can pass information into IVT from the command line. See also ONCONNECT, to start a script as soon as the session is established. See also BATCHMODE, to specify you are using IVT as a batch application. See also $ENV_ variables to reference the environment. 1.12: Specifying a hostname on the command line The hostname IVT is to connect to initially, is either specified on the command line directly or specified using a CREATEGRP statement combined with the -A or -agrp options on the command line. Hostnames depend on the protocol that you use to contact a host. For example, when you use a serial line connection there really is no 'host', but only a communications device that you must specify (a modem port). So a command line might look as follows: IVT -S com2,9600,n,8,1 This will direct IVT to use a serial protocol, and the initial connection should be to COM port 2, with a given baud rate, parity, data bits and stop bits setting. Once IVT is started, you can create other sessions (either to another serial port, or by changing the PROTOCOL, to an entirely different type of host). anything, and different sessions are supported on different protocols simultaneously. I have used TCP/IP sessions from my home-PC to my home Unix used IVTM to enable me to run several sessions there also. You can read more about these protocols in this chapter. 1.13: Passing a URL on the command line (-u) IVT is integrated with a browser (like Firefox or IE) as of version 22.1a. A browser can follow a link of type: ivt://hostname/[Statement[;Statement;...]] This will cause IVT to be executed, passing it the URL with a preceding "-u" option. This new instance of IVT will first determine if there is an instance of IVT already running and available for a new session. If no instance is running, or the instance found is busy in some way, IVT continues with normal startup. If an instance is available, the URL is passed to it. Either way, the URL is interpreted as a command to open a new session. If that instance of IVT is viewing the built-in manual, or using setup, or using some other dialog or feature, the user will have to return to normal session mode before the session can be created. The hostname can be any form of hostname IVT normally accepts, and if that is the only information in the URL, IVT will open a session to that host with default settings. However, additional information can be passed in the URL. As an example:

IVT User Manual, Version 23.0 1: Introduction, highlights and main topics 1.13: Passing a URL on the command line (-u) "ivt://rohan.snipweg.wxs.nl/PROTOCOL SSH;NO_GUI_RESIZE"

Page: 7

Would cause IVT to behave as if those commands were read as part of a script, so the protocol will be SSH and resizing will be disabled. There is no limit to the number of statements that can be passed this way. All statements heve to be separated using semicolons (;). IVT understands escaped characters in the URL of form %XX (two hex digits) to encode a single ASCII character. So the above can be written as: ivt://rohan.snipweg.wxs.nl/PROTOCOL%20SSH;NO_GUI_RESIZE All commands are synthesized into a script that is executed just like a PRECONNECT script - before the session is established. The same rules apply. Another example: ivt://rohan.snipweg.wxs.nl/USER=ruurdb This will connect to the given host and attempt to login as the given user. By default (when no user is given), IVT will use the auto login system, which will select a default user for the host. Note that this can be used from a command file (shell script) to cause new sessions to be opened inside a running IVT, or have an HTML page with links t your machines that IVT will connect and login to by clicking on those links. For this to work, there must be a HKEY_ROOT_CLASSES\IVT key in the registry o IVT will attempt to insert those values into the registry every time it is started and when it is installed. However, this requires admin priviliges, so depending on your environment, this may or may not work. The -u command line option is always available from a command file, however. If you have multiple copies of IVT running, the first one returned by Windows is asked to open a new session (the others are ignored). It is, however, against the design idea to have multiple instances of IVT, the multi-session features of IVT make this unnecessary. See also $IVT_URL_STARTUP and $URLUSER. If you view this part of the manual in a browser, you'll find an example there which demonstrates the feature.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.1: The scroll back buffer This is an important feature, others are prev/next 2: Several useful facilities of IVT 2.1: The scroll back buffer

Page: 8

IVT can store text that has scrolled from the top (or bottom) of the screen. This is one of the major features of IVT, and one that you quickly learn to rely upon. Long running make's with lots of output, error messages it back to the screen. The amount of memory that is used can be specified using HISTORY. The default number of saved screens is 10. IVT can page through the history screens by entering the pager, which is accomplished by typing one of the commands below. Once in paging mode, the AL is optional, and the keys move the screen in the expected direction: (ALT)-PageUp- One screen up. (ALT)-PageDown- One screen down. CursorUp- One line up. CursorDown- One line down. Home- To first remembered line. End- To last remembered line. ALT+s- Save history screens to file. F3,^F,/,?- Search through the buffer (see also COLORSEARCH). Using the scrollbar is an even easier way to access this history data. Also, you can use the mouse wheel to scroll. NOTE: When you use the mouse wheel, an extra feature is available. If data arrives on the session while you are viewing history, older versions of IVT Starting with version 23.0 of IVT, this data silently becomes part of the history, so when you use the mouse to scroll to the end, more and more of thi new data is displayed just as if it were part of the history data all along. This works only when you use the mouse to scroll. When you use the keyboard and try to keep up with incoming data, some of the PgDown or Cursor-Down keys would be seen as history-viewng commands (and handled locally by IVT), but when you actually catch up with the incoming data and IVT exits the viewer, all these keystrokes would suddenly go to the remote host, with unpredictable results. So, when you use the keyboard, only ESC exits the viewer and all dat that has arrived in the meantime is displayed as fast as IVT can manage. Of course, you can also cut from the screen or print it (F2). This can also be combined (use mouse or ALT+c to select part of the screen, then use F2 to print just the selected part). Typing ESC exits the pager. Typing any data-generating key other than ESC will also exit the pager and send that keystroke on the session. If you use the scrollbar or mouse wheel, the pager exits automatically when you reach the end (i.e. current screen) part of the history. You can search through the history buffer using the same method as in the IVT manual pages, which look familiar to users of VI: - The '/' character starts a search. In this case the default is to search from the end of the buffer towards the beginning (most recent data first). As an alternative, you can use F3 or Ctrl-F to start a search. Matching strings are highlighted using the colors specified using the COLORSEARCH keyword, default is a bright-yellow background. This is very convenient to quickly spot matches. - The '?' character searches in the opposite direction. Multiple matches in a single line are supported. - An 'n' command searches for the next occurrence. - An 'N' command reverses the search direction. Searches can also be started from the pager menu bar. Incoming data on a session is blocked while you are viewing history. You can switch to another session from the history-pager! However, the session stays blocked until you return it to normal mode. This allows you to view error-messages from (say) a compiler on one session while fixing them on another. For reasons of efficiency, duplicate lines are filtered from the history file For example, when the Unix 'vi' editor starts, it clears the screen, then prints a ~-character at the start of every line. Only one blank line and one line with a ~ are stored in the history file. This may sometimes distort the images of screens, but usually nothing important is lost this way. The entire contents of the history buffer (for the current session only, of

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.1: The scroll back buffer

Page: 9

course) can be saved to a file. This makes it easier to search or edit it outside of IVT. This is only possible when the secure option is disabled. To save the file, type ALT+s while in the pager (or use the menu). The "Edit" menu on the menu bar contains two items to manipulate the scroll back buffer: - Clear scroll back. This simply deletes the contents of the scroll back buffer. - Copy all to clipboard. This places the entire contents of the scroll back buffer on the Windows clipboard. This can also be accomplished by using a normal mouse copy command but this can be a time-consuming operation when you have a large buffer. Note that the 'Extra' menu on the session menu bar has a command to print the contents of the clipboard. This is an important feature, others are prev/next 2.2: Using the mouse I have gone through considerable lengths to make the mouse usable in IVT. The following possibilities exist: Configuring the default mouse action. Configure IVT to behave like PuTTY/XTERM with word-selection. Simple cutting and pasting with the mouse. Cutting and pasting with the keyboard. Advanced cutting and pasting with the mouse. Using multiple cut/paste buffers with the mouse. Programming the mouse in combination with the keyboard. Leaving the current selection visible. Resizing the terminal window with the mouse. Clicking on the various parts of the status line. Selecting a session in the F4-S screen with the mouse.

- And, of course, navigating these manual pages. Click on any of the above for more information. 2.2.1: Configuring the default mouse action. The default action for the mouse can be programmed with the MOUSE command in your IVT.RC file. The default is CUTPASTE, which means the LEFT mouse button will initiate a CUT operation, the RIGHT mouse button will paste the default buffer. The default buffer is the clipboard. You can, of course, change the mouse-action from this setup-screen and save the new setting into the registry. Furthermore, the MOUSE_KEY command can be used to program actions that are initiated when a mouse button is clicked in combination with keyboard keys. Such actions can be programmed for individual sessions (MOUSE_KEYLOC) or for all sessions (global MOUSE_KEY statements). 2.2.2: Simple cutting and pasting with the mouse The basic mouse-driven CUT operation is started by clicking the LEFT mouse button (see MOUSE command to change this behaviour). At the start of the CUT, you have a select window (the colours of which can be set with the COLORCUT command). Drag the mouse around to select the part of the text you wish to copy. When the mouse nears the top or bottom of the screen, it will auto scroll up scroll-speed. Release the mouse button, the window will disappear (DO NOT BE ALARMED). X-windows leaves the selection on-screen, which I think is wrong, since it alters the display more or less permanently. IVT will restore the application screen when you have finished a CUT operation. Update: see the LEAVE_COPY_SELECTION to change this behaviour. Update: see the MOUSE_SELECTION make IVT behave like PuTTY/XTERM. The selected area is now stored in the default buffer. It can be viewed by typing F4-K. It is also stored on the Windows clipboard, so you can paste the contents into other applications. Pasting is accomplished (by default) by using the RIGHT hand mouse button. This will actually paste the Windows clipboard again (in case you have used another application to modify the clipboard). The contents are pasted into the current session.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.2: Using the mouse 2.2.2: Simple cutting and pasting with the mouse

Page: 10

For people with a minimalist mindset, this is all you need to know. However, IVT supports various advanced actions to cut words and sentences in various efficient ways. See below for details. Please take the time to read that, it can save you lots of time in the long run! 2.2.3: Advanced cutting and pasting with the mouse. A common action is to select words and phrases from the screen. This can be done with the simple cutting, but there are quicker ways: - Click in a word, AND KEEP THE LEFT BUTTON DOWN. Then click AND RELEASE the RIGHT mouse button. IVT will select the current word. Every time you click and release the right mouse button, IVT will extend its definition of a 'word', until the entire line is selected. This works only when the current selection is WITHIN a single line. See MOUSE_SELECTION to alter this. - The F12 key accomplishes the same as the right-hand mouse button. - The PageUp key extends the selection to the top of the screen. - The PageDown key extends the selection to the bottom of the screen. - The HOME key extends the selection to the beginning of the history. - The END key extends the selection to the end of the history. - The F11 key is an 'undo', it DECREASES the selection instead of extending it (undoes mouse-click, and all listed keys). - The F2 key prints the selected area to the current printer. - Any alphanumeric key: store in a named buffer. - F10: Interpret selection as host names and connect to all of them. - The ESC key aborts the cut operation. The F1 key can be used to toggle between BLOCK-select and LINE-select. In the default BLOCK-select mode, IVT selects a rectangular block of characters. In LINE-select mode, all lines between the first and last are selected entirely (like most word-processors do). The default behaviour can be changed using the CUTMODE keyword. All these keys allow you to quickly select a particular area of the screen using the default paste-buffer. See below for a description of MULTIPLE buffers. 2.2.4: Using multiple cut/paste buffers with the mouse. The previous paragraphs describe how text can be selected and stored in the default paste-buffer. However, sometimes a single buffer is inadequate. An editor like VI maintains multiple (named) buffers to store text in. IVT can do the same. During a CUT operation you can type a single alphanumeric key. This will end the CUT-operation and store the selected text into a paste-buffer with that name. A PASTE can be done either with the mouse or from the keyboard: - Press the RIGHT mouse button and KEEP IT DOWN (when you release it, the DEFAULT buffer is pasted). Press the same alphanumeric key again, the named buffer will be pasted. - Type SHIFT+ALT+p (just ALT+p will paste the default buffer). Release the keys and then press the named alphanumeric key again; the named buffer will be pasted. Special feature: When the alphanumeric key you type is in UPPER case, IVT wil APPEND data to the buffer with the lower-case name, rather than replacing data. This is similar to what VIM (Vi Improved) does. You can use this to grab bits and pieces of text into the same buffer. You cannot append data to the default (unnamed) buffer this way. See also ESC<space>e, which allows the host to control the contents of the clipboard and the named IVT copy/paste buffers. The current contents of all named (and default) paste buffers can be viewed on the F4-K screen. Use F4-K-W to save them to a file. F4-K-R will read such files. See also the LOAD keyword in IVT.RC files. 2.2.5: Programming the mouse in combination with the keyboard It is possible to configure the mouse to send data on a session, or even to interact with the host in complex ways by means of a SCRIPT. See the MOUSE_KEY statement, which allows you to configure this, either as the default action for a mouse button or an action that happens when you press a keyboard key in combination with a mouse button.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.2: Using the mouse 2.2.6: Cutting and pasting with the keyboard. 2.2.6: Cutting and pasting with the keyboard.

Page: 11

Normally, you would perform cut and paste operations with the mouse. However, you can also perform cut/paste operations using the keyboard. You enter cut-mode by typing ALT+c. As a bonus, you can also edit the screen contents while performing a keyboard-driven cut-operation. This allows you to edit mistyped commands in environments that do not support command-editing The idea is to first move the cursor to the position on the screen that is the start of the area to cut (using cursor keys, HOME/END, etc). Then you press control (and keep it down) and use the same keys to extend the selected area. Press RETURN to terminate the cut-operation. Press ESC to abort. When you do a SHIFT+RETURN, you can type a key to store the named buffer. Valid keys while Cursor-keys HOME/END PageUp/Down TAB SHIFT+<move> cutting with the keyboard are listed below: Move the upper left-hand corner of the cut-window Move to Begin/End of line Move to Begin/End of screen Move to next tab position Triples the number of characters/lines moved. When you use Shift+PgUp or Shift+PgDown, it moves to the very top of the buffer (Up) or to the end (Down) immediately. CTRL+<move> - Extends the cut-window in the move-direction DELETE - Delete the current character from the screen. Any character - Written to screen in either Insert or Replace mode. INSERT - Toggles between Insert and Replace mode. RETURN - Yank the cut-window into default buffer, ends cut mode. SHIFT+RETURN - Waits for a key and stores contents in this named buffer. F1 - Toggles the cut mode. F2 - Print the current selection. F10 - Interpret selection as host names and connect to them all. F12 - Select the current word, use again to select current line. F11 - Undoes last select-action. ESC - Abort cut mode (all paste buffers remain intact). A keyboard paste is done by typing ALT+p (default buffer). See also SHIFT+ALT+p for pasting named buffers. 2.2.7: Resizing the terminal window with the mouse. The window can be resized in the normal Windows ways. The new size will also be communicated to the remote host if the current protocol allows it (TELNET and MULTIPLEX, for example). will cause VI to redraw the screen according to the new number of rows and columns. The new window size will be the default for sessions created from the resized one. Different sessions can have different window sizes and positions, IVT will try to make the behaviour of these sessions 'logical' (position of the window when switching between sessions of different sizes). You can also choose to propagate a size change to all sessions using the The new size can also be saved into the registry by typing F3, followed by a click on <SAVE>. The chosen size is now the default terminal size for futur invocations of IVT. 2.2.8: Clicking on the various parts of the status line. The status line in an IVT session is mouse-aware. The following possibilities exist: - Click on the numbers indicating the current and total number of sessions. The FIRST number will perform a 'switch to previous session'. This is equivalent to CTRL+Cursor-Left. The SECOND number will perform a 'switch to next session'. This is equivalent to CTRL+Cursor-Right. This allows you to switch between sessions without touching the keyboard. Another way for this is to use the WINDOW item on the menu bar. - The part that shows the the status line hostname will give the F4-S (session management) screen. Here you can click on a line that describes a session and IVT will switch to that session (equivalent to typing F4-S followed by the number of the selected session). - Clicking on the status line clock will cycle through the various possibilities this part of the status line (see STATMIDDLE).

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.2: Using the mouse 2.2.8: Clicking on the various parts of the status line.

Page: 12

- A right-click on any of the status line parts will show instant help for that particular item. - Clicking on the various icons does various logical things. Right-click on them for help. When you hover the mouse over the various parts of the status bar little tooltip windows try to make you aware of the possibilities. These can be turned off using NO_TOOLTIPS.

2.2.9: Selecting a session in the F4-S screen with the mouse. The F4-S screen allows session maintenance. It is entered by either typing the F4 key followed by an 's', or by clicking on the appropriate part of the status line. Another way is to use the WINDOW item on the session menu bar, select the "Session overview" item there. All existing sessions are displayed here. Simply double-click on the line tha describes the desired session and IVT will switch to that session. You can also rearrange the order of the sessions here by using the up/down buttons. 2.2.10: Interpret selection as host names and connect to them all If you select text on the screen using either the mouse or the keyboard and press the F10 function key while selecting, IVT will interpret all words in the selection as host names and will create an instant group of sessions to them all. This can be very convenient if you have some selection of hosts on screen that you need to correct some problem on. This function is also available from the "Edit" menu, so you can use some other application to store information on the clipboard and let IVT interpret the contents of the clipboard as host names. This function will use the current value of $URLUSER as the name of the user to login. When not set, the password learning system will attempt to find a default user. If you have disabled password learning, you will have to login manually. You can also use a PRECONNECT script to set the value of $URLUSER dynamically When the number of hosts in the selection is less than 4, a failed connection is treated normally (error messages, the session is kept so you can read the errors and close the session manually). For a larger number of sessions, the failures are quietly deleted, so if you select a large number of words, some of which are valid host names and many are not, the result will be that you end up with sessions (tabs) for the valid hosts only. 2.3: Locking the keyboard It is possible to lock the keyboard either explicitly or under timer control. Unlocking the keyboard is done by typing the password followed by a RETURN. First, the password must have been defined. This can be done by using the PASSWORD directive in an IVT.RC file. The password can be: - A simple literal word (unsafe); - An encrypted password (very safe). An encrypted password can be obtained by using the 'IVT-locking password' on this basic setup-screen. When a password is typed here, the one-way encrypted version is displayed. This 13-character long string must be used as the parameter for the PASSWORD directive in the IVT.RC file. For your convenience, the encrypted version of the password is placed on the Windows clipboard, so it can be pasted into a PASSWORD statement in your IVT.RC file. The keyboard is locked by typing ALT+L. A lock-icon (keys) will appear on the status line. Another possibility is to use the LOCKTIMER keyword in the IVT.RC file (or by setting it using setup). This specifies the number of minutes that must pass before the keyboard is locked automatically when no keyboard activity is detected. 30 seconds before the keyboard is locked, IVT will beep and start a countdown in the status line. Type a key to abort the countdown.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.4: The "Scripts" menu 2.4: The "Scripts" menu

Page: 13

IVT has had the possibility to create a "Custom" menu for many years. This start scripts of your own making. Few people use this powerful feature, so in release 21.1 is has been made more prominent. The standard configuration file of IVT now uses this to define an entry calle "Scripts", and creates 4 menu-entries in there: Key broadcasting. Project file loading. A script to manage a local address book. A "Help" entry that explains how to extend the menu (which takes you here).

By editing the IVT.RC file, or - better - overriding or extending the default configuration in your own local IVT.RC file you can start your own scripts with just a few mouseclicks, too. The standard IVT.RC file uses INCLUDE_OPT on the HOMEDRIVE/HOMEPATH environment variables to load a personalized configuration file (normally C:\Documents and Settings\YOUR NAME\ivt.rc). That file is typically intended to extend/alter (or suppress) such a menu. See the stock IVT.RC file for more examples, and the MENU keyword. See also DELSCRIPT to delete a loaded script. 2.5: Project files IVT is very configurable, through very many means, and can be used for very large projects, large groups of users, and is able to provide all sorts of powerful features to make life easier for those large groups of users. Unfortunately, all this power is not always easy to find, or to use. A script, added in December 2007, called "Projects.ivt" tries to make configuration of IVT in such complex environments easier. In short, a "project" presents itself to the user as magically appearing entries in the address book, and magically appearing "Create groups" in the GROUP menu. Connecting to a host also uses a proxy when required, and "knows" how to connect and login (ssh, telnet, special attributes, special login constraints like OS hardening, etc). In more detail, what a "project" tries to achieve is: - Provide a central place where complex IVT configuration files can be stored to be shared by all users who want it; - A single place for the address book of a project, where all hosts required for a project are named and described and specific attributes can be specified for every host or group of hosts; - Optional HOSTS files to translate names to IP-addresses for a project's hosts (for organizations that do not have DNS entries for all (temporary) hosts); - Optional SSH-key files so you are not presented with a "Host-key unknown" dialog the first time you connect to a host using SSH; - Projects can be loaded when IVT starts, using the command line or the new "Scripts" menu bar entry, or user-specific configuration files. - Project files can be private, or stored in a number of configurable places. The project files themselves must be written using a text editor. Every project has at least: - A main configuration file. The name of the file can be any name with a ".rc" extension (acme.rc). - A title. of the project. E.g.: # This is the ACME example project The rest of the file intended to have at least a bunch of HOSTLIST commands required to manage the hosts of the project. See the example files for suggestions. - Optionally, a file with the same basename as the project.rc file called project.hosts. So, if you have an acme.rc file, this would be called acme.hosts. The file must be a Unix style /etc/hosts file that can be used by the RESOLVE statement to translate host names into IP-addresses.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.5: Project files

Page: 14

It is meant to list all names and IP-addresses of the hosts in the project. If you have a decent DNS infrastructure, you probably do not need this. - Optionally, a file with the same basename as the project.rc file called project.ssh. This can contain SSH keys created by the "export keys" feature of IVT (Menubar, Setup->Setup system->SSH->Manage SSH keys->export to file) Having such a file will prevent that every user will be asked to accept the host key of a host when the first SSH connection is made. All files of a project (acme.rc, acme.hosts and acme.ssh) must be in the same directory. There is one directory built into the projects.ivt script where IV will look for project files ($IVTDIR/Projects). The standard distribution of IVT has an example project there. But that directory is private, and one of the major benefits of projects is that they can be shared by all people who work on a project. To facilitate this, the projects.ivt script will use a FORALL on variables named "PROJECTSDIR_*". Every such variable is assumed to name a directory that is searched for .RC project files. For example: GSET PROJECTSDIR_ACME_GENERAL = "Q:/Program files/IVT/Projects" GSET PROJECTSDIR_ACME_SALES = "P:/Sales/IVT/Projects" would cause IVT to look in those (network) directories for projects. It is not an error to have variables for non-existing directories, the script will simply look for valid files and ignore bad directories, bad files or empty directories. So, to summarize: - Projects can be stored in directories pointed to by PROJECTSDIR_ variables. You can set these in the main IVT.RC file (see there for examples) or on th command line of IVT when you start it. - Each project has at least one configuration file with at least a title. So, this tells the projects.ivt script where to FIND project files, but these files are not READ (loaded) automatically. There are various ways to get a project loaded: - After startup (while looking at the "Create session" panel), click on the menu bar "Scripts" entry and choose "Load project files". You can pick a single project or use the "Load all" button. - On the command line, use a PROJECT variable and assign it the basename of a project. You can also specify multiple projects, similar to project directories, by assigning multiple variables. For example, a shortcut that starts IVT might contain: IVT PROJECT_1=AcmeMain PROJECT_2=AcmeSales1 This would scan all project directories for projects named AcmeMain and load them at startup. - You can assign the PROJECT variables in other places (like the main IVT.RC file, or the ivt_start.rc file in your home directory or any other file that is included from the main ivt.rc file). - If you have few projects (or only one), a simpler way is to set the variabl PROJECTS_ALL to 1 (command line, file, wherever). This will simply cause al projects to be loaded at startup. - As a compromise, you can have PROJECTSMATCH variables, which are just like projects: PROJECTSMATCH_1="*Sales*" Would select all projects in all project-directories that have the word "Sales" in them. See the example file in the distribution directory ($IVTDIR/Projects) for an example project. Since the whole project feature is not built into IVT itself but handled entirely by scripting, you are also free to modify or extend the script itself to better suit your needs.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.6: The session groups editor This is an important feature, others are prev/next 2.6: The session groups editor

Page: 15

A major new feature was introduced in version 16.1a of IVT - the group editor Before, the very powerful CREATEGRP statement was available only to people who took the trouble to read the manual, understand what it was trying to say, then use a text editor to edit the IVT.RC file and add the proper incantations. The reward would be the creation of multiple sessions with a single mouse click, all of them logged in and ready for action (if you are new to creation groups, you are urged to read this). However, it appeared only a small percentage of the user base actually found this functionality, so 16.1a adds a number of dialogs which require only the use of a mouse and a few keystrokes to add and maintain group definitions. These definitions are stored in the registry, are loaded on start-up and can be modified and deleted at any time. Obviously, CREATEGRP and CREATE statements in the IVT.RC file still work as before, but these cannot be edited with this interface (if you try you wil get an error message, but interactively created groups and groups from the IVT.RC file are all shown together and are started the same way). The editor is available from the F4-G screen (or the <GROUPS> button from the login dialog, and various other ways). It contains <ADD>, <EDIT> and <DELETE> buttons. The <ADD> and <EDIT> bring you to a dialog that allows the maintenance of a single group. A group is identified by its name and an optional description which will appear in the F4-G screen. You can also specify an optional script and parameters here. When given, the script is executed before the first session in the group is created. It can b used to set global variables to be used by all sessions in the group. The parameters are parsed before being used, for example: "First parameter" "Second parameter" will pass two parameters to the script. Use quotes to protect parameters with spaces in them. For descriptions of the "Preconnect" and "Onconnect" scripts, see the details at the CREATEGRP manual page. One of your groups can have the "Start group when IVT starts up" option set. If you check this box, IVT will pretend you have used the "-agroupname" command line option, and start all the sessions in the group automatically every time you start IVT. The saves you the trouble of having to create a special shortcut with special options to start IVT in a special way, at the price of ALWAYS having the sessions created when you start up. Only ONE group can have this checkbox set. attributes are shown in the dialog box. Choose <ADD> or <EDIT> to get a dialog to define a single CREATE statement. The attributes are: - Host name. This is the name of the host you want to connect to. If you want to connect to a non-default port, use hostname:portnumber. - User. This is the name of the account you want to use. It is assumed that you have logged in before to that host with that account, and IVT has used its password learning system to learn the password for that account. Because only when IVT can do the actual login and get to a prompt, will it be able to run a script and initialise the session. Besides basic user-id passwords pairs, IVT can use Kerberos authentication and SSH key pairs. - Protocol. This is the PROTOCOL string for the session. You can use a few abbreviations like TLN (WINSOCK,TELNET), SSH (WINSOCK,SSH) here. It has to be a valid specification of an IVT supported protocol. - Group code. This is the application group code. Basically, all sessions with the same group code behave as if they run in a separate instance of IVT. The current group is shown in the status line. - Repeat factor. Leave empty for a normal, single session. Any number you enter will clone that many sessions, which differ only in the comment (it shows the cloned sequence number). Be careful: if you enter 500 here, IVT will attempt to log you in 500 times in parallel (and it might even succeed), but few hosts will take kindly to such abuse. - Start in a new window. When this is checked, the session is not created in the current instance of IVT, but a separate instance is started (a new window opens) and that IVT does all normal startup and then connects to that particular single host. See "Starting a session in a new window" for more information.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.6: The session groups editor

Page: 16

- Title. This ends up in the status line for that session as comment. What you enter here overrides the automatic comment (user@host + number). - Script. The name of the script called when the session is established. See below for details. - Params. Optional parameters for the optional script. These last 2 items offer very interesting possibilities. Take, for example, the script from the IVT.RC standard distribution called DirCmd (for change DIRectory and run a CoMmanD). It takes 3 parameters, the first being a directory, the second being a command to start after changing to that directory, the third the optional name of yet another script. The DirCmd script looks like this: Script DirCmd dir cmd ScriptNm HIDE LOCAL x # Give a decent error message when this script does nothing... x = Call IvtWaitLoggedIn IF $x == 0 THEN\ ECHO Concat("DirCmd: Cannot do ", \ ($dir != "") ? "CD $dir " : "",\ ($cmd != "") ? "do $cmd " : "",\ "because login failed or is disabled.\n") : \ RETURN # When a directory is passed, CD to it. IF $dir != "" THEN Send "cd $dir\n" : \ Call WaitPrompt # When an initial command is given, execute it IF $cmd != "" THEN Send "$cmd\r" # If a scriptname is given, call it IF $ScriptNm != "" THEN CALL $ScriptNm END So, you could set the "Script" field to "DirCmd", and the "Params" to e.g.: /tmp "ls -lab\r" MyScript Note that the parameters are parsed as if they occurred in an IVT.RC file, so they can be string expressions, reference variables, and so on. Quotes are significant and important when you have spaces in arguments! The example will change directory to /tmp, run ls -lab there, and then call the MyScript script (this will have to be written with a text editor, but it is optional, i.e. normally you will pass only two parameters to DirCmd). After defining any number of entries for the group, click OK and you will return to the F4-G screen. All definitions are automatically saved for you. The defined group can now be launched by double-clicking it (or select it and click the <LAUNCH GROUP> button). 2.7: Fixing broken groups As explained in the previous chapter, a CREATEGRP is a very powerful way to quickly create and initialise a number of sessions. If you use this feature often, you'll find that you rely on the fact that certain sessions are in test runs, etc). However, sometimes one or more of these sessions can be lost due to network outage, machine crashes, accidental logout, etc. This leaves you with one or more "holes" in your logical ordering of sessions: a broken group. One way to fix that would be to manually create the missing sessions and drag them to the proper position using the tab bar or the session re-ordering dialog. A better and quicker way is to use the "Fix" button in the create session groups dialog (Sessions->Start groups of sessions). If you select a group there that has one or more sessions missing, but at least ONE session of a group left, clicking it will re-create the missing sessions in the proper sequence and place, restoring the normal situation. When zero sessions of the current group are left, or all sessions of the current group are still intact, the "Fix" button will be disabled (you can't fix it if it ain't broken). If you have a CREATEGRP script, it will be run again with an adjusted value o the $IVT_GROUP_COUNT variable (the number of missing sessions). The current state of a group can also be queried using the QuerySetting

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.7: Fixing broken groups function with an argument of GROUPSTATE.

Page: 17

When you use IVTFUNCTION to start a group fix, the 3d parameter must specify the name of the group to fix. 2.8: Starting a session in a new window. The CREATEPROT statement (used in an IVT.RC file) and the interactive session group editor both allow you to specify the "NEWWIN" option, indicating that a particular session should be started in a separate instance of IVT (in a new window). Actually, this feature goes against the general design of IVT, which is a "multi-session terminal emulator". The multi-session features allow you to create and manage many sessions in a single instance of IVT. The idea behind its design is that you have one large window to view all that goes on in all sessions. Still, some users are so used to having a window-per-session that they have trouble working any other way. This NEWWIN feature is intended to allow such users to use the session-group features of IVT, so they can still create many sessions with a few mouse-clicks. Of course, you can always start multiple copies of IVT and run single session in them, but is is tricky to manage that properly when you have many sessions In a normal session group, all sessions have the same size and color scheme, and share a single window position. You switch between the sessions by using the tabsbar, the keyboard or the mouse. When you want to start a group of more than two or three windows, it becomes necessary to automatically position and size the various windows on your monitor. The easiest way is to assign a profile to each session that you start in a group. For example, suppose you have a group of 5 sessions, and you want to run each of those sessions in a separate window. You want each window to have its own size and position, and possibly color scheme. To set this up, do: - Startthe first session manually, and size and position it as you like it. - Change other attributes (like colors, or any other setup item). - You probably want to turn the tabsbar off, since there is not much use for it in an IVT running only a single session (Setup, windows setup, uncheck the "TABs bar enabled" option). - Similarly, you may want to turn the menu and status bar off, to save space. - Go into setup (F3), click on "Window setup". - For "Window position", choose "Positioned". - Click "Ok". - In the main setup panel, click on "Save as". - Type a name for the current setup, like "group-1". - Click "save". You have now created a session profile (called "group-1") for the first session in your group. This profile stores all the ALTERED setup attributes of the session. Repeat as required for the other sessions, uniquely naming the profile (like group-2, group-3, etc). Now create the group. If you use the interactive group session editor, enter the name of the profile (group-1, group-2) in the "Profile" text field and check the "Start in a new window" checkbox. If you use CREATEPROT statements in an IVT.RC file, use the PROFILE=group-x clause and the NEWWIN option. Now you can start the group. Every session that has the NEWWIN attribute will start in a new window and gets the specified profile assigned to it. The profile will load and apply all settings (size, position, etc.) for that alter it, and re-save (overwrite) the profile. Note that all your profiles are based on the default profile. So, if you change a setting in the default profile which is not explictly set in the group profiles, the group-profiles will inherit the new default setting. That can save lot of work when you want to change a default setting and you have many profiles. This is an important feature, others are prev/next 2.9: Learn mode & Keyboard macros It is possible to store a number of keystrokes under any key so when that key is pressed the pre-recorded keystrokes are 'played'. A key can be programmed in learn mode. Programmed keys can be saved in the F4-K screen and loaded upon IVT start-up by the LOAD command in an IVT.RC file. Alternatively, programmed keys can be saved as part of setup, either as the default profile or a special profile.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.9: Learn mode & Keyboard macros

Page: 18

Learn mode is entered through this setup screen (choose the button labelled <Keyboard macros>) in setup. An 'L' is a shortcut for this button. SUMMARY: - Every possible key-combination can be programmed, the macro recorder can (optionally) distinguish between left & right shift, left & right alt and left & right ctrl keys. - Optionally, the current state of the CAPSLOCK key, the NUMLOCK key and the SCROLL-LOCK key can be programmed, so you can have separate sets of keyboar mappings for all combinations of Ctrl/Shift/Alt/Caps/Numlock/Scroll-lock! - Optionally, you can distinguish keys on basis of the scan-code, so e.g. the DEL key on the numeric keypad and the DEL key on the main keyboard can be distinguished. - You can have macros for *all* sessions or just for the current session. - Recorded keys can be saved to a file and loaded on start-up of IVT, or save as part of setup. Every programmed key can either: - Be the equivalent of a predefined string. The string is evaluated when the key is pressed and can reference script variables. - Play a recorded sequence of keys using the recorder. Optionally, the recorder will also record the delays between keys and use the same delays when the key is played back. There is no limit on the maximum length of a recording, other than imposed by available memory. - Invoke a script, either synchronously (the script must be simple and quick and is not allowed to do a blocking operation such as a WAIT) or asynchronously (a THREAD is started in the background and can do whatever it likes and take as long as it needs). Synchronous scripts are useful to perform actions in a known order, since IVT waits for every invocation of the script to finish before processing the next keystroke. Asynchronous script are useful when you want to start a complex action when you type a key. See also KEYMACRO, BIND and BIND_ASYNC. Type F3 and click on "Keyboard macros" to bring up a dialog that allows you to treat one key at a time. First, you have to choose the key to program (or handle otherwise). Click on the button marked <Choose key to program>. The key you type next is always treated "raw", so if there is an action associated with that key it will not be executed when you type it now. The original dialog will now show the full name of the key you typed, according to the options selected below. There are a quite a few options you can choose: - This session only. When selected, the key will have special meaning for the current session only, all other sessions are unaffected. but is lost when IVT exits (but see <Read/Write macro files>, and you can save ther current setup and the keys will be saved as part of that). When the key already exists in the selected context, the <Delete key> button is enabled. It can be used to delete the programming of the selected key, so the normal meaning of the key is restored (unless an identical key is programmed in another context). - Match LEFT/RIGHT Shift/Ctrl/Alt. When any of these is selected, IVT will distinguish between the left and right keys on the keyboard when the key is defined, and only match the key when typed in the same way. It even distinguishes *both* keys being pressed simultaneously, so you can program a key by itself, the same key leftshifted, right-shifted and both-shifted, each combination is a uniquely recognized key-macro! If that is not enough, you can also combine shift, ctrl and alt, so you might have "Right-Shift + Left-Alt + Right-Ctrl + F7" if you can manage to press all those keys together! When an option is selected, the name of the key will change to show the significance of the left/right selection. When an option is deselected, the choice of left/right is unimportant. The name of the resulting key can be stored on the clipboard using the button "Copy text to clipboard". This is for use in a KEYMACRO command that you could enter in an IVT.RC file. - Match CAPSLOCK/NUMLOCK/SCROLL LOCK. When the above is still not enough, the state of the locking keys can also be taken into account. When these options are selected, the state of the

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.9: Learn mode & Keyboard macros

Page: 19

locking keys during definition of the macro must match the state when the key is typed. This allows you, for example, to have one set of key definitions when Scroll-Lock is off, and an entirely different set when Scroll-Lock is on! And yet other sets for all the possible combinations of Capslock, Numlock and Scroll-lock! When an option is deselected, the state of that particular key is unimportant. However, you will find it hard to type a lower-case character when CAPSLOCK is on and you have programmed a lower-case character :-) - Match Scan Code. Some keys have duplicates on some keyboards. Common examples are the INS and DEL keys on both the numeric keypad and the main keyboard. Others are the cursor keys, PageUp/PageDown and so on which are duplicated on the numeric keyboard when NUMLOCK is off. Normally, when you program the PageDown key, any of the duplicates can be typed to trigger the macro. When this option is selected, IVT distinguishes (on the internal scan-code) which key you used during definition of the macro, and you must type the exactly same key to trigger the macro. - Recursive expansion. When not selected, the key that you program can contain keys that are also programmed without expanding them. When selected, typing keys that are already programmed while programming a key will result in the playing of that second key. As an example, suppose ALT+p (paste the default buffer) is programmed to emit bar. If you now program ALT+b to be fooALT+p, the result will be foobar WITH recursion, and fooALT+p WITHOUT recursion. In the first case, reprogramming the ALT+p (default paste buffer) has no effect on the ALT+b, in the latter the new contents will be pasted. Various fields and buttons will be enabled or disabled according to this choice. All selections are retained between various macro-definitions so you can quickly create many similar definitions. - <Delete key>. When you choose a key that already has a definition in the selected context (session or global), this button will be enabled. Clicking it will remove the definition (and all recorded data and associated settings) for that key In other words, this restores the standard action for the particular key. Note that you can have key-macros for both the session and the global list, so you may have to delete TWO key-definitions to make a key "behave" again. Type of programming. When you type a programmed key, the action the macro can take depends on this setting. It can be 4 different actions: - Keyboard recorder. You must record the keys once (after pressing <Start recorder>). IVT will remember everything you type until you end the recorder (either by pressing Ctrl+Shift+End, by using the menu bar or by using F3-L. When the key is typed, playback is at maximum speed. - Keyboard recorder + timing. Same as above, but IVT also records the delays between the keystrokes as you type them, and uses the same delays when during playback. Be careful: Long recordings take long to play back, and during this time the keyboard - by its very nature - cannot be used for other tasks! The time to the FIRST keystroke recorded is reset to zero, so you can start the recorder, organize your thoughts and then record a macro quickly and efficiently. When you play the macro, the first keystroke is played immediately, the rest at the same speed as you typed them. The maximum delay between 2 keystrokes is 32 seconds. If you wait longer than that, IVT silently records 32 seconds. - Fixed string. The string you type here is actually a string expression! It can contain special characters (\n, \t and so on), hexadecimal characters (\XX where XX must be two valid hexadecimal digits) and even references to IVT script variables. The expansion is done every time when the key is typed, so this can be used for various tricks. If you want to send a $ sign, make sure you escape the $ sign with a backslash. By defining an EMPTY string, you effectively DISABLE the key, since it will evaluate to nothing. If you want to program an ESC sequence, you can do this like: \1B[17~ Since the "\1B" is an escape character. The field can be much longer then it would seem - the contents of the textbox will scroll as you type. - Script call Script call You will have This field is blocking. asynchronous. to specify a value for "Script to invoke". - like the one above - a string expression. Every time the

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.9: Learn mode & Keyboard macros

Page: 20

key is pressed, IVT will read the FIRST token from what you type here and evaluate it as a string expression. The result should be the name of a valid script. The rest of the string you type is seen as a list of expressions that are passed as parameters to the script. The field can be much longer then it would seem - the contents will scroll as you type. A script can either be: blocking or asynchronous. Blocking means that when the key is pressed IVT executes the script and waits for it to complete, the script will be killed when it attempts to perform a blocking operation. Asynchronous means the IVT will start a background thread for the script and continues immediately, it does not wait for the processing of the script to complete, and thus there are no restrictions on what the script is allowed to do. Note that IVT can become quite busy if the scripts you invoke in async mode takes a long time and you press the key repeatedly, since many instances of the script will run simultaneously. Perhaps this script feature is best illustrated with a few examples: MyMacro a Results in the script "MyMacro" being called with a single parameter with the value "a". MyMacro "Test Example" demo Two parameters, one containing a space. $COMPLICATED "$IVTBUILDNR" demo 2 First obtains the current value of the variable "COMPLICATED", interprets that as the name of a script, calls it with 3 parameters, first of which is the value of a built-in IVT variable and the next two are constants. When the script does not exist, you will get an "Undefined script" error message. - Internal IVT function. The key is tied to one of the internal functions of IVT, see IVTFUNCTION. You will have to select the desired function from a long list. This allows you to re-assign all the built-in features of IVT to key combinations you desire. For the "Fixed string" or "Script call" types you will have to click <OK>. When you click on the <Start recorder> button, programming will start for the other types. You will now be returned to your session. Everything you type will now be remembered 'under' that key. The status line will show an icon to indicate learn mode ON. Programmed keys can be nested (when recursion is in effect) up to ten levels deep. There is no practical limit to the length of the recording. Mouse action is NOT recorded. Ending learn mode can be done by clicking on the menu bar (Keyboard, Stop recorder), or by going to setup and clicking on the <MACRO> button again (which will now be labelled <END MACRO>. You can also type SHIFT+CTRL+END. You can also click on the recorder icon in the status line, and it will disappear (stop the recorder). you may have to use the exact same keys (left/right shift, ctrl and alt), and optionally have to match the Capslock, Numlock and Scroll-lock keys. character executes the macro. All the macro's you program can be saved to the registry by saving setup. Keys can also be saved to file using F4-K-W. The resulting file can be read using F4-K-R or the LOAD keyword in an IVT.RC file. For your convenience, the <Read/Write macro files> button is a shortcut to th F4-K screen, where you can click on <Save keys>. Files can be loaded interactively there by clicking on <Read keys>. There is no way a key can be edited, but it can always be re-programmed or restored to the standard meaning by clicking on <Delete key>. The Unix keyp program can also be used to program keys. This allows per session function keys AND keyboard macros to be defined by a UNIX application See also KEYBOARDMOD for simple key translations, and BIND to bind scripts to a key from an IVT.RC file. Most of all, see KEYMACRO to allow complex key-combinations to be defined in the IVT.RC file.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.10: Help on help - The IVT manual system 2.10: Help on help - The IVT manual system

Page: 21

IVT comes with its own built-in hypertext manual. You can get into the help system in many ways: By clicking on the HELP button in the create session dialog; By right-clicking ANY button, field or other dialog item; From the session screen by typing F4 (Help) followed by F1; Type F1 in any setup screen; Right-click on parts of the status line; Right-click on any menu-item; by invoking IVT with the -h option; and so on...

Exiting the manual-page system is done by typing ESCape. Click here for a list of valid keys in the help system. You can scroll through the manual using the normal means (Cursor Up/Down, PageUp/Down, Home and End will do the expected things). You can also use the mouse to click on the appropriate places on the status line. You can, of course, also use the vertical scroll at the right of the screen. This bar also shows the size of each item. Use F5 to go to the previous topic, F6 to go to the next topic. The manual is a hypertext manual, which implies that there are words on the screen that are links to other parts of the manual. A link has to be selected first (by using the TAB key until that word is highlighted). The link is then followed by typing RETURN. This will take you to the appropriate part of the manual. You can, of course, also simply CLICK on a link with the mouse. Pressing BACKSPACE or clicking the RIGHT button of the mouse will return you to the previous place in the manual. IVT maintains a list of place when you follow hyperlinks, so you can backtrack your links. You can, at any time, find where you are located inside the manual-system by typing an l for (Location) a w (for Where) or an F8. This will show a popup with the name of the chapter, topic (if any) and paragraph (if any). This is taken from the table of contents which can also give you an idea about the contents of these manual-pages. You can also search the entire manual for a word or phrase. Type a ?, or a / will prompt you for a word or phrase (just like VI!). CTRL+f also works (just like Internet Explorer). IVT will first check any word you type against the known list of keywords and topics in this manual. When a match is found, that topic will be jumped to. This first topic-matching search is case insensitive. So, for example, if you type 'if', this will get you to the manual page of the IF statement, rather then one of the 2106 occurrences of the string 'if' in these manual pages :-) If no match is found, the search restarts at the start of the manual, looking for a not-so-strict match. Typing an n will take you to the next occurrence of the word or phrase, typing an N will take you to the previous occurrence (looks like VI!). When no (more) matches are found, you will get a message stating this. Normally, searches are case-sensitive, but you can toggle this with a C or c (for case). A popup will show the current setting. The nearest hyperlink to the search-phrase will be automatically selected. You can save the current topic to a file using ALT+s. This is especially handy for the examples - save them and they are ready for use in your own IVT.RC files. Finally, you can print the entire manual (or parts of it) by typing F2. You will be prompted to select the appropriate part to print. Printing will be done on whatever printer is selected. You can print the entire manual, the current chapter (with all the topics and paragraphs it includes), the current topic (with all the paragraphs it includes) or the current paragraph (all the pages it includes), or just the current screen. Whenever the printed output covers more then a few items, IVT will automatically generate a printed table-of-contents with correct page numbers. Every page will also have a header showing the chapter, topic and paragraph names where appropriate. Topics are separated from each other by a solid line 2.11: Hypertext help keyboard commands TAB- Position cursor on the next hyperlink. RETURN- Follow currently selected hyperlink. Can also be done by left-clicking on this link. BACKSPACE- Return to previous place (return from hyperlink). Can also be done by clicking the right-hand button of the mouse. F6- Next topic.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.11: Hypertext help keyboard commands CursorRight- Next topic. F5- Previous topic. CursorLeft- Previous topic. /- Search for a string in the manual pages. Case sensitivity can be toggled using the C command. ?- Alias for / (search string). c (or C)- Toggle case-sensitivity of the / command. Default off. n- Search Next search-string (set via / command). N or P or p- Search Previous search-string). l- (lower case L). Show current Location in popup (generated from the Table of contents. w- Where am I (alias for l). F8- Another alias for l command. F1- Jump to Help-On-Help screen (or THIS screen). F2- Print part of a manual (screen, topic, chapter, manual). ALT+c- Enter CUT mode (to cut from manual pages). Spacebar- Scroll down one page. PageDown- Scroll down one page. PageUp- Scroll up one page. CursorDown- Scroll down one line. CursorUp- Scroll up one line. HOME- Jump to start of current topic. END- Jump to end of current topic. H- Jump to start of manual (HOME). ALT-s- Save current topic to a file. 2.12: Save current help-topic to a file.

Page: 22

One of the nice(r) features of the help-system is that it allows you to save the current topic to a file. This is achieved by typing ALT+s while viewing a topic. the table of contents). When you acknowledge this popup with a RETURN (ESC aborts), you will be asked for a filename. When a valid filename is given, IVT will write the topic to the file you specify. Since I assume you want to use this feature to save examples of configurations and/or scripts, the following modifications are made to the output in the file: - A comment is generated that names the chapter, topic and paragraph this came from (as shown in the initial popup). - All lines that are NOT valid IVT.RC lines are prepended by a # character to turn them into comments. This way, you get annotated files that can be read directly as part of IVT.RC files. Note: Saving files is impossible in secure mode. 2.13: Encrypting .RC files IVT.RC files can contain passwords as part of logon-scripts. To avoid readabl passwords in such files, IVT can read DES-encrypted files. Also, you might have other reasons to make your IVT scripts non-human readable. This is, by the way, how the IVT password learning system works. To set this up, do the following: - Write an IVT.RC (include) file using any editor. The file could contain a SCRIPT (for example, 'IvtLogMeIn') that knows how to log you on to a particular host as a particular user. Examples are included. - Use an INCLUDE statement to include this file from within your 'main' IVT.RC file (makes maintenance of the rest of the configuration easier). - Crypt this file using SETUP (choose <Crypt files> to take you to the encrypt/decrypt panel). Choose a safe password, and do not forget it! - Alternatively, choose the 'Default' password. This is a password that cannot be typed by a user (8-bit characters). This means that the file cannot be decrypted ever again! Keep a copy of the plain text file in a safe place (floppy). For an alternative approach, see the CRYPTPWD statement, though. Upon start-up, IVT will ask for the proper password whenever it encounters an encrypted .RC file. When you do not know the proper password, type ESC (this will skip that particular .RC file). When you have multiple encrypted files, IVT will attempt to use the same password for all of them, and automatically prompt for all files that have different passwords. it will not ask for a password at all.

IVT User Manual, Version 23.0 2: Several useful facilities of IVT 2.13: Encrypting .RC files

Page: 23

The encrypt/decrypt feature can be used to encrypt ANY file. The algorithm is a slightly modified DES, and a proprietary IVT file format (i.e. pretty safe) You can also manipulate encrypted files using SCRIPT functions: - CRYPTFLPWD: Set the password to use for a particular file; - CRYPTFL : Encrypt a file, either one-way or decryptable; - DECRYPTFL : Decrypt a file. 2.14: Secure mode When you pass the -s option on the command line or use the OPTIONS command in an IVT.RC file, IVT switches itself into secure mode. This mode is intended to lock users into a particular session on a particular host without possibilities to create extra sessions, invoke sub shells or otherwise change the environment in which they work. See also IVT_DIALOGSTATE. This more or less assumes that you use IVT on an MS/DOS PC without windows, since on Windows PC's there are plenty of other ways a user may gain access to the environment. Anyway, when IVT works in secure mode the followin things are not allowed: from the sessions (see getting files and running commands). Start a sub shell with CTRL+F6. Use of file transfer. Creating new sessions with CTRL+PgUp or CTRL+PgDown. Reading or writing key-bindings from the F4-S screen. Saving topics from this help system to a file. Saving the history data to a file. Dynamically adding a printer from setup.

In other words, everything to do with files and processes is forbidden. Also note IVT_DIALOGSTATE, which allows you to disable buttons, menu items or any other part of the IVT dialogs and menus. See also the NO_STATUSCLICKS option. 2.15: Challenge response protocol As described in the development history of IVT, on of the reasons for writing my own terminal emulator was to support a secure login protocol. That protocol is still part of IVT, even though not many hosts are capable of issuing the challenge and checking the response. The LOGINC program can be incorporated into most modern Unices. It is part of the distribution kit of IVT. It should be substituted for "/bin/login", at least for sessions initiated from IVT (TELNET/RLOGIN and/or serial connections you want to protect). Usually, you can specify the login program on the command line of "telnetd" in your inetd.conf file. for a "Password:" (which will appear on screen) and issue the challenge. IVT will recognize the challenge. The next line of input you type is used to calculate the response. When you hit ENTER this response is transmitted back to LOGINC, which will check it. When OK, it is accepted as a normal password would have been, when not, it will ask again for a password (just like a normal login program would). The upshot is that login using challenge/response is totally transparent. I have changed IVT to issue a message Challenge received so you can see that it actually happens! 2.16: Show current cursor position Sometimes, when you have a very large screen and a relatively small font and cursor, it is hard to find where the cursor is. The IVTFUNCTION "Show current cursor position" briefly flashes a large red cross through the cursor so you can easily locate it. The idea is to use a KEYMACRO to bind this function to a key you find easy to remember so you can hit that key to find the cursor.

IVT User Manual, Version 23.0 3: IVT FAQ: Frequently Asked Questions 3: IVT FAQ: Frequently Asked Questions

Page: 24

This chapter lists the answers to the most commonly asked questions about IVT. This is intended to be as complete as possible. Please mail to ivtsupport@softwarevoordelig.nl if you find anything missing. How do I start a new session? How do I exit a session? How can I select words/phrases on the screen with the mouse? How do I view scrolled-away data? I want to use colors. Can IVT do it? How do I change and save the configuration of IVT? The status line of IVT is hidden by the Windows taskbar. What to do? CAPSLOCK seems to have no effect! IVT beeps every time I touch a key Password learning does not work if I don't HAVE a password Can I use ALT as meta-key for EMACS? Could IVT be used to emulate the MS Windows command prompt? Why is there no Linux (or Unix) version of IVT? Host-printing (controller mode) does not seem to work HP-UX bizarre one-line display on bottom line problem IVT fails VTTEST tests it claims to pass! 3.1: How do I start a new session? QUESTION I hear IVT is multi-session. How do I create an extra session? ANSWER Lots of ways. - Click on the SESSIONS part of the menu bar. - Ctrl+PageDown is the most common one. - Ctrl+PageUp is another one, which will prevent auto-login. - Use a CREATE statement in an IVT.RC file. - Use a CREATEGRP statement in an IVT.RC file. - Use a FORK. Go to FAQ start page. 3.2: How do I exit a session? QUESTION How do I quit sessions? How do I get out of IVT? ANSWER Normally, NO_RECONNECT is in effect, which means that logging out of your hos will normally make the session disappear. Quitting the last session will cause IVT to exit. When RECONNECT is in effect, IVT will automatically reconnect to the same host whenever the session is normally terminated. Use ALT+F4 in this case to force a hang-up. Another way is to use F4-S (or click on the hostname part of the status line) and use the DEL key. You will be asked to confirm the kill. When the last session is deleted, IVT will exit. However, see EXPLICIT_EXIT t change this. Yet another way: Click the close button. IVT will cleanly kill all sessions and exit ASAP. Go to FAQ start page. 3.3: How can I select words/phrases with the mouse? QUESTION How can I quickly select words or phrases for pasting? ANSWER Configure the mouse for CUT/PASTE (default). Point the mouse somewhere in the word. Click-AND-HOLD left mouse button. While holding the left button, click-and-release the right-hand button. Every time you do a right-click, IVT extends the definition of 'word'. (unlike X, which leaves the selection visible). Click right-hand button to paste (or type ALT+p). See here for more info. See also MOUSE_SELECTION, which allows a more traditional multiple-click selection mode to be configured. Go to FAQ start page.

IVT User Manual, Version 23.0 3: IVT FAQ: Frequently Asked Questions 3.4: How do I view scrolled-away data? 3.4: How do I view scrolled-away data?

Page: 25

QUESTION When data has scrolled of the screen, how do I get it back? What if I want to store more lines? ANSWER Type Alt+PgUp or Alt+CursorUp or Alt+Home or Alt+End to enter the viewer. The status line shows the amount of history data. The scrollbar or mousewheel is a better way in newer versions of IVT. The HISTORY command can be used to configure the number of retained screens. Go to FAQ start page. 3.5: I want to use colors. Can IVT do this? QUESTION I have this application (like Midnight Commander or the vim editor) that normally displays beautiful colors on the console. It looks drab in IVT. ANSWER To be compatible, IVT transmits 'vt220' at the terminal type to TELNET hosts. The host thinks a vt220 is a monochrome terminal, thus it will not send color commands. The solution is to install the ivt.tic file from your distribution on your Unix box (it must be compiled with the terminfo compiler called tic). This will add an ivt terminal-type to the terminfo database of the host. Next, instruct IVT to transmit 'ivt' as the terminal type: TELNET_TTYPE "ivt,vt220" The vt220 is used as fallback in case you connect to some other host that doe not have the 'ivt' terminfo entry - see TELNET_TTYPE. Now, you should see 'ivt' in your TERM environment variable. Unix curses programs supporting color should now work. BTW: Midnight commander can be forced into color mode using 'mc -c'. Go to FAQ start page. 3.6: How do I change and save the configuration of IVT? QUESTION I want to make changes to the setup of IVT but can't be bothered to learn all that complex IVT.RC stuff. ANSWER Use F3 to get to the setup screens (or use the menu bar). Try the myriads of settings there. Modifications will only affect the current session. When you are satisfied, click on SETUP and "Save into registry". Choose the default profile to change default startup settings. Save as another profile allows you to select that profile when creating a new session. See "IVT and the Windows registry" for details. Go to FAQ start page. 3.7: The status line of IVT is hidden by Windows. What to do? QUESTION When the screen can happen that screen. Part of task bar at the size of IVT is set to 100% using the WINDOW_SIZE command, it the resulting window is slightly too large for the physical the TITLEBAR or the status line is obscured by the Windows bottom of the screen.

ANSWER Option 1: Use 98%, or 95% instead of 100% for the screen size. IVT will calculate the number of rows based on the font and such, and should end up with one fewer row. Option 2: Use the WINDOWPOS command with a small negative value for the Y coordinate. This will position the top of the window off-screen, making the bottom of the window visible. A value of -6 (six pixels) usually suffices. Go to FAQ start page.

IVT User Manual, Version 23.0 3: IVT FAQ: Frequently Asked Questions 3.8: CAPSLOCK seems to have no effect! 3.8: CAPSLOCK seems to have no effect! QUESTION CAPSLOCK is on, yet IVT still produces lower case! ANSWER It's not a bug - it's a feature - see CAPSLOCK! Go to FAQ start page. 3.9: IVT beeps every time I touch a key What gives?

Page: 26

QUESTION Every time I type something, or every time the host sends something, IVT rings the bell. How do I turn the noise off? ANSWER You probably typed ALT+a (toggles Alert Mode). Again, it is a feature, not a bug, meant to wake you up if the machine is quiet for a long time before producing some output. Another ALT+a disables it. Go to FAQ start page. 3.10: Password learning fails if I don't HAVE a password QUESTION The password learning system does not recognize that I am already logged in, it keeps waiting for a "Password:" prompt until it times out. This account has no password... ANSWER Correct. It is surprisingly difficult to analyse all different responses hosts can give when logging in. Therefore, you have to tell the system explicitly to set an empty password. Use F4/X, choose the password learning configuration. From the menu, choose "Add a user manually". When prompted for the password, type RETURN. Of course, not having a password is not such a good idea... Go to FAQ start page. 3.11: Can I use ALT as meta-key for EMACS? QUESTION I use EMACS extensively, how can I get IVT to send meta- commands (i.e. M-x <command>). I can, of course, use ESC-, but is there I way to get the ALT key to function as a meta key? ANSWER Yes. IVT supports keyboard macros that can be used to customize the keyboard. Newer versions of IVT support the EMACS command. Go to FAQ start page. 3.12: Could IVT be used to emulate the MS Windows command prompt? QUESTION Could IVT be used to emulate the MS Windows command prompt? ANSWER Short answer: No. Long answer: Just because a Unix (or VMS) prompt looks like the CMD prompt of Windows does not mean they are the same thing. IVT uses some sort of transpor protocol to connect to a host (telnet, rlogin, ssh) and the host talks back i a well-defined way. There is no such protocol to connect to a command prompt on Windows. There *do* exist telnet servers for Windows which turn the Window machine into something that IVT can connect to, but then it is not IVT doing the hard work. Depending on how well such a telnet server works, you may be able to run multiple IVT sessions to it and use IVT's session switching and cut/paste. But even then, if you start anything on the CMD prompt that requires a GUI interface (and even NOTEPAD needs that), it won't work, since the TELNET interface is restricted to text only. On the other hand, if you install Unix-like text-utilities such as available from Cygwin, that might provide a workable environment. See also the next FAQ: Why is there no Linux (or Unix) version of IVT?

IVT User Manual, Version 23.0 3: IVT FAQ: Frequently Asked Questions 3.13: Why is there no Linux (or Unix) version of IVT? 3.13: Why is there no Linux (or Unix) version of IVT? QUESTION Why is there no Linux or Unix version of IVT?

Page: 27

ANSWER IVT is a VT220 emulator for the Windows platform. When you run on Linux (or Unix), a text-mode application is already running on a terminal (such as a console). Emulating a terminal is done by the operating system, so IVT would be solving a non-existent problem. Even if IVT were ported (for example because its emulation of a VT220 is better and more complete than what an Xterm has to offer), a platform like Linux already offers multi-session (multiple windows), TELNET, RLOGIN and serial lines support. What people usually mean is "I would like to use the session switching and cut/paste possibilities of IVT in my Linux environment". I consider that a compliment, since this indicates that these mechanisms are better in IVT than in operating systems such as Linux. Porting IVT to Unix is possible, but it is a huge amount of work: - Fundamentally different way of doing mouse, keyboard and screen I/O; - Very different way of doing serial I/O; - All the special Windows stuff (resizing, titles and so on) has to be rewritten. In other words, it would be a re-write, not a port, and I have not got the time to do it in, so sorry. Go to FAQ start page. 3.14: Host-printing (controller mode) does not seem to work? QUESTION When the host tries to print data on an IVT-connected printer, it produces a print job but the printer prints nothing. ANSWER Your printer driver probably does not support RAW-mode printing. Turn on COOKED mode with GUI_PR_CONTROLLER (for all printers) or in this setup-screen for individual printers. Go to FAQ start page. 3.15: HP-UX bizarre one-line display on bottom line problem. QUESTION When IVT is used to login to an HP-UX machine, all output gets printed on the bottom line of the display. Scrolling is broken. ANSWER The problem is the TERMINFO entry for a vt220 terminal on HP-UX. There is an "is2" command in there to reset the terminal (initialisation string 2). That command contains the wrong sequence "\E[1;24r". What that INTENDS to do, is to reset the scroll-region of the terminal to the entire screen. The assumption there is that the terminal has 24 lines. The error is that the command "\E[r" explicitly means "reset scrolling region to entire screen", so it works for ANY size screen. That error has been there since forever. Other terminal emulators work because either their default screen size is 24 lines, the TERM environment variable is set to vt100, or both. When the IVT window is larger than 24 lines, setting a scrolling region from 1 - 24 means that NO scrolling occurs on lines outside the scrolling region (defined by VT220 emulation rules). Thus, everything displayed there gets hammered on the same line(s), over and over again. Various solutions: - Fix the terminfo file on the HP-UX box (requires root privilege). Use "untic vt220 > vt220.tic" to get a text version of the terminfo file, edit the 1;24 out of there, use "tic vt220.tic" to recompile. - Tell IVT to tell the HP-UX box that it is emulating a vt100 (see TELNET_TTYPE). Note that this lie can cause other trouble, as a vt220 has more keys, so some applications won't work as well as they used to. - Install the "ivt.tic" file on the HP-UX box, compile it (using tic) and tell the HP-UX machine (using TELNET_TTYPE) that you are an IVT terminal (set "ivt,vt220,vt100" in the TELNET_TTYPE). This also enables a few extra features. You'll find the ivt.tic file in the "Unix" subdirectory of the IVT distribution. - After logging in, use F3 (setup) and click on "Reset terminal". This

IVT User Manual, Version 23.0 3: IVT FAQ: Frequently Asked Questions 3.15: HP-UX bizarre one-line display on bottom line problem.

Page: 28

resets the session to VT220 start-up defaults, and that also resets the scrolling region. - Write a little IVT script that intercepts the erroneous command and ignores it. This is only an option if you have many of these HP-UX boxes and none of the above can be used.

IVT User Manual, Version 23.0 4: How to create, close and switch between sessions This is an important feature, others are prev/next 4: How to create, close and switch between sessions

Page: 29

IVT can handle multiple, simultaneously active sessions. Sessions behave like completely independent virtual terminals. F4-S gives an overview of existing sessions and a re-ordering possibility. Here you can also change the name of the host in the status line and the status comment. These functions are easily accessed from the session menu bar. You can create or close a session at any time and hot-key between them. To CREATE a session you use: Menu bar TABSBAR CTRL-PgDown CTRL-PgUp CREATE CREATEGRP - Click on the sessions menu. - Double-click in an empty part of the tabs bar, or right-click there for the session overview. - Create a session and perform auto-login when possible. - Create a session. - Statements in IVT.rc, combined with -A or -agrp flag. - Create a group of logically related sessions quickly.

A session can be cloned, which means that the current session is used to find the host, username and protocol and IVT attempts to create an identical session and do auto-login there. It also copies the window size, font, and all other possibly modified settings of the current session. Cloning uses the ORIGINAL hostname and username, so when you use scripts to modify the hostname and/or username, those scripts will work correctly for th cloned session, too. Also, see the PRECONNECT statement to execute a script before a connect is made (to redirect connections, for example). See also the ONCONNECT statement to execute a SCRIPT after successful connect The panel can be modified by setting the $HOSTPROMPT variable. For a SERIAL connection, type a DEVICE (e.g. COM2,9600,n,8,1). Only the port name (COM1, COM2, etc) is required, the baud rate defaults to 19200, the parity to none, data bits to 8, stop bits to 0. For TCP/IP, type HOST[:port]. HOST can be an IP address, port is optional. You can, of course, also specify the name of a host. See the RESOLVE statemen on ways to configure IVT to use non-standard ways of translating hostnames. To SWITCH TO an existing session you can use: ALT+1 to ALT+9 CTRL-Cursor-key - Switch to session with that number (1-9) - Switch to previous (UP/LEFT) or next (DOWN/RIGHT) (actually switches to the next member in the group). See SESWRAP to configure what happens when you reach the last (or first) session. ALT+t - Toggles between two sessions. Shift+CTRL+Cursor - Switch to FIRST (UP/LEFT) or LAST (DOWN/RIGHT). Also see the SESWRAP command to alter this behaviour. Use the menu bar. To CLOSE a session (after logout) use ALT+F4. Exiting the LAST session will cause IVT to exit. You can also set the NO_RECONNECT feature, this will cause sessions to be closed automatically when the host disconnects. Using EXPLICIT_EXIT will close all but the last session. See also NO_GUI_CLOSE, which can force you to do a clean log off instead of forcibly killing sessions. See also BATCHMODE, to prevent errors under certain circumstances. Don't use ALT+F4 as the normal way to log off - some hosts or applications get upset when you force a hang-up this way! F4-S will display a screen that shows all existing sessions. Here you can edit various attributes. between the current and maximum session numbers. An even easier way is to use the menu bar.

IVT User Manual, Version 23.0 5: IVT and the Windows registry 5.1: Saving IVT setup to the registry This is an important feature, others are prev/next

Page: 30

5: IVT and the Windows registry 5.1: Saving IVT setup to the registry Configuring IVT can be done in two basic ways: - Traditionally, you configure IVT by editing your IVT.RC file with a text editor, after which you restart IVT so it reads the new file(s). The advantage is that the setup is human-readable and shareable with other users. The disadvantage is that you need to use a text-editor and need to learn th syntax of the IVT.RC setup language. - Alternatively, you can experiment with various setting by using the setup screens accessed via F3 (or using the SETUP menubar). Most settings that you can change in the setup screens only modify the current session (and not other active sessions). When you find a setup you like, you can save the current setup so it becomes the startup default. See also PROFILEs, which allow you to have several separate setups. Saving setup parameters can be done in 2 ways: - Click on the SETUP menu on the menu bar, and click "Save into Registry". - Click on the SAVE button in the setup screen. If there is a current profile in the registry, IVT will ask if you want to overwrite it. After saving a setup, IVT will make that setup the global default (you do not have to exit and restart IVT). During start-up, IVT will first read all IVT.RC files in the normal way. Then, if the NO_REGISTRY keyword has NOT been used, it will attempt to find a saved profile in the registry. When found, the settings from the registry are loaded "on top of" those from the IVT.RC files. The upshot is that you no longer need to worry about the syntax of IVT.RC files. You experiment in the setup screens until you find a setup that works for you. Then, you save that. That's all. However, there is a problem with having two different mechanisms to accomplis the same thing. If you modify IVT.RC settings after you have saved your setup to the registry, that would have no effect since the registry overrules the IVT.RC file setup. This can be very confusing. Therefore, whenever you save the setup to the registry, IVT will also save the result of your IVT.RC commands in the registry. During start-up of IVT, the CURRENT results of your IVT.RC settings are compared with the saved copy in the registry. When a difference is found, you have used BOTH mechanisms (IVT.RC files AND registry) to modify the SAME value. In that case, IVT will warn you with a popup saying that you should either re-save or delete the registry settings to resolve the conflict. As a consequence it is best to stick to one configuration mechanism. When you use the NO_REGISTRY directive, the menu bar entries for manipulating the registry will be greyed out, and the buttons in the setup screens for the same functionality are greyed out, too. 5.2: Removing IVT setup from the registry As described in the previous topic, the setup of IVT can Windows registry. This can, however, give conflicts with As you grow to appreciate the power of IVT's setup files abandon the simplicity of saving a setup in the registry own configuration files, scripts and so on. be saved to the your IVT.RC files. you might want to and write your

When you click on DELETE in this setup screen, IVT will remove any saved settings from the registry. It will then use the current IVT.RC settings as the current defaults, and restore those for the current session as well. In other words, deleting a setup is the exact reverse of saving one, and making that work properly is harder than it sounds :-) Another way to delete the registry setup is to use the SETUP menu on the menu bar, and select "Delete from registry".

IVT User Manual, Version 23.0 6: The IVT keyboard guide 6.1: Summary of special IVT function keys This is an important feature, others are prev/next 6: The IVT keyboard guide 6.1: Summary of special IVT function keys

Page: 31

IVT has a lot of special keys that do the most wonderful things. Many of thes things can make life a lot easier. Also, all keys can be programmed. Last, but not least, the HOST can program keys, see the 'keyp' program. The complete list of special IVT keys is: F1F2F3F4Hold Screen (but see also F1F4). Print Screen. Also usable during a CUT operation. Setup. Changes IVT configuration on the fly. Help. See also help-on-help.

CTRL+F6- Obtains a sub shell when not in secure mode. CTRL+CursUp- Switch to the previous session. CTRL+CursLeft- Switch to the previous session. CTRL+CursDown- Switch to the next session. CTRL+CursRight- Switch to the next session. CTRL+SHIFT+Curs- Switch to FIRST (up/left) or LAST (down/right) session. ALT+1 to ALT+9- Switch to session 1 - 9. ALT+0- Type a (hexa)decimal or octal (unicode) character code. ALT+t- Toggles back to previously active session. ALT+g- Switch to the next group. CTRL+PageDown- Create a new session (auto logon) NOTE: Combine with shift and it CLONES a session. CTRL+PageUp- Create a new session (no auto-logon) See also the $HOSTPROMPT variable. CTRL+SHIFT+END- Ends learn mode (key programming). CTRL+BREAK- Sends a ^C on the session. CTRL+DELETE- Sends a DEL character. CTRL+BACKSPACE- Sends a DEL character. CTRL+@- Sends a NULL character. ALT+F4- Session hang-up (immediate abort of session). SHIFT+ALT+s- Invoke screensaver immediately. HOME- VT220 'FIND' key. Also CTRL+F7. INSERT- VT220 'INSERT' key. Also CTRL+F8. DELETE- VT220 'REMOVE' key. Also CTRL+F9. END- VT220 'SELECT' key. Also CTRL+F10. PageUp- VT220 'PAGE UP' key. Also ALT+F1. PageDown- VT220 'PAGE DOWN' key. Also ALT+F2. CTRL+F7- VT220 'FIND' key (if you lack a HOME key). CTRL+F8- VT220 'INSERT' key (if you lack an INSERT key). CTRL+F9- VT220 'REMOVE' key (if you lack a DELETE key). CTRL+F10- VT220 'SELECT' key (if you lack an END key. ALT+F1- VT220 'PAGE UP' key (if you lack a PageUp key). ALT+F2- VT220 'PAGE DOWN' key (if you lack a PageDown key). ALT+Enter- Flip Full screen mode. ALT+Shift+M- Maximize/restore window. ALT+PgUp- Enter history pager, one page back. ALT+PgDown- Enter history pager, one page down. ALT+CursUp- Enter history pager, one line up. ALT+CursDown- Enter history pager, one line down. ALT+HOME- Enter history pager, start of history buffer. ALT+END- Enter history pager, end of history buffer. Using the mouse wheel is easier... ALT+F9- Invoke IVT file transfer functions. ALT+a- Toggle ALERT mode. ALT+c- Enter CUT mode. ALT+L- Lock keyboard. ALT+m- Activate the first menu on the menu bar. ALT+p- Paste the default buffer (clipboard). Shift+Insert- Same as ALT+p SHIFT+ALT+p- Paste a named buffer. ALT+sWhen to a ALT+qSlower output. Repeat as necessary. used from the PAGER or this help system, it saves text file on disk. Speed up output (Quicker). Repeat as necessary.

IVT User Manual, Version 23.0 6: The IVT keyboard guide 6.2: CTRL+F6: Escape to operating system (Sub Shell) 6.2: CTRL+F6: Escape to operating system (Sub Shell)

Page: 32

Using CTRL+F6 will give you a shell (command prompt) on the Windows operating system. The command is only valid when secure mode is off. It can be that the administrator has disabled access to the command prompt. See also SHELLEXECUTE script function. 6.3: Application/Numeric keypad mode A VT220 terminal can operate the numeric keypad in two modes: - Numeric - Application IVT shares this multiple use with Windows, where the extra numeric keypad can be operated in numeric mode and as an alternative for PgUp, PgDown, cursor keys and so on. Further more, the top row of the numeric keypad (the Num Lock /, * and - keys) can be configured in IVT to be the VT220 PF1 - PF4 keys (not to be confused with F1 - F4). Then there is 7 or 8 bit mode, which further determines what actual codes will be sent. All of this can be a bit confusing, since there are many different sets of codes emitted by the keys on the numeric keypad: - When the "Num lock" mode is on, and the IVT setting for the "keypad mode" i "numeric" (default) and "PF1-PF4 on top row numpad" is set to "On" (also default), the numeric keys simply emit the numbers, the extra "+" and "enter" keys emit "+" and "enter". The top row emits the VT220 PF1 to PF4 codes (since a true VT220 has those keys in that position). When that setting is "off" those keys also emit the characters printed on them. The "Num lock" mode can be switched without generating the PF1-PF4 keys by using "Shift-Num lock". IVT will ignore that combination, but Windows won't (the status of the "Num lock" light will change). - When the "Num lock" mode is off, and the IVT setting for the "keypad mode" is "numeric" (default), the keys behave PC-style again, so they are just alternates for Home, PgUp, PgDown, End, Insert, Del and the cursor keys. - When the "Num lock" mode is on, and the IVT setting for the "keypad mode" i "Application" (default) and "PF1-PF4 on top row numpad" is set to "On" (als default), the keys will behave as VT220 style "application mode" keys. Thus 0 is "ESC O p", 1 is "ESC O q", to 9 is "ESC O y". Enter sends "ESC O M", the comma sends "ESC O n", the "+" key "ESC O l". This is for 7-bit mode, there is yet another set of codes for 8 bit mode. - When you switch "Num lock" off, IVT again uses the PC defaults (alternates for the cursor keys, Home, End and so on. - Last but not least, you can use the macro recorder to overrule all of this, and program the keys on the numeric keypad in all sorts of ways. Confused? Just experiment with the various settings until you get what you desire. Please note that the current setting in "Setup" CANNOT be saved into the registry, since a VT220 is expected to be in "Numeric" keypad mode by default. When an application requires the "Application" mode, it should set this by means of this escape sequence explicitly. When absolutely necessary, things can be forced out of kilter by: ONCONNECT * ForceApplicationMode Script ForceApplicationMode VTECHO "\1B=" END Add this to your IVT.RC file, and it will make IVT think that every host it connects to sends the string to switch into application mode as the very firs thing. BTW, "\1B>" will switch back into numeric mode. 6.4: ALT+t: Toggle between two sessions This is one of the handy features of IVT that you quickly become very fond off. Whenever you switch between sessions, the number of the session you came from is remembered by IVT. When you use ALT+t, IVT switches back to that session (and again remembers where you came from). This toggling between two sessions is very handy when you have many sessions active but find yourself switching between two of them many times. For example, having error messages from a compiler on one session and doing something about them on another.

IVT User Manual, Version 23.0 6: The IVT keyboard guide 6.5: ALT+a: Alert mode (ring bell on activity)

Page: 33

It is also usable as a quick screen-at-a-time DIFF program. When there are small differences between two screens, lean on the ALT+t. IVT will rapidly switch between two sessions, which will make the differences apparent. 6.5: ALT+a: Alert mode (ring bell on activity) This is a very useful feature of IVT when you have to wait for a long time before the host is going to respond. Typing an ALT+a will toggle alert-mode. This will cause IVT to ring the bell as soon as a character is received from the host (actually, once for every received network packet). When the receiving session happens to be in the background, the activity indicator will show a red background and the bell will sound muffled. Typing another ALT+a will turn the alert-mode off again. The current setting can be made visible from this setup screen. There is no way to initialise this setting from an IVT.RC file. However, using IVTFUNCTION this function is accessible to a script. 6.6: ALT+0: Generate any character. Most Windows programs allow you to enter a special character by holding down the ALT key and then typing a decimal character code on the numeric keypad. Even old DOS programs allowed you to do that, and long ago people used to enter diacritical characters in WordPerfect or Word using this technique. sessions. To allow you to enter such special characters anyway, the unused ALT+0 is used to bring up a dialog in which you can conveniently enter a decimal, hexadecimal or even octal character code. When you use a normal codepage, the resulting code must lie between 0 and 255 (inclusive), and is transmitted to the host if you choose OK. When you use UTF-8, the character code can be any valid Unicode character point. Note that the simple display of the character is only one of the possible results! For example, if you send a "3", which is ^C, most Unix hosts will consider this an interrupt. If you send 127, it is a DEL character, usually that will cause either a backspace or an interrupt. Depending on the settings on the host, it may either accept 8-bit characters or reject them, or change them. Even if a character gets displayed, the result depends on the selected CODEPAGE in IVT, and a number of other related settings... In other words: Your Mileage May Vary. The important thing is that this allows you to send any character value to th host, just like other programs allow you to do... When an invalid string is entered, the BELL will sound if you click OK. 6.7: Names of the VT220 programmable keys In an IVT.RC file, a key can be programmed using the KEYNAME directive. Valid names for these keys are: PF1 - PF4- Normally CTRL+F1 to CTRL+F4, but see F1F4. PF1 - PF4- In Windows, top row of numeric keypad. PF5- A VT220 lacks this key, but IVT maps the F5 key there. F6 - F10- Same as on a PC. You can also use F11 and F12 when available. F11 - F20- These are mapped from SHIFT+F1 to SHIFT+F10 FIND- The HOME key or CTRL+F7. INSERT- The INSERT key or CRTL+F8. REMOVE- The DELETE key or CTRL+F9. SELECT- The END key or CTRL+F10. PRVSCR- The PageUp key or ALT+F1. NXTSCR- The PageDown key or ALT+F2.

See also the KEYBOARD.

The VT220 "DO" key is a fancy name for F16 (so you have to use SHIFT+F6). So for example: NXTSCR "ls -lab\r" Will program the PageDown and ALT+F2 keys of the PC to the Unix command "ls -lab" followed by a return. When such a statement occurs inside a script, the key is programmed for the current session only (after normal variable-substitution).

IVT User Manual, Version 23.0 6: The IVT keyboard guide 6.7: Names of the VT220 programmable keys

Page: 34

It is also possible to redefine any key using keyboard macros or to start a script when you press a key. The newer KEYMACRO command is even more powerful. Last but not least, the keyp program can be used on Unix to reprogram the keyboard. See also MOUSE_KEY, which allows you to bind scripts to mouse actions. Since a possible action is the SEND statement, this allows you to send data to the host when you press a mouse button.

IVT User Manual, Version 23.0 7: The status line and what it can do for you 7.1: Introduction to the status line This is an important feature, others are prev/next 7: The status line and what it can do for you 7.1: Introduction to the status line

Page: 35

The (optional) status bar of IVT shows lots of information about the current status of the foreground session, plus general information about the other sessions and groups of sessions. The status bar uses icons to indicate various conditions, such as printer active, keyboard lock, autolog active, security, etc. The various parts of the status bar can be clicked to perform actions on them (such as editing the hostname and comment parts). A right-click will display help about any item. It looks like the example below, click on any part to get more info: _____________________________________________________________________________ M x/y/G HOSTNAME HH:MM 123456789 G Comment Icons _____________________________________________________________________________ Explanation of the various fields: M - Is the modem indicator (serial lines only). It can have several values, and is usually displayed with a red background. x/y /G - The current (x) and total (y) number of sessions. - Optional group code of the current group. A + indicates that other groups exist. Clicking it performs an ALT+g function (next group). - The name of the remote machine (editable by clicking it).

HOSTNAME HH:MM

- The STATMIDDLE command can be used to configure this field. The default is the current time. Click to alter. - Current activity on other (background) sessions. - A G appears to indicate activity in other groups.

123456789 G

Comment - Free session comment (See F4-S screen). Clicking it will enable you to edit it. Icons - Icons show for the LEDS (1-4), a key for a locked keyboard, a padlock for an SSH or Kerberos session. Also a recorder icon for a keyboard macro, printer icon for an active printer and a notebook icon for AUTOLOG. Last but not least, an IPv6 icon indicates that the current connection uses IPv6. There is no icon for "normal", IPv4.

All parts of the status line can be clicked with the mouse: - Left-click allows you to edit the relevant part; - Right-click gives context-sensitive help for that part. See also STATUS, STATMIDDLE, STATBORDERS, STATUSCLICKS and PRSTATLINE. 7.2: Status line Modem indicator for serial lines When the current session is a serial one, the leftmost position of the status line can show the following values: - "M". This means IVT cannot detect a 'Device Ready' signal on the port. Usually, this means there is no modem attached or it is turned off. - "C". IVT sees a 'Device Ready' signal, but no 'Carrier Detect' signal. The carrier signal is raised when a session with a remote modem is established (actually, this depends on modem configuration and the cable (if any) between modem and PC). As soon as the carrier signal is raised, the C will disappear. However, since detection of the carrier-signal depends on the configuration of your modem and the cable, if the red C continues to be displayed during session, you can use this setup screen to toggle it off or use the NO_CARRIERSTATUS command in an IVT.RC file. - "B". Break signal. The serial line is currently in BREAK state. - "O". A red capital O indicates Overruns. Overruns indicate that your computer cannot keep up with the remote end, and characters are lost. The serial setup panel shows how many were lost, looking at this screen will also reset the overrun indicator (and clear the status-line indicator). This way, every time you lose something, you will at least be aware of it. Turning history off sometimes helps. The usual cause is that you have an old-fashioned UART chip that cannot kee up with modern, fast modems.

IVT User Manual, Version 23.0 7: The status line and what it can do for you 7.3: The status line indicators and icons. 7.3: The status line indicators and icons.

Page: 36

These icons indicate various important aspects of the current status of IVT. The following ones can appear: - Script active (a large red S with a bolt lightning through it). When one or more scripts are active on the current session that are not hidden, this icon is displayed. If scripts assist in getting you logged in, it is generally wise to leave them to do their work before you start typing on the session (wait for the icon to disappear). - Printer icon. Indicates a printer is active on this session. You can turn printers on from the setup-screen, or the host can activate a printer. A 'printer' can actually be a file as well. Using F3-F will 'flush' (close) the printer. An automatic TIMEOUT for this can be set when the printer is defined. See also F2 (print screen). See also printing. - Stop sign icon. Hold screen. It means F1 has been pressed and all output to the screen is stopped immediately. If there is no flow control (serial line) this might result in data loss. On a LAN-session, the host will automatically stop transmitting when the buffers are full. - Recorder icon. Learn mode. All keyboard input is remembered and stored under a key. You can turn this on with Learn Mode. End with either F3-L or with Shift+Ctrl+End, use the menu bar or click on the icon. - Notebook icon. to alter the log settings. - IPv6 icon. IVT can create IPv4 or IPv6 sessions for all protocols (like SSH, TELNET, rlogin and so on). When an IPv4 connection is used, no icon is displayed. - Keyboard lock warning countdown. When a keyboard timer lock is active, 30 seconds before the keyboard is going to be locked, IVT will sound the bell and start a 30-second countdown Touching a key will abort the countdown. When the grace period expires without keyboard activity, the keyboard will be locked and you will have to type the PASSWORD to unlock it. You can change the value from the setup screen, setting it to zero will disable the keyboard lock. When you have scripts setup to perform auto-login, it is especially important to crypt your setup files and lock the keyboard to prevent others from using your login-account! - Keys icon. To indicate that the keyboard is LOCKed. You must type the proper password to re-enabled the keyboard. IVT also disables all other ways to control it when the keyboard is locked (menus, mouse, etc). - Leds 1 - 4. The status of the official keyboard LEDs of the VT220 terminal. A real VT220 has four lights, called L1 to L4. A number with a green background displayed in this position means that the host has sent an escape sequence to turn this particular LED on. Not many applications use this feature. - Padlock icon. When Kerberos or SSH is used to make the session private in both directions a padlock icon will be displayed. Whenever the session switches back to plain text in either direction, the icon will disappear. 7.4: Status line hostname This part of the status line shows the name of the host the session is connected to. Initially, this is whatever was used from either the Create session dialog or the command line. It can also be edited using the F4-S screen (type an 'E' there) or using a STATUSHOST command from a script. An easier way is to click on the jost name in the status line, which brings u the ecit dialog immediately. Yet another way is by rightclicking the tab of the session and choose 'Edit'. For serial lines, this field will show the name of the COM port, baud-rate an such. In this case, when you use F3-SERIAL to change any of these settings, the host name will be updated automatically.

IVT User Manual, Version 23.0 7: The status line and what it can do for you 7.5: Status line clock 7.5: Status line clock

Page: 37

Traditionally, the middle part of the status line was used as a simple clock that could be turned on or off using the CLOCK keyword or the setup screen. Later, functionality was added to show the current cursor position in this place, or to show the current position of the mouse instead. This allows you to measure the exact position or length on the screen of certain objects. In one of these modes it will show two numbers; the first is the line number, the second the column number. Finally, the "connected" time of a session can be displayed here. in 3 different ways: - Use the setup screen to change the current setting. This is for all sessions simultaneously. - Click with the left mouse button on that part of the status line. Every time you click it will change to the next possibility. - Use the STATMIDDLE keyword in an IVT.RC file. 7.6: Status line activity indicator This activity indicator occupies only 9 positions in the middle of the status line, but it reveals a wealth of information about the things going on in background sessions. These are: - Current activity. When data is being received on a background session, a sequence of |, /, and \ characters is displayed, resulting in a sort of rotating movement tha indicates current activity. - Unseen output. When output is received that has not been viewed by the user, the sequence number of the appropriate session is displayed. So when the hosts sends a few lines or screens of data, you will first see the position rotate, then stop and display the session number. When activity is detected in sessions having a group code other than the current one, all such sessions are lumped together into a single position of the indicator (the 9th and last). A G (for group) is displayed here. When any of the other-group sessions has a red background indicator, the background of the G will be red, when any of the sessions is in the error state, it will blink. - Bell received. When a BELL character is received in a background session, the sound produced sounds a bit 'under water' like, to identify it as coming from a background session. IVT will then make the BACKGROUND color of that session position on the status line RED (to draw attention to the fact that something probably just went wrong in that session). See also BELL_ABUSE. - Session error. When the (LAN) session is lost, the number of that session will blink. Also, since IVT will print an error-message on that session which is accompanied by a beep, the background will be RED. So, if a host on the LAN goes down, all sessions you have with that host will show a red, blinking number to draw your attention to it, and a BELL will sound for every session, too! - Green background. The background of an activity indicator can be made GREEN by sending the ^[ B (ESC-SPACE-B) sequence). Use this in a Shell-prompt and a background session will show green when it is ready! of make (or errors) can later be viewed using the pager, you can monitor progress simply by waiting for the indicator to turn green (cool, huh?) NOTE: The new COLORREADY statement can be used to customize the actual foreground and background colors for the indicator... 7.7: Status line comment The session comment can be typed in the initial dialog when you create a session. It can also be set from the host using the ^[ Ctext; escape sequence (ESC-SPACE-CanytextSEMICOLON, see example). This allows the host to automatically identify the session. It can be typed directly using F4-S <Edit>. Also, you can click on the comment in the status line, which allows you to

IVT User Manual, Version 23.0 7: The status line and what it can do for you 7.7: Status line comment

Page: 38

edit it (use ESC to abort the edit). Alternatively, you can use a rightclick on the tab of the session and choose 'Edit' from the menu that appears. Use it to describe the purpose of the session. Especially when you have many sessions to the same host, this comment is ideal to tell them apart. The F4-S screen lists all comments, to give you an overview of all your sessions and the possibility to edit the comment, change the order of sessions etc. Also, the WINDOW menu on the menu bar shows the session comments. It can be set from a script using the STATUSTXT and STATUSTXTFIX commands. Any comment longer than the maximum of 40 positions is silently truncated. See also the TITLEBAR command, which will show this comment in the IVT applications title bar. See also the XTERM set window title command.

IVT User Manual, Version 23.0 8: IVT menu bars and panel dialogs 8.1: Introduction 8: IVT menu bars and panel dialogs 8.1: Introduction

Page: 39

Menu bars and the create dialog are a late addition to IVT. For over 10 years IVT was a program with many powerful features accessed with the keyboard only All those things were described in detail in these manual pages, but these days few people take the time to read all of this, even in spite of Tables of Contents, lists of important topics, FAQs, read-me-firsts and whatever else I tried :-( After releasing version 11.3 of IVT to the Web in August 1999, I got many questions about IVT that were answered in the manual, the FAQ and read-me files, but were not noticed by the people asking the questions. Thus, many powerful features of IVT went unnoticed by many users - a great pity. Therefore, I added the menu bars in January 2000. Every important part of IVT now has an optional menu bar on top of the screen (sessions, history pager and this help system). Since November 2005, this menu bar can now be displayed as a normal Windows menu bar, instead of the original IVT text-mode one. In june 2008, support for the old text-mode bar was dropped due to a major rewrite to support uTF-8. The next item was to make creation of sessions easier and more intuitive. For this, the create session dialog was made which allows you to switch protocols, edit items, click buttons and so on. All the code for this is - like the rest of IVT - home rolled. Once this was working properly, December 2001 was used to rewrite the setup system entirely, so from version 14.1e onwards the setup is mouse-driven and usable by novices, too. For more details on using and customizing the menu bars, click here. For more details on using and customizing the create session dialog, click here. For setup, see here. This is an important feature, others are prev/next 8.2: Menu bars All important functions in IVT have been given an entry in one of the menus that can be pulled down from one of the menu bars. Menu bars can be enabled and disabled by using the MENUBAR directive in the IVT.RC configuration file. The menu bar can also be activated by pressing and releasing the ALT key. The normal Windows way (F10 or ALT+shortcut key) does NOT work, as both these key combinations are reserved by IVT for terminal emulation purposes. The one exception was for the lone ALT key, which would normally do nothing in IVT. Every menu item also has a context-sensitive help, accessed by typing F1 whil that entry is highlighted, or by right-clicking it (even when greyed out). There is even a customisable entry in the session menu bar. Normally invisible, this entry can be configured from the IVT.RC file. This allows the user to launch IVT scripts and generate keystrokes using the standard menu ba interface. 8.2.1: Using the menu bars The menu bar can be activated as follows: - Click with the mouse on one of the words in the bar; - Press and release the (left) ALT key. - Uses ALT+Space When a menu is activated, an item can be chosen by clicking on it with the mouse. The keyboard can be used to navigate the menus as well: Type the underlined character to choose an item quickly; Cursor keys to go up/down left and right; Home to go to the first entry, End to go to the last (text mode only); ENTER to choose the currently selected item; F1 to display instantaneous help on the currently selected item. A right mouse-click on an item will also display the help.

Most items in the menus also display the associated keyboard shortcut. Use these to quickly access common features.

IVT User Manual, Version 23.0 8: IVT menu bars and panel dialogs 8.2: Menu bars 8.2.2: Setting menu bar colors 8.2.2: Setting menu bar colors MENU_COLORS ...

Page: 40

No longer supported in this version of IVT, this used to set the colors of th text-mode menu bar. 8.2.3: Configuration of the CUSTOM menu One of the nice features of the session menu bar is that it has a configurabl menu. Normally, this menu is empty and invisible. It can be activated from the IVT.RC file by using several MENU statements which have to be called from a SCRIPT. Normally, you would write a "startup" script to do this. First of all, the menu must be given a name using the TEXT directive. This string will appear on the menu bar itself. It is your responsibility to have a properly formatted string here, a very long string, or one containing odd characters will produce a variety of unpleasant effects... An "&" character can be used to indicate a shortcut character. Next, the menu must be filled with entries, of which there are 4 different types (detailed below). Every item has a description (the text which will appear in the menu). An '&' in that text can be used to indicate the highlighted shortcut character for that entry (see below for an example). The different types are: - CALL. This entry will cause a SCRIPT (with optional parameters) to be called when chosen by the user. The script must - of course - be written by the user. - STRING. This entry will "play" a number of simple keystrokes as specified by the user. Only normal data keys can be used. - KEYS. This entry will "play" a number of keystrokes as specified by the user. is slightly more complex (and not implemented yet ;-). - LINE. A separator line is drawn by IVT. Lastly, the menu must be enabled, which will make it visible. It can also be disabled. The "MENU ENABLE" and "MENU DISABLE" commands accomplish this. The menu can also be cleared using the RESET command. That way, a script can redefine the menu later. The order in which the statements are executed resulting menu. Time for an example: Script Startup MENU RESET# Clear any previous menu MENU TITLE "&Favourites" MENU CALL "Start my favourite &editor" MENU CALL "Start &mail program" MENU LINE MENU STRING "Show my &processes" "ps -fu MENU ENABLE END determines the order in the

Start vi Start elm johnb\r"

The TITLE command will create an entry on the menu bar called "Favourites". The F will be the shortcut key for that menu (GUI menu bar only). The first two entries will call the "Start" script (which has to be defined elsewhere). It will be passed one parameter (vi or elm in the example). The shortcut character will be 'e' and 'm' respectively. Then, a separating line is drawn. The next entry will send the "ps" command when chosen (shortcut is 'p'). The idea is that you can create entries for common tasks in your own personalized menu... 8.3: Start-up general help Welcome to IVT, a powerful multi-session LAN terminal emulator. Click on any of the following links for more information (right-click returns from a link): - General introduction of IVT - INTRODUCTION FOR NEW USERS - Creating & managing sessions

IVT User Manual, Version 23.0 8: IVT menu bars and panel dialogs 8.3: Start-up general help The create session panel interface Password learning and automatic login Major features list IVT FAQ (Frequently Asked Questions) What the users have to say about IVT

Page: 41

There is also Help On Help... For the slightly more advanced user, the following links may be worth reading - Cutting and pasting with the mouse - Protocols supported by IVT - IVT keyboard guide - IVT start-up files (IVT.RC) - IVT scripting language - Viewing/managing scroll-back history

8.4: The create session panel interface IVT used to be a "text-mode only" program until the beginning of 2000. Mouse mode cut/paste was an early feature, but for the rest you used the keyboard. Creating sessions, scroll-back history, file transfer and hosts of other functions were accessed through ALT and CTRL key-combinations. My home page even used to say that IVT was meant to be used by people who use a terminal emulator as a primary tool, and that anyone who only used Unix through TELNET once in a while was better off with other products. After releasing IVT to the Internet in September 1999, I got many requests for features that already were a part of IVT, but were unnoticed because they were hidden behind some obscure key combination. Menu bars were added as the first thing to give pull-down menus which make most of the significant features available to novice users. Adding these menus was still not enough to satisfy some users out there (hi Hans!) and they complained about the complexity and unfriendliness of IVT. So, new in version 12.2 is the create session dialog, a panel interface that should look familiar to Windows users. All items in the dialog are clickable with the mouse. Input fields can be edited using (mostly) the same way as in any Windows application. Right-clicking any part of the dialog will bring you to a context sensitive help screen of IVT. While the create session dialog is active, you can also click on the menu bar and choose SETUP to change all kinds of settings (with the mouse, even). By clicking on the MORE and LESS buttons you can extend (or limit) the choice IVT displays in the dialog. You can also use the CRDIALOG directive in an IVT.RC file (or from this setup screen) to set the default interface. 8.5: Repeat count The "Repeat" field in the create-session panel allows you to create a number of identical sessions in one operation. You will have to select the maximum panel (click on More until it appears). All sessions are to the same host and will be logged in (when requested) with the same user-id. When there is room in the comment field of the session, an automatic sequence number will be appended to be able to distinguish between them. The Automatic Login system will use the $IVT_REPEATNR variable to do the same, too. See also the R=Count option of the CREATE statement, which allows another way of specifying a number of repeated sessions. These two cannot be combined, a CREATEGRP cannot be created multiple times automatically. See also MERCY_MODE, to prevent excessive stress on hosts. 8.6: List with previous host & users The fat down-arrow at the end of the hostname prompt can be used to access a list of recently used and predefined hostnames, usernames and so on. The list consists of 2 parts. The first part are hostnames, usernames and other data typed into the login dialog by the user. IVT remembers the last 25 typed names (but see MAXTYPEDHOSTS to configure this). The second part is configurable with the HOSTLIST command in an IVT.RC file, or using the address book editor avaiulable from the "extra" menu. Double-clicking on an entry in the dialog that opens will select that entry. You can also single-click followed by <OK>.

IVT User Manual, Version 23.0 8: IVT menu bars and panel dialogs 8.6: List with previous host & users

Page: 42

You can even select MULTIPLE entries in ONE operation and IVT will create multiple sessions at once! Entries can be deleted from the list one-by-one or all together. The resulting list is saved in the registry and thus survives starting and stopping IVT. The option is enabled only when at least two different hosts and users have been typed by the user. The last entry typed by the user automatically appears in the login dialog. A more powerful way to automatically start sessions for particular users and hosts is the session group mechanism of IVT. See also the hostlist filter. 8.7: Host lister filter expression When you use the address book together with project files, the number of host to select from can grow uncomfortably large. By typing a partial name into the "filter" box, the listing is adjusted to contain only matching hosts. Actually, the value you type here can be a regular expression (see the MATCH function). The string that is matched is the combination of the hostname and description (comment field) of the address book entries (so you can search on arbitrary parts of the hostname, description, or combination). Before a selection is shown, IVT will first force an expansion of all groups in the address book (like clicking on "Expand all"). The value in the filter box is not cleared automatically by IVT. If you want to view the complete address book again, you will have to clear it manually.

IVT User Manual, Version 23.0 9: F3: IVT Setup dialogs 9.1: Introduction to setup dialogs 9: F3: IVT Setup dialogs 9.1: Introduction to setup dialogs

Page: 43

For help on any individual item, use a right-click on that item (or select the item and press F1). Click on the question mark in the title bar of window to get help on that specific window. keys: Cursor keys to move in the desired direction; Tab to move to the "logical next" item; Shift-Tab to move to the "logical previous" item; Spacebar to "click" on the current item; ENTER to perform the default action for the current window. F1 for help.

When editing text fields, all normal keys to edit and move inside the field will work as expected (HOME, END, Delete and so on). The old setup shortcuts of IVT still work: F3 - Apply changes, end setup; R - Reset terminal; C - Abort all scripts on this session; D - Dump incoming data; F - Flush printer; L - Start (or end) Learning a macro. New A P W H ? ones are: Apply changes and exit setup; Printer setup Windows setup Help Help

The <Save to registry> button is enabled only when the REGISTRY setting is in effect (when NOREGISTRY is used, the button is disabled). When clicked, the current setup is saved into the registry, see here for details. The <Delete> button will delete any settings from the registry and will make IVT revert to the setup that result from the IVT.RC file settings. It will ask for confirmation first. See here for details. 9.2: Setup propagation The setup dialogs allow you to change the look and feel of the current will have the new look and/or feel. See also SIZE4ALL. However, up until Tue Aug 16 23:02:42 2005, there was no way to force a chang in the setup to all currently existing sessions. The "Propagate" function uses the current session parameters and copies those to all currently existing sessions. So all sessions get the look and feel of the current session with regards to: Colors; Font; Window size; Window position.

and so on and on (everything that you can change in setup). The "propagate" function is available from the main session menu bar (the "setup" menu there) and through the IVTFUNCTION and KEYMACRO functions, which allow you to propagate setup either under script or keyboard control. There is also a button in Windows Setup. There - The - The - The - The are a few reasons why a session will not change its look & feel: session is in scroll back mode; session is in blocked mode (hold screen); session is in an error state (disconnected); session is currently being initiated.

This is for various technical and practical reasons. Note that if you have not changed any setting, using the "Propagate" function has no visible effect, except that IVT will force a screen resize, font adjustment and so on for every session, which can cause network activity, screen redrawing and so on (even if it ends up looking exactly the same). In other words, do not use it unnecessarily. See also SIZE4ALL.

IVT User Manual, Version 23.0 9: F3: IVT Setup dialogs 9.3: Protocol setup 9.3: Protocol setup

Page: 44

This dialog allows you to choose the basic transport and session protocols that IVT is going to use for future sessions. The transport protocol is the low-level way IVT sends data from A to B, this can be a serial line, TCP/IP or NetBios. This chooses the basic session protocol. A session protocol runs "on top of" a transport protocol. It can be TELNET, RLOGIN, VTP or MULTIPLEX. Transport protocol : [WinSock Session protocol : [Telnet TCP no delay option : [] Socket timeout : [ 20] Trace name resolving: [ ] <Configure proxy> 9.4: Proxy setup The Proxy panel allows you to configure IVT to use various types of proxy in order to make its network connections. The settings in this panel affect the primary network connection forming for your SSH, TELNET or RLOGIN session Below you'll find more information on each separate topic. Show proxy debug messages: Proxy type : Proxy host:port : Timeout in seconds : Exclude host/IPs : Proxy local connections : DNS lookup at proxy end : User name : Password : Telnet command : IVT script name : [ ] [None ] ........................................ 15... ........................................ [ ] [Auto] ruurdb.................................. ****.................................... connect $HOSTNAME_ONLY $PORT\n.......... ........................................ 9.5: Telnet setup The TELNET setup dialog allows you to modify the settings for future sessions and to inquire the status of the current session. When no current session exists, or the current session is not of type TELNET, the "inquiry" functions are all greyed out. Below you will find more information on each option. Show option negotiation : [ ] Offer extra options : [] Use New Env (RFC 1592) : [ ] Terminal type : ivt,vt220,vt100..... Terminal speed : 38400,38400......... X Display value : NL-ARN-L60278:0.............. Send IP-address in Xdisp: [ ] Keep-alive delay (0=off): 0 <Send AreYouThere > <Send break > <Send Interrupt Process> <Force Logoff > <Show remote status > <Toggle binary mode > Local=Off Remote=Off Suppress Go Ahead : Local=On Remote=On Local flow control : Enabled, Restart XON 9.5.1: Telnet setup: Send Are You There When you are using a TELNET connection to a host, and the host does not seem to respond to your input anymore, you can click on this button. This will send a special command called "Are You There" to the remote end of the TELNET connection. A host should respond with something along the lines of "[YES]", or "I AM HERE". Some hosts only ring the bell to avoid corrupting the screen. The idea is that a life sign is given. When no respons is received, the problem lies (probably) in the network connection itself. However, your BELL might have been set to OFF... 9.5.2: Telnet setup: Send break When a TELNET host is not responding, you might first want to try and send an "Are You There" to see if anything is still alive at the other end of the connection. If there is, and the program you are talking to seems to be dead (or cannot be stopped by normal means for whatever reason), you might try to send a TELNET BREAK. This is a friendly way to ask the program to stop. ] ]

IVT User Manual, Version 23.0 9: F3: IVT Setup dialogs 9.5: Telnet setup 9.5.2: Telnet setup: Send break

Page: 45

Simply click on the appropriate button in the TELNET setup dialog. A more unfriendly way is the interrupt process, described below. Not all TELNET host implementations honour this request. Your last recourse is to hit ALT+F4 to kill the session.

9.5.3: Telnet setup: Send Interrupt Process The TELNET protocol supports an application independent way to terminate processes. Even when your host has disabled all normal ways to interrupt applications, TELNET clients can request an "Interrupt process". This is the last resort if all else fails. See also "Send TELNET break".

9.5.4: Telnet setup: Force Logoff This is a request from IVT to the TELNET host to disconnect the session. I have not found many hosts that honour this request, most ignore it. Another way to disconnect forcibly would be to use ALT+F4. See also "Send TELNET break" and "Send Interrupt process".

9.5.5: Telnet setup: Show remote status This is a request from IVT to the TELNET host to send its idea of the current status of all TELNET options. All options that are marked DO (the host thinks IVT should do this option) or WILL (the host will do that option) are sent back and displayed (on the normal session screen) by IVT. Since all these options are negotiated when the session is established, both ends of the connection should have the same idea on the current status. When IVT receives the status from the host, it compares that to its own ideas on the status. When it matches, it is displayed as "Correct". When a mismatch is found a "MISMATCH" message is displayed. Use this when in doubt on the correct implementation of the telnet host.

9.5.6: Telnet setup: Binary mode This requests binary transmission on the session. It is used internally by the file transfer functions of IVT but not used much otherwise. Enabling this mode will prevent certain character translations and local flow control. The setup will show the current status, clicking the button will toggle that setting from on to off and v.v. 9.5.7: Telnet setup: Suppress Go Ahead This is display only, you cannot change the setting. A standard TELNET connection is actually half-duplex, when one side of the connection is done transmitting, it should send a message to the other side saying "I'm done, you go ahead now". In these modern days of full duplex connections and applications that can send unsolicited output there is not much use for such a message. Any side that does not want these messages can send a "DO Suppress Go Ahead" message to the other end. IVT will send such a message to a TELNET host during session initialisation. The host might respond with "DONT Suppress Go Ahead" when it actually wants the protocol. If the host does not want to see any "Go Ahead" messages, it will say "WILL Suppress Go Ahead" and (probably) send a message to IVT which says "DO Suppress Go Ahead" to which IVT will respond "WILL Suppress Go Ahead". The result of these negotiations will be shown in the TELNET setup dialog. When the Go Ahead is sent by the host, IVT will ignore it (it can't force you to type something) and when it is required by the host, IVT will send a "Go Ahead" after you finished typing. 9.5.8: Telnet setup: Local flow control This is display only, you cannot change the setting. Local flow control is a way to stop the display of characters received by the host, by typing a special character (usually XOFF, generated by typing a CTRL+s key). When local flow control is enabled, typing an XOFF will make IVT stop immediately (normally, the XOFF would be transmitted to the host which would respond eventually, but there might be lots of buffered data

IVT User Manual, Version 23.0 9: F3: IVT Setup dialogs 9.5: Telnet setup 9.5.8: Telnet setup: Local flow control in the network which could make XOFF pretty useless).

Page: 46

There are two ways to restart the flow: RESTART_ANY and RESTART_XON. When the first is enabled, any typed character will resume output. When the second is enabled, you have to type an XON (Ctrl+Q). When local flow control is enabled, Ctrl-S and Ctrl-Q are transmitted to the host, and also handled locally. IVT immediately stops displaying output (same as using F1). 9.6: Serial setup This panel allows you to configure the settings for serial ports. Depending on whether the current session is a serial one, you can modify the current port or (when the current session is not connected yet or is not of a serial type), change the global defaults that will affect future serial sessions. Baud rate : [19200] Parity : [None ] Data bits : [ 8 ] Stop bits : [ 1 ] Remote flow control: [] Local flow control : [] CTS/RTS control : [] DSR send control : [] BELL on phone RING : [] Show Carrier Detect: [] <Short BREAK (250ms)> <Long BREAK (1.5 sec)> Total char overruns Current overruns 0 0 9.7: RLOGIN setup RLOGIN is not as popular a protocol as TELNET, but IVT supports it. This dialog allows you to configure the values that will be used for future sessions of this type. Local user name : .................... Remote user name: .................... Terminal type : vt220............... 9.8: VT220 (basic) setup This basic setup dialog manages the main characteristics of the VT220 emulator. Screen size : Allow resize : One size for all : History : Screens : 7 or 8-bit mode : Auto reconnect LAN : Retain sessions : Line wrap : LF implies CR : Screen save after : Lock keyboard after : Smooth scroll delay : Keyboard lock passwd: Answerback string : Terminal speed : [60x145 (Dflt)] [] Allow ALT-screen [] [] [] [10 ] [7] [ ] [ ] [] [ ] 10 minutes 0 minutes 0 Ms Pixels: 1 ******** \06........................... [Turbo ] (see also ALT-S)

9.8.1: VT220 basics: Linefeed implies CR When this option is turned on, IVT will automatically add a Carriage Return character after every received Linefeed character. This means the next displayed character will be at the start of the next line, rather than at the same column position on the next line. The host can control this with an escape sequence. You cannot set a global default, a VT220 has to have this initialised to OFF. This modification is NOT saved into the registry! See also CSI 20 h. A number of users have reported trouble with this setting. Sometimes there are hosts which force this setting to ON and then produce screen corruptions because of that, sometimes they expect it to be turned on but do nothing to

IVT User Manual, Version 23.0 9: F3: IVT Setup dialogs 9.8: VT220 (basic) setup 9.8.1: VT220 basics: Linefeed implies CR

Page: 47

actually set it. In such cases, little IVT scripts can be used to force the setting, like so: ONCONNECT * SetLfImpCrOn Script SetLfImpCrOn VTECHO "\1B[20h" END This script will force the setting to ON for every established connection. The opposite script is more complex: ONCONNECT * SetLfImpCrOff Script SetLfImpCrOff SECRET FOREVER WAIT "\1B[20h"# Wait for a command to turn it on IGNOREESCAPE# Ignore it. NEXT END This script launches a background script for every session, which just sits around monitoring everything received from the host. When a command is seen that turns this setting ON, it ignores it. The SECRET means there won't be an annoying red S in the status line to show that a script is active. 9.9: VT220 (more) setup This dialog combines a mishmash of other VT220 terminal characteristics, besides the ones in the VT220 basic setup dialog. Alert mode Bell action .WAV file Flash action .WAV file Backspace key F1-F4 keys Cursor key mode Keypad mode Create sess dialog Monochrome screen SCO-ANSI compatible Cursor height Local echo Screen debug mode Packet bounds trace : [ ] : [Sound tune ] Bell abuse settings : ........................... Browse : [Flash screen ] : ........................... Browse : [Backspace ] : [Normal ] : [Normal ] : [Normal ] : [Medium ] : [ ] : [ ] Keyboard [ ] : 16 Blinks: [] <Color> : [ ] : [Off ] : []

Explicit exit : [] Function keys locked: [ ] Clock skew : 0

9.9.1: Setup: Bell abuse settings This dialog allows you to set the BELL_ABUSE parameters. Disable bell when overused This many bells In this many seconds Seconds of silence required : : : : [] [5 [2 [5 ] ] ]

9.9.2: Setup: Local echo mode A late addition to IVT, this will simply echo everything you type to the screen. If the host is also echoing, you will see everything twice. If the host is not echoing, you can use this to make the things you type visible. It can be turned on and off from this dialog. This is also handy if you want to try the effect of some function keys and such within IVT. This feature can also be turned on and off by the host by using the CSI 12 l/h command. When you want to turn on local echo for a session automatically, use a small script such as: ONCONNECT * LocalEchoOn Script LocalEchoOn HIDE VTECHO "\1B[12l"# Send CSI 12 l, turns local echo on. END

IVT User Manual, Version 23.0 9: F3: IVT Setup dialogs 9.10: Mouse setup 9.10: Mouse setup

Page: 48

This dialog allows you to configure the actions taken by IVT in response to mouse action. Mouse mode : Cut mode : Hide while typing : Copy scroll speed : Wheel scroll factor : Wheel scroll page size : Leave selection visible: Word/phrase selection : Extend to full line : Use strict CUT mode : [Cut/Paste] [Block] [] 4.. 1 24 [] [IVT (double button) ] [] []

IVT uses the mouse very extensively, please have a look at the special mouse chapter, especially the advanced possibilities. 9.11: Color setup Colors can be specified multiple ways. Some forms go all the way back to the first MS/DOS version of IVT. The preferred syntax is the 2nd column. 0Black 1Blue 2Green 3Cyan 4Red 5Magenta 6Brown 7White 8Grey 9Brightblue 10Brightgreen 11Brightcyan 12Brightred 13Brightmagenta 14Yellow 15Brightwhite Actually, any combination of "bright" with a color is valid, so you can also specify "brightblack" (grey) and "brightbrown" (yellow). All color statements in IVT.RC can take either the name or the number as a specification of the desired color. See also COLORS. Note that IVT will swap the selected background color with the VT220 default (black), so that when a program explicitly selects black, IVT will use whatever background you select, and when the application selects your background color, IVT will use black. This will keep color displays readable (and I know of one application that selects black foreground color to hide passwords by making them black-on-black so they would show when the background color of IVT was white... See also SOFTBLINK. Current session : Ready indicator : Reverse CUT : Cut colors : Help screens : Selected hyperlink : Unselected hyperlink : Cursor foreground RGB : Cursor background RGB : Search foreground RGB : Search background RGB : Underl. foreground RGB: Underl. background RGB: Blink foreground RGB : Blink background RGB : <Redefine ANSI colors> 9.12: Font and Keyboard This panel controls the main look & feel options of IVT. Current font Font quality Poorman's linedraw Autom. resize font 8-bit chars displayed : : : : : Face=Lucida Console,Points=9 Default [ ] [ ] [Codepage] [DEC ] [White [Black [ ] [White [White [White [White 0 0 0 255 0 0 255 255 0 0 255 255 0 0 255 255 ] [Black ] [Green ] ] ] ] 0 0 0 0 0 0 0 0 ] ] Example Example

[Blue ] Example [Blue ] Example [Green ] Example [Red ] Example <Modify> <Modify> <Modify> <Modify> [ ] <Modify> <Modify> [ ] <Modify> <Modify>

IVT User Manual, Version 23.0 9: F3: IVT Setup dialogs 9.12: Font and Keyboard

Page: 49

8-bit commands are : [Executed] Received data is in : [ISO-8859-1:1998 (Latin 1, West Europe) ] Treat ambiguous CJK as wide: [ ] National replacement : [US ASCII ] IVT dialogs are in : [English ] Input language : [Use system default ] CAPS lock mode : [Allowed ] [] CAPS+SHIFT is lower case [] PF1-PF4 on top row numpad [] Recognize ALT-0/9 on foreign keyboards [[ ] Key click [ ] Keyboard debug [ ] EMACS ALT is META 9.13: Log settings This dialog controls the creation of log files of session data. The top of the dialog shows the current logging settings. Autolog name : Autolog mode : Timestamp lines : Write file header: Show in status : Start mode : ............................................. [Off ] Suspend Resume [] [] [] [Ask user ]

Automatic logging can also be combined with a script, see this example. 9.14: Windows setup Menu bars : Vertical scroll bar : Status line : TABs bar enabled : Tab text : Full screen scrollbar : Extra vertical border : Delay before tooltips : Address book size : Auto complete hosts : Show start-up tips : Window position : Window coordinates X: Always on top : Window transparency : IVT title bar displays: Fixed title bar text : Software blink speed : <Propagate settings> [] [] [] Borders : [] Middle: [Clock] [] Close icon: [] Confirm: [] [User@Host] Adj: 0 [] Menu bar [] Statusline [] 2 Horizontal: 0 300 Keep for : 3000 25 [Any ] [ ] [Last known] 10 Y: 20 <Copy current> [ ] 0 (0 disables) [Session comment] Test comment....................... 400 <Show IVT splash screen> 9.15: Printer setup This dialog allows you to add, delete and modify printers. You can also assign a specific printer to the current session, change the default printer and modify the way these manual pages are printed. If you make changes to Windows printers, these changes can be saved to the registry. When IVT starts up, it will re-apply the changes to those printers. When printers are removed, the IVT extra settings will be discarded the next time you save the setup. Printer : [hp deskjet 930c series (Dflt) ] Font : Facename=Lucida Console,Points=9 Open for : [Append ] Timeout : 28.. <Properties> Print mode : [Off ] Auto landscape : [] Font scaling : [] Black/white only: [ ] Auto Form Feed : [] Prompt if exists: [] Controller mode : [Raw ] Mode : [Off ] <Make this printer the default> <Add a printer-to-file> <Delete this printer > Print screen with statusline: Confirm print screens : Confirm print selections : [] [] []

IVT User Manual, Version 23.0 9: F3: IVT Setup dialogs 9.15: Printer setup Print screen with timestamp : [] Manual prints lines/page : 61. Manual prints indents : 10.

Page: 50

With this, you can control the logical printer for the current session, or ad new (logical) printers for the current (and future) sessions. IVT will show all your Windows printers here, with their normal names. You cannot delete such printers, and you cannot set a page length for them (this depends on the paper size and it automatically determined at print time). You can click on the FONT line to change the font used for all text output to printers. Click on the <Properties> button to change the default properties for the printer. All other printers are files, and treated as such. If you just want to print a Unix file, check out the privt support program! This prints Unix files on your Windows printer! IVT can manage multiple printers (each 'printer' can be any writable file). A session can be connected to one of these printers. A printer may be shared by several sessions (output will be intermixed from all sessions). Of course, different sessions may have different printers, which can all be simultaneously active. A printer is selected in this F3 screen. Logical printers can be added by clicking on this button. A newly created printer becomes the default for the current session only. will become the default printer for new sessions. The PRINTER keyword can be used in an IVT.RC file to define the default printers. Every printer has an overwrite/append flag that determines how the printer When 'append' is selected, output is appended to that file. For a true device the setting is (usually) irrelevant. of seconds has elapsed without activity for the printer, it will be closed automatically. A printer is 'opened' by the first session that sends something to that printer. This can be done by: - Using the F2 (print screen) function key. This will give you a dialog which has to be confirmed or escaped (but see CONFIRM_PRSCREEN). This is the standard Windows printer-selection dialog. - Using setup and setting 'Printer Mode' from off to either controller (where output goes ONLY to the printer) plain text (lines are printed only when the cursor leaves the line in a normal way) or all text (where every received byte is also sent to the printer (including escape-codes)). - The host can use VT100-escape sequences to control printing. When a printer is active for the session, a icon will show in the status line The printer is not closed until a "FLUSH PRINTER" button is used from the main setup screen, or the specified PRTIMEOUT value elapses without activity. Closing will cause actual printing to start on spooled (network) printers (this prevents every PrintScreen from becoming a separate spooled print job, thus saving paper, banner-pages and aggravation). Using the black & white feature will suppress color printing. Also, you can record an entire session to a printer without generating many individual print jobs every time nothing happens for a few seconds (but see also AUTOLOG for better ways of logging sessions). See also PRINTER, PRTIMEOUT , AUTOLANDSCAPE, PRINTER_FONT_SCALE and PRBLACKWHITE. 9.16: Keyboard macros Keyboard macros allow you to program keys manually (learn mode). You choose a key you want to program, and start the recorder. IVT will switch you to the session screen and will start recording every keystroke. You end learn mode (which is indicated in the status line by an icon) by returning to setup and choosing the <Keyboard macro> button again (which will read "END MACRO" in that case). Alternatively, type Shift+Ctrl+End or use the menu bar. See LEARN for details, or click on any of the links below for detailed help on that particular option. Macros are saved into the registry when you save your setup settings. <Choose key to program>

IVT User Manual, Version 23.0 9: F3: IVT Setup dialogs 9.16: Keyboard macros This session only Match LEFT/RIGHT Shift Match LEFT/RIGHT Ctrl Match LEFT/RIGHT Alt Match CAPSLOCK key Match NUMLOCK key Match SCROLL LOCK key Match Scan Code Recursive expansion Type of programming Fixed string value Script to invoke Function to perform : : : : : : : : : : : : : [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] []

Page: 51

<Read/Write macro files> <Delete all macros>

[Keyboard recorder ] .............................. .............................. ALT-0 (any key)............... <Cancel> <OK>

<Start recorder> <Delete key>

For a detailed explanation on key macros and their many options, see the special chapter on learn mode. 9.17: Encrypting files Filename : ............................................. <Browse for file> Use default password: [ ] Password : ........ Password (retype) : ........ <Encrypt> <Decrypt> This panel allows you to encrypt or decrypt files with either a default key or a password you supply. When a default key is chosen, the file can never be decrypted (!), but can be read by IVT during start-up without prompting for the password. However, see also CRYPTPWD, which allows you to store keys in a file which is encrypted with the default key (so IVT can decrypt that file, learn your passwords, and decrypt other files without prompting for the password). See Encrypting .RC file for more details. 9.18: ZMODEM setup Download directory : Host has buggy binary : Autodetect ZMODEM transfer: Maximum &packet size : C:/tmp/transfer.................... [ ] [] [1024]

9.19: Setup: Reset terminal When you type an F3-R sequence (or click on the "Reset Terminal" button in the main F3 setup panel), the virtual terminal will be reset to default settings. Use this when the session has gotten stuck or in an inoperable stat due to (for example) sending a binary file to the terminal (cat-ting an executable is an oft made Unix error that can bring a terminal in such a state). F3-R will do everything that a host initiated reset command does, and will also: - Cancel any running script (see also F3-C); - Clear the history buffers. The last feature is useful if you want to do a simple sort of file transfer. You can first clear the history pager buffers, then start a command sending a lot of output to the terminal, then use ALT+s in pager mode to save the entire buffer contents to a file. By the way, also look into F3-D for a quick way of getting rid of unwanted output sent by a host. Note: F3-R resets the current terminal to the terminal defaults. If you have made configuration changes that affect all sessions (like the font, or the extra border size, the title bar setting or the status line settings), they are NOT restored. For that you'll have to change them back or exit IVT and restart. 9.20: Setup: Cancel scripts The F3-R command resets an entire terminal. One of the results of this is that any running script is cancelled. The F3-C command (either typed or by clicking on the "Cancel Scripts" button in the main F3 setup panel) is less destructive - it ONLY terminates

IVT User Manual, Version 23.0 9: F3: IVT Setup dialogs 9.20: Setup: Cancel scripts

Page: 52

all scripts and threads that are active for the current session. Use this if a complex chat-script runs into difficulties due to unexpected responses from the host. Aborting a script also undoes any DISPLAY OFF command, and restores any temporary status text set by a STATUSTXT command. Any existing WINDOWs are killed. See also the CANCEL statement, by which a script can protect itself from termination by either F3-R or F3-C. Such a script can only be stopped by a KILL, termination of the session or its own free will. 9.21: Setup: Dump data Sometimes, a host is given a wrong command and starts sending tons of binary garbage to the terminal. In Unix, cat-ting an executable file is a well-known example of this. Normally, you would interrupt this with ^C, but sometimes th network has accumulated tons of data in buffers that IVT has to wade through because the buffers are not always cleared when you use ^C. Normally, this is not a problem because IVT is so fast, but binary data can contain a lot of garbage that causes a lot of processing in IVT - the most obvious example is a BELL character which will cause IVT to ring the bell for a substantial fraction of a second. For some unknown reason, there are a lot of BELL characters in the average executable :-) Whenever a host starts doing this, you can use the F3-D command - IVT will start throwing away everything that arrives on the session without actually looking at the data - it only counts the number of characters discarded this way and displays this counter on the screen. It will keep doing this until: - Nothing arrives on the session for more than a second; - You type a key. In both cases, IVT will then switch back to the session. Afterwards, the F3-R command may be needed to get rid of side effects of the garbage that got processed before you managed to type an F3-D. 9.22: Setup: Flush printer Printers are usually not attached physically to a Windows PC anymore. Usually, you will have a network connection to a printer. When the printer is opened, all output is accumulated in a file which gets printed when the printer is closed. This is different from a real VT220, where a physical, noisy printer could be attached to the back of the VT220 terminal, and every line (or character) would get printed immediately. When IVT opens a printer, a printer icon shows in the status line. The printe stays active until: The timeout expires; You click on the printer icon on the status bar. You click on the <Flush Printer> button (or type F3-F); The host sends an ESC<space>p command or you use this in a script via a VTECHO command (the old way); - You use an IVTFUNCTION with "Flush Printer (F3-F)" argument (the new way). Only then will your job actually start printing (or the file is closed in cas of a (manually added) printer that is actually a file). See also AUTOLOG.

IVT User Manual, Version 23.0 10: F4 - Help & Various functions 10.1: F4-S: Session ordering This is an important feature, others are prev/next 10: F4 - Help & Various functions 10.1: F4-S: Session ordering Using F4-S(essions) will take you to a panel that shows all existing sessions and their primary attributes. These attributes are: - Seq. Sequence number of the session, shown as the first number on the status line. Automatically assigned and managed by IVT.

Page: 53

- Grp. The group code of the session. See below for manual editing and CREATE for automatic assignment of group codes. - Prt. The protocol of the session. TLN=Telnet, RLN=Rlogin, SSH, or SER=Serial. - Hostname. Name of the host or device that the session is connected to. This is also displayed in the status line. It can be set manually in this screen (see below) or using CREATE. From a script, it can be set using the STATUSHOST command. See also SESSION_OVERVIEW, which also determines what you see here. - Comment. Descriptive comment that is also displayed in the status line. It can be set from a CREATE statement or (manually) below. From a script, it can be set temporarily with the STATUSTXT command or permanently with the STATUSTXTFIX command. The HOSTLIST command is another source of comments. This field is very useful to describe the purpose of the session. Personally, I find it very handy to have a number of CREATE statements in my IVT.RC file to automatically create a bunch of sessions during start-up of IVT (using the -A command line option and an OPTIONS statement in the ivt.rc file to take care of the rest of the options. While in this panel, you can perform the following actions: - Use the "Move UP" and "Move Down" buttons to change the relative order of sessions. This will drag the currently selected session to a new place, and reassign all session-sequence numbers. You can also type a number in the "Move to" box and that will move the currently selected session to the indicated position (or the nearest possible value if the number you give is too high). - Click on a line in the main window to select that particular session. - Double-click on a line will select the session and switch to it immediately - Click on the "Save as a group" button will use the current set of connected sessions and turn them into a CREATEGRP. Host name, user name, protocol, comment, profile and the order of the sessions are preserved in this group. This means you can re-create these sessions with only a few mouse clicks. The group is created in the registry, which means you can use the sessions group editor to tweak the group and the individual sessions in the group. After clicking on the "Save as a group" button, you will be asked for the name of the group. When a valid (unique) name is given, the group is create and the editor for it is started (so you can add a description and other options and details for the new group). The group can be started as any normal group (by using the group name as if it is a host name, using the "Groups" button in the "Create session" dialog and so on). - Click on the "Kill session" button will ask for confirmation before forcing a disconnect on that session. For normal TELNET sessions, this implies that any programs running on the host will receive a SIGHUP (hang-up signal), which should terminate them. It has the same effect as typing ALT+F4 while in the session screen. When the last session disappears, IVT will exit (but see also the EXPLICIT_EXIT directive to change this). Click on the "Edit/details" button to view or change the session details. This will bring up a new dialog with the following fields: - Session (same as the "Seq" field in the previous panel) - Id. This is the internal identification of the session, shown as part of the 'session established' message. These numbers may show up in network tables of the PC (file descriptors, sockets and so on). - Protocol, IP version and remote address. The protocol will be something like "SSH" or "TELNET". The IP version will

IVT User Manual, Version 23.0 10: F4 - Help & Various functions 10.1: F4-S: Session ordering

Page: 54

be 'IPv4' for an old-fashioned IP connection and IPv6 for a modern one. The remote address will show the actual address. For an IPv4 session, this will be a dotted-decimal address and port number, for IPv6 it will be the full hexadecimal address and port number. For non-IP sessions (serial, netbios) the TCP/IP fields are omitted. - Hostname, as it appears in the status line too. You can edit this, which is useful when you rlogin or telnet away from the machine IVT is connected to (so the machine you are working on is no longer the one displayed in the status line). See also this part of the status line. - Comment. See description above. Free text. - Tab text. A right-click on the tab of a session takes you straight to this dialog that allows you to set a different text for the tab. The TABSBAR command determines the type of the default text, which can be overruled by the SetTabText function or by manually typing another value here. When you make this field empty, the default is again supplied. The icon of the tab can be set using the SetTabIcon script function. - Group code. This is a single character or digit. Groups allow you to treat a number of related sessions as if they were the ONLY sessions running in IVT. Having several groups is logically the same as running multiple instances of IVT, but it is much easier to switch between groups then it is to switch between programs. Using Ctrl+Cursor keys will only switch between sessions in the same group, the status line will show the current and total number of sessions for the current group only (but will also show the code of the currently selected group, or a '+' if the current groups is a blank (default) but other groups exist). Switching between groups can be accomplished by using ALT+g or from the F4-S screen where ALL existing sessions are displayed. Groups are handy if you have many sessions, some of which are related to each other and you want to treat the group a logical unit of work. The default is to have a 'blank' as the group code, but you can set one using one of the parameters of the CREATE statement automatically. Also, the "More" setting of the "Create session" dialog allows you to enter a group code fo the session you are about to create. When you (multiple) select hosts from the address book, that dialog also allows you to specify the code for all the sessions you are about to create Finally, you chan change the group code of an existing session by using the F4-S screen, or by right-clicking on the tab and choose "Edit". When activity in groups other than the current one is detected, the status line will show a 'G' code in the last position of the activity indicator. You can also quick-select the F4-S screen by clicking the mouse on the position of the hostname or comment-parts of the status line. Yet another way is to select the WINDOW menu on the menu bar. This is an important feature, others are prev/next 10.2: F4-G: Create a named group of sessions The CREATEGRP statement can be used in an IVT.RC file to describe a logical group of sessions. The group has a name and a description. Your setup may have multiple CREATEGRP statements, each group presumably describes a group of sessions you want to create in a single operation. Such a group of sessions can be created by typing the name of the group at the Ctrl+PgDown prompt, but this screen offers an even easier way. The F4-G screen shows all such named CREATEGRP groups (name and description). The standard cursor keys can be used to select an entry, the ENTER key can be used to select the current entry. Even easier is to simply click on one of the lines. There is an entry on the menu bar in the SESSIONS menu too. IVT will immediately create the bunch of sessions that belong to the group. When you use the password learning and autologin system, all these sessions can log in and perform some task after logging in too! This means you can create a whole bunch of sessions with only a few mouse-clicks that will start your mail, news etc. programs for you on demand. Using the -A or -agrp command line options allows you to do this from a shortcut on your desktop or your start-up folder. 10.3: F4-X: Managing scripts Scripts can be written and stored in IVT.RC files. IVT will read these files at start-up. You can also explicitly read files using F4-X-R, which is convenient when you are developing scripts. A script is parsed and loaded into memory, from where it can be executed by using F4-X, selecting the proper script, and typing ENTER.

IVT User Manual, Version 23.0 10: F4 - Help & Various functions 10.3: F4-X: Managing scripts

Page: 55

Alternatively, you can simply click on the appropriate line. A script can be removed from memory from the F4-X screen by typing DEL there. Scripts come in two types: Visible and HIDDEN ones. Visible means that the F4-x screen will show them and the user can invoke them. HIDDEN scripts can only be called by other scripts. When a script is not hidden, a DESCRIBE statement can be used to describe the purpose of the script. This will be shown in the F4-X screen, too. When complex series of scripts are developed (such as the modem dialer example) it can be convenient to have them in separate files, which can be INCLUDEd from your main IVT.RC file. Any of these files can be encrypted, IVT will prompt for the password when none of the passwords it has remembered work. Scripts can take parameters. The F4-X screen does not offer any interface to pass parameters, however. When required, you will have to write a wrapper script that interactively asks for these parameters (e.g. using KbdLine or PROMPT) and then calls the function actually desired.

10.4: F4-K: Managing macro's All keys in IVT are programmable in various ways: - Using F3-L, you can put IVT into learn mode. The new key definitions can be stored in a file using F4-K-W, and can be loaded again at start-up of IVT using the LOAD keyword in an IVT.RC file. These keys can be programmed per session or for all sessions. Use this when you find yourself repeatedly typing the same keys in the same order. - Using the BIND command, you can cause a SCRIPT to be executed whenever you type a key. This allows for more complex things, since the script can use SEND, WAIT and IF statements to interact with the host. Use this when the interaction with the host fails with learned keyboard macro's because IVT 'types' to fast. See also BIND_SYNC. - Using the KEYMACRO command, which is a newer and more powerful form of the BIND command and accepts any key-combination instead of only the standard VT220 key names of the BIND command. - Keys can be programmed using the keyp Unix program. This employs a standard vt220 escape sequence to program vt220 keys, and an IVT special sequence to program other keys. This can be used to program keys regardless of what emulator you are using. Handy when you do not control the IVT configuration files. - Standard vt220 keys can be programmed in an IVT.RC file simply by naming it like thus: NXTSCR "ls -lab\r" programs the "NextScreen" key (the PgDown key on a PC) to emit a directory listing command. The KEYMACRO is a newer and more powerful command for this.

IVT User Manual, Version 23.0 11: Protocols supported by IVT 11.1: Overview of supported protocols This is an important feature, others are prev/next 11: Protocols supported by IVT 11.1: Overview of supported protocols One of the major features of IVT is that it can run several sessions

Page: 56

built-in session (higher-level) protocols. See the PROTOCOL IVT.RC statement for a description of how to select these protocols. with or without support for any of them. See the PROTOCOL documentation for a list of protocols actually supported by THIS version of IVT: - SERIAL The COM-ports of your computer using either a built-in or external modem or a direct line. An entire chapter is devoted to this protocol. - NETBIOS A LAN interface found on many PC's. Win'95 (and NT) even support the NetBio interface over TCP/IP (to confuse the issue here :-) This protocol was common around 1995, but has faded out of view ever since. - TCP This is on MS/DOS only. IVT uses FTP Inc.'s commercial, proprietary TCP/IP stack to communicate over TCP/IP. - WinSock A way to interface to TCP/IP on Windows machines. All modern PC's use this to communicate over a network. This version of IVT supports both IPv4 and IPv6 sessions. When you use a network protocol, the hostnames you use must match the convention of that protocol. This means that hostnames typed in on the command line, CREATE statements or the CTRL+PgDown prompt depend on the protocol that will be chosen by IVT for the new session. This can be set usin either the setup screen or the PROTOCOL statement. Each section below describes the possible hostnames you may use for that particular protocol. IVT also supports several session protocols to run on top of the transport protocols. For example, on top of TCP/IP you would have to use either RLOGIN or TELNET to get a login session with a Unix machine. The session protocol TELNET The classic TCP/IP network terminal emulation protocol. Kerberos An authentication and encryption layer on top of TELNET. RLOGIN A simple system based on (unwarranted) trust. SSH Secure shell which encrypts network traffic. MULTI This is a special IVT multiplex protocol that can run on top of anything and can be used to have multiple sessions on a single connection (usually, a serial connection). See the appropriate sections for further details. 11.2: Transport protocols 11.2.1: The NetBios transport protocol When the NETBIOS protocol is chosen, IVT will check to see if NetBios protoco stacks are available on your computer. The NetBios interface is actually only an API (application program interface) that will usually use NetBeui or TopNetBios or some such protocol as the actual transport. But it is also possible to use another transport (such as TCP/IP) "underneath" a NetBios API the Win'95 machine offers several logical NetBios adapters, which (in olden days) were used to connect PC's to several LAN's using several physical network adapters. On Win'95 (or NT) one of these "adapters" is actually NetBios-over-TCP/IP, wider use than Netbeui. IVT will check for the presence of logical adapters and broadcast a unique name on each network it finds (a necessary ritual on NetBios networks). When a connection needs to be established, it will attempt each network in turn. When a successful connection is established, IVT will remember what network it found this host on, and the next session will be attempted at that network first (since a failed attempt can take many seconds and you will usually talk to hosts on one network only). NetBios hostnames are typically names (just one word), such as "SERV01". Sometimes, these names end in ".LOGIN", so a typical name might be SERV01.LOGIN. OliNet LAN was the birthplace of IVT, so IVT still appends this

IVT User Manual, Version 23.0 11: Protocols supported by IVT 11.2: Transport protocols 11.2.1: The NetBios transport protocol

Page: 57

.LOGIN as a default to every NetBios hostname unless you tell it not to by using the -L command line option or the OPTIONS statement in an IVT.RC file. This protocol has fallen out of use ever since 1995 or thereabouts. WinSock is now the protocol of choice. 11.2.2: The TCP transport protocol Sorry - this MS/DOS protocol is not in this version of IVT. The second protocol to be supported by IVT was FTP Inc's TCP/IP implementatio for MS/DOS based computers. This commercial package offers a TCP/IP stack together with a package to develop applications on top of this stack. IVT uses the 'telnet' library offered by this package to enable it to make direct login connections using the telnet protocol. Actually, this introduces a design problem, since IVT ought to support its own TELNET session-protocol on top of any transport protocol (such as the socket interface also offered by this development package). But time was shor and the functionality was important, so the IVT transport "TCP" is actually a transport + session protocol rolled into one. Later, this was rectified with the introduction of the WINSOCK transport protocol and RLOGIN and TELNET session protocols. You need to purchase Ftp Inc's DOS stack to be able to use IVT with the TCP protocol. IVT will automatically detect this protocol and use it when no othe LAN interfaces (such as NetBios) are detected. When you specify a hostname to connect to, you must either specify a name tha can be resolved by your TCP/IP setup (using the hosts files and/or DNS name services) OR a dotted-address style internet address (like 145.72.248.60). Optionally, this address can be followed by a : and a port number. The default port number is 23 (telnet), but you can connect to other ports this way (the SMTP port 25 being the most popular one). This notation can be used in CREATE statements, too. The current telnet protocol also allows a few special TELNET functions, accessible via this setup screen. 11.2.3: The WINSOCK transport protocol Adding the WINSOCK interface to IVT was no small feat. IVT was a DOS program, and WINSOCK is a Windows Socket interface (Sockets being a way to interface to TCP/IP networks). After a brief and disappointing experiment with Winsock for DOS and the DJGPP C-compiler I discovered I could compile large hunks of IVT with the visual C++ environment for Windows. The result was a text-mode Win32 application, which has full access to all the Windows calls without the GUI overhead. This enabled me to write an IVT WinSock layer, on top of which I wrote a TELNET engine (from scratch). The other protocols (NetBios and Serial) were also rewritten for Windows. I had to make many modifications to the video and mouse system, just about rewrote the keyboard handler and many more small modifications to make IVT run happily under Windows 95 and Windows NT. New commands were added to take advantage of the Windows possibilities. The color handling is now much nicer, variable window sizes are used, sound files can be played, etc. We are talking several months of work here! IVT is now a fast, flexible, native Win32 application. In the summer of 2002 I decided to make IVT a GUI application. Trouble with the mouse, keyboard, the latest versions of Windows and the clumsy resize of IVT windows, no font support, no scroll bar and so on finally bothered me enough to do something about it. Version 16.1 is a true GUI program, has true underlining, a scroll bar, font support, true double-wide and double-high characters, and so on. Internally, that meant making IVT a multi-threaded application, yet another rewrite of keyboard and mouse handling, and several thousands extra lines of code to deal with the extra possibilities. Anyway, WinSock is the underlying transport protocol for (in this build): - TELNET, - Rlogin In the fall of 2010, IPv6 support was added. The code for resolving addresses

IVT User Manual, Version 23.0 11: Protocols supported by IVT 11.2: Transport protocols 11.2.3: The WINSOCK transport protocol

Page: 58

needed a rewrite for this, and many changes to the code for connecting sessions (when a host has multiple addresses with a mix op IPv6 and IPv4 then IVT will try them in sequence. Port forwarding, proxy support and so on all had to be made IPv6 aware. 11.2.4: The SERIAL transport protocol Support for serial communications was introduced in version 7.3 of IVT and wa the third way to connect to hosts (next to NetBios and TCP/IP). Serial lines are really very different from LAN-connections. They are much slower, you can have only one connection on them, and the host you connect to depends on where the physical wire goes. A direct connection is used to connect your PC running IVT to a serial port on another computer, or you can use a modem to dial into other computers via the telephone network. See the dialer example for further info. When you are a LAN-user of IVT, the slowness and single-naturedness of these connections is something you have to get used to. To overcome the limitations of these serial connections, IVT comes with two extensions: - Dialer You can provide a file which describes telephone numbers and names of systems you can reach over a modem connection. IVT will dial for you and (optionally) do the login for you. - IVTM This is a Unix program that allows you to use the remote Unix computer that you access over a modem, with several sessions simultaneously as if you wer sitting on its local LAN. This is very, very powerful and once you get used to it you'll wonder how you ever got along without it. When the initial connection to a serial "host" is made, IVT only opens the serial port of the local computer. Therefore, the hostname specified on the command line must take the form of: COMn[,baud[,parity[,databits[,stopbits]]]] Where all these fields have the following meaning: n - The port number (1 - n). This version of IVT supports port numbers larger than 4. Internally, the necessary work is done to support port numbers over 10. baud - Baud rate (110, 300, 1200, 4800, 9600, 14400, 19200, 38400, 56000 or 112000) parity - None, Even, Odd, Space, Mark databits - 7 or 8 stopbits - 1 or 2 Example: COM2,19200,n,7 Only the port number is compulsory, the rest is optional and defaults to: 9600,n,8,1 The IVT.RC commands you can use to change the settings of a serial port are: BAUDChange the speed (baud rate) of the connection. PARITYSpecify the parity-bit to be used. CARRIERSTATUSWhat to do with the CARRIER signal of the serial line. DBITSNumber of data bits. SBITSNumber of stop bits. CTSRTSHardware flow control on/off. FLOWREMOTESet remote flow control to on or off. FLOWLOCALSets local flow control to on or off. RINGUse PC-speaker as phone bell. The status line will reflect the current port selections. The leftmost position is used as modem indicator. The serial setup screen also allows you to verify and change all serial port settings. Starting from version 14.1a, you can also send a BREAK signal on a serial line. From this setup screen, you can initiate either a short (250 Ms) or a long (1.5 seconds) break. This puts the connection in a special state that is sometimes used to wake up a remote host or reset the connection. When you click or enter on the appropriate line, you will be switched back to the session automatically.

IVT User Manual, Version 23.0 11: Protocols supported by IVT 11.2: Transport protocols 11.2.5: The multiplex transport protocol This is an important feature, others are prev/next 11.2.5: The multiplex transport protocol

Page: 59

IVT allows multiplexing multiple sessions over a single connection. Very handy when you are using a non-LAN connection (e.g. serial line), though this session protocol is also supported on all other transport protocols. This mode is entered by running the Unix multiplexer ivtm on the remote end. The 'normal' session disappears, to be replaced by a new login on a pseudo terminal on the Unix host. This login is necessary to make sure that you get a 'real' new login session that is registered as such in Unix (in the utmp file, for example). The original session is made non-writable because a special protocol is now spoken on it. A message from the sysop (using e.g. wall) would interfere with this protocol. New sessions can be created/closed in a normal fashion, the only difference being that you do not start a session to a computer, but must specify a remot command that will be started on a new pseudo-terminal. The default command is telnet %s, where %s is substituted by whatever you specify as hostname. This default command can be changed using the MLDEFCMD IVT.RC setting (e.g. rlogin %s). The upshot of all this is that, once ivtm is started on Unix, you can pretend you are on the local LAN of that computer and create sessions to all other machines on that LAN. Everything works the same except for the telnet escape character of the Telnet running on Unix (usually CTRL+] or CTRL+A). This will give you a telnet prompt which you might not expect. Logging out from a session will terminate the particular telnet (or rlogin), which will cause ivtm to send a special message to IVT so it can close the session. Depending on the setting of RECONNECT, this will either display a message that the session ended (when RECONNECT is in effect) or wil make it quietly disappear (when NO_RECONNECT is in effect). When the last session started from IVTM terminates, IVTM itself exits. This should cause your 'raw serial' session to reappear, and things are back to th way they were before you started IVTM (a single serial session). There is another problem that arises when you use a modem dialup to a host on which you want to run ivtm. The binary protocol used by ivtm can confuse hardware between IVT and the Unix host (modems, port selectors, multiplexers and what have you). XON/XOFF characters are notorious, so are NULL characters that sometimes get eaten somewhere along the line. If you already used TELNET or RLOGIN before reaching the host you run ivtm on the escape sequences of those programs become special, too. To avoid these special characters, use the MLFILTER command. Here you can (taking 3 bytes rather than 1, so don't overdo it). Remember that all the sessions used from ivtm have to share a single modem connection with limited speed. Doing a file transfer in one session will have a noticeable effect on performance in the other sessions. Also, consider what has to happen when you use F1 (Hold Screen) on one of these sessions. IVT cannot simply stop reading (like when it is a LAN session) because data intended for that session would block data intended for other sessions. Therefore, IVT will send a message to ivtm when F1 is pressed, which will cause IVTM to stop sending data for that session. Another F1 will resume output. This makes F1 less immediate than usual, but that is a small price to pay. The last catch has to do with systems that fail, causing the link between IVT and IVTM to be broken (modem that loses a connection, crashing Unix system (rare, but happens :-) or a failure in either IVT or IVTM. The 'solution' for this is that you can forcibly disconnect sessions by using ALT+F4 in the normal fashion. The FIRST time you do this on a session managed by IVTM, IVT will send a termination message to IVTM. Normally, this will result in a close of the session, which is acknowledged by IVTM, which will result in a normal shutdown of that session. If IVTM is not responding (for whatever reason), a SECOND ALT+F4 will result in an immediate local abort of that session in IVT. This way, you can clear all sessions that are left behind when the modem connection is lost. On the IVTM side, all sessions will be killed automatically when the connection to IVT disappears prematurely, and IVTM itself will exit. Normally, this should free up everything, making the dial-in available again. Multiplexed sessions can be mixed with 'normal' sessions, so you can have a LAN session between your PC and Unix box at home, while simultaneously dialin out through a modem to a Unix box that runs ivtm.

IVT User Manual, Version 23.0 11: Protocols supported by IVT 11.3: The IVTM program 11.3: The IVTM program This version of IVT supports the multiplexing protocol.

Page: 60

The multiplexing protocol allows you to run several independent simultaneous sessions over a single connection (such as a serial line). It will also work over other types of connections (such as TELNET or RLOGIN sessions). The details about using ivtm are explained here. This section explains how to get the ivtm program running on your Unix hosts (which is currently the only environment supported by IVTM). In your IVT distribution kit you'll find the file 'ivtm.c'. This file can be compiled on: - SYSVR4 (STREAMS based PTY's); - Linux; - HP-UX. Ports to other flavours of Unix are possible. Simply typing: make ivtm to any Unix prompt should result in a 'cc -O ivtm.c -o ivtm', which implies a default compile of the source into an optimised 'ivtm' executable. Simply starting this executable (no parameters) should be everything you ever need to know about it. When things do NOT work as advertised, you might try: ivtm -d Ask for support (at ivtsupport@softwarevoordelig.nl) if you have trouble. 11.3.1: The DUMMY transport protocol The DUMMY protocol is a late addition to IVT (appeared in version 20.1). It is a very simple protocol: - Any connection to any host will immediately succeed; - The session never sends anything by itself, never fails, never goes into an error state and never disconnects by itself; - Anything you SEND (or type) on the session is echoed back using VTECHO so you can use all VT220 escape sequences and commands. The reason for this protocol is that sometimes you just want to use IVT as a batch system that connects dynamically to all sorts of hosts, or even just reads and writes local files. IVT insists that you have a session context to run scripts in, so you need a connection to "something" before you can call scripts, have variables, and ar able to create THREADs or FORK sessions. Without the DUMMY protocol, you would have to resort to a connection to some localhost port, or a serial connection, or even a real connection to some host you happened to have just to satisfy the session requirement. All these have serious problems, since a serial port may not be available, or the localhost connection can fail or cause problems (by sending some data you did not expect or want), the remote host can be down or unreachable, etc. Because a connection to a host using the dummy protocol is a full blown session, you can use the full array of commands and variables IVT has to offer. You can use the actual HOSTNAME variable as a sort of label (it appear in the status bar). You can have as many simultaneous sessions to DUMMY as yo require. You can choose the DUMMY protocol from the command line using the -D option. 11.4: Session protocols 11.4.1: The TELNET session protocol The WINSOCK transport protocol enables IVT to use the TCP/IP layer of Windows workstations. However, this in itself is useless without a transport protocol such as TELNET or RLOGIN. TELNET is an old and very widespread protocol. It can be used between very different types of computers because it implements a device called an NVT (Network Virtual Terminal) on both sides of the connection. The NVT must implement a number of basic features and handling the peculiarities of the local operating system and/or hardware is the task of the telnet terminal or

IVT User Manual, Version 23.0 11: Protocols supported by IVT 11.4: Session protocols 11.4.1: The TELNET session protocol telnet host.

Page: 61

Besides the basic features, many options were added to the TELNET protocol. The basic NVT implements a negotiation protocol for these options. Every TELNET implementation can request a certain option to take effect and it can reject every option that it does not know about. This allows advanced implementations to work with older and/or less advanced peers. Every option is described in a separate RFC (Request For Comment). The texts of these RFC's are freely downloadable from the Internet. I've downloaded all of them and implemented a lot of them, which makes IVT one of the most complete TELNET implementations around. I have seen many "modern" hosts reject requests from IVT to enable a TELNET feature that IVT knows about. When you enable TELNET_TRACE, IVT will show the negotiation process on screen For every request the host makes, IVT will show "Received DO <option>". The option is described and the RFC that defines it is named as well. When IVT can handle the option, it will say 'WILL <option>'. When IVT cannot or will not do the option, it will say 'WONT <option>'. Usually, the host will start by sending a bunch of options that it wants enabled. When these are all answered, IVT will inspect unrequested ones that it would like to see enabled and give it a try by sending out its own 'DO' commands. Usually, it is rewarded by a bunch of 'WONT' answers because these are the ones the host does not know about. For some options, when a host receives a 'WILL' from IVT, it means that the host is now allowed more complex commands, such as the 'Terminal Type' option When the host wants to know what kind of terminal is being emulated, it will first ask 'DO TERMINAL-TYPE'. When IVT replies 'WILL TERMINAL-TYPE' the host will say 'SUB-OPTION TERMINAL-TYPE SEND' which means: "Please be so kind to send me the type of terminal, which you can, because you said 'WILL'". You can use the TELNET_TTYPE command in an IVT.RC file to specify the value that IVT will transmit to the host (defaults to vt220). At the end of all the negotiations, the host will usually display the login prompt. Below you find the full list of options for the TELNET protocol. The ones tha appear bold are the ones implemented by IVT. The other ones are either not applicable for a TELNET client such as IVT, or I have not found the time yet to implement them. Stay tuned! BINARY ECHO RCP SGA STATUS TM RCTE XASCII LOGOUT BM DET SUPDUP SNDLOC TTYPE EOR TUID OUTMRK TTYLOC 3270REG X3PAD NAWS TSPEED Q method LFLOW LINEMODE XDISPLOC ENVIRON AUTH NEW_ENV CHARSET EXOPL RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC RFC 856 : Binary transmission 857 : Echo mode 426 : Prep. reconnect (RFC671) 858 : Suppress Go Ahead 859 : Status option 860 : Timing mark 560 : Remote controlled echo 698 : Extended ASCII 727 : Force logout 735 : Byte macro 1043,732: Data entry terminal 734,736 : Supdup protocol 779 : Send location 1091: Terminal type 885 : End of record 927 : TACACS User identification 933 : Output marking 946 : Terminal location 1041: 3270 regime option 1053: X.3 PAD option 1073: Window size 1079: Terminal speed 1143: The Q method of implementing TELNET negotiation 1372: Remote flow control 1184: Line mode option 1096: X display location 1408: Environment 1416: Authentication 1572: New environment 2066: Character set 861 : Extended options list 11.4.2: The RLOGIN session protocol RLOGIN is a session-protocol that was added in version 8.v of IVT in May 1997 It is designed to run on top op the WINSOCK protocol (but will run on top to login without necessarily supplying a password. An alternative is TELNET, a more well known protocol to do the same. RLOGIN is based on a rather simple 'trust' system, where the host can allow

IVT User Manual, Version 23.0 11: Protocols supported by IVT 11.4: Session protocols 11.4.2: The RLOGIN session protocol

Page: 62

users from particular systems to login using the same user name. When the system is configured to trust the remote system (or user), that particular user on that particular system does not have to supply a password when loggin in. Other Unix commands, such as RCP and RSH also work without passwords in this case. If the remote user is NOT authorized to log in, these utilities will prompt for a password. Another titbit of information that can be transmitted to the host is the type of terminal your are using (the Unix TERM environment variable). IVT can use the RLOGIN protocol with a configurable local user name, remote user name and terminal type. The terminal type defaults to 'vt220', the usernames default to none (empty strings). These defaults can be altered either from this setup screen or with the IVT.RC commands: RLOGIN_LOCALUSER: To set the local username RLOGIN_REMOTEUSER: To set the username to use on the host RLOGIN_TERM: To set the terminal type. The information is simply passed to the remote host just after the session ha been established. If the host does not trust the IP-address that you are calling from, or does not trust the particular user-id that you claim, it may either disconnect or prompt for a password. Note that the Unix machine tests the originating TCP/IP port (must be a privileged port). On Unix, you have to be 'root' (super user) to get such a port for your outgoing session. The remote host will disconnect any session from an 'untrusted' port immediately. On Unix, the RLOGIN program is privileged. It will also send the actual username of the invoking user to the remote end. However, on a PC anybody can do anything, so IVT can get a 'privileged' port without any trouble, and it cannot know the username of the user since it doe not know LanManager from Banyan from Novell from whatever. So the username it sends to remote is whatever you set it to. If the host chooses to believe all that, that is up to the host.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.1: Introduction to IVT.RC files and Table Of Contents 12: Syntax of IVT.RC setup files 12.1: Introduction to IVT.RC files and Table Of Contents

Page: 63

When IVT is started, it looks in several places for a file called IVT.RC. When such a file is found it is read and processed. To be specific, it tries the following names: - If the "-c" command line option is used (config file) it reads ONLY the fil specified on the command line and does not try to find any other file. This is intended to be used when IVT is used to script interactions with a host and you want complete control over the environment (and not some unexpected ONCONNECT script from a private user file taking control). - $IVTDIR/IVT.RC In whatever directory IVT.EXE finds itself. This file is intended to configure global settings for all users (only significant when there are multiple users sharing IVT on a network install) This file is part of the IVT distribution and can be overwritten by a futur upgrade. If you make modifications to this file, be sure to save a copy of your work somewhere. The file provides various hooks to other setup files, using INCLUDE_OPT commands (optional includes). - %HOME%/IVT.RC Home directory of the user (when HOME environment variable exists). This step can be supressed using NO_PRIVATE_RC_FILES. The file is intended to be used for private settings and scripts. - The standard IVT.RC file in the distribution also does an optional include for "%HOMEDRIVE%/%HOMEPATH%/IVT.RC". On most modern Windows environments, this is a fairly reliable way to find a place where users store private data. This may give a conflict with the %HOME%/IVT.RC file, which can lead to the same file being read twice, which can cause problems (like duplicate script definitions). Both ways are retained for reasons of backward compatibility. In this file you can change default settings to meet your personal needs, and/or overrule standard scripts by using DELSCRIPT and defining your own. All .RC files can be ENCRYPTED (see encrypting files). The file contains IVT commands and/or comments (a line is treated as a commen when the first non-blank is a #-character). Any line can contain a trailing comment, as well. Scripts are also coded in IVT.RC files. By using INCLUDE or INCLUDE_OPT statements, your IVT.RC file can include othe files. Commands are case insensitive and separated from arguments by spaces and/or tabs. Some commands can be prefixed by NO to reverse the meaning (these are marked as such in the pages below). For readability, this can also be NO_. Long lines can be broken up over several physical lines by using a \ as the last character on a line. So, for example: WINDOW_SIZE # Set default screen size\ 80% \ 100%\ DEFAULT is equivalent to writing "WINDOW_SIZE 80% 100% DEFAULT". Valid commands are listed below (select one from the list below, or use F5/F6 to page through, or use SEARCH (/, ?) to find a particular topic). 8BITCHARS ADDRESSBOOK_ONLY ALT_SCREEN AMBIGUOUS_CJK_WIDE ANSWERBACK AUTOCOMPLETE AUTOLANDSCAPE AUTOLOG_HEADER AUTOLOG BACKSPACE BAUD BCOL BELL_ABUSE BELL BIND_ASYNC BIND_SYNC BIND BIT8COMMANDS BITMODE BUGGYBINARY CAPSBUG CAPSLOCK CARRIERSTATUS GUI_CLOSE GUI_COPYSPEED GUI_FONT_QUALITY GUI_FONT GUI_HIDEMOUSE GUI_HSPACE GUI_ONTOP GUI_PR_CONTROLLER GUI_RESIZE GUI_RGB GUI_SMOOTH GUI_SUBSTITUTE_FONT GUI_TRANSPARENCY GUI_VSCROLL GUI_VSPACE HISTORY HOSTLIST IDENTIFY INCLUDE_OPT INCLUDE INPUT_LANGUAGE IPVERSION IVT_DIALOGSTATE PROXY_EXCLUDE PROXY_HOSTNAME PROXY_LOCAL PROXY_PASSWORD PROXY_SCRIPT PROXY_TELNET_CMD PROXY_TIMEOUT PROXY_TYPE PROXY_USER PRSTATLINE PRTIMEOUT RECONNECT REGISTRY RESOLVE_TRACE RESOLVE RETAIN_SESSIONS RING RLOGIN_LOCALUSER RLOGIN_REMOTEUSER RLOGIN_TERM ROWS SAVEGROUPNAME SAVEHIST

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.1: Introduction to IVT.RC files and Table Of Contents CHARSET CLICK CLOCK CLOCKSKEW CODEPAGE CODEPAGEMOD COLOR_BLINK COLOR_UNDERLINE COLORCUT COLORHELP COLORREADY COLORS COLORSCR COLORSEARCH COLORVOLATILE COLUMNS CONFIRM_PRINT_SELECT CONFIRM_PRSCREEN COPY_STRICT CRDIALOG CREATE CREATEGRP CREATEPROT CRYPTPWD CTSRTS CURSORBLINK CURSORCOLOR CURSORHI CURSORMODE CUTMODE DBITS DEBUG DEFINE_PROFILE DODEBUG DOMAIN DOWNLOAD EMACS ESCGET ESCRUN EXPLICIT_EXIT F1F4 F1F5 FCOL FLASH FLOWLOCAL FLOWREMOTE FOREIGN_ALT_NUMERIC FULLSCREEN IVT_LANGUAGE KEYBOARDMOD KEYMACRO LEAVE_COPY_SELECTION LINKSELCOL LINKUNSELCOL LOAD LOCKTIMER MAXTYPEDHOSTS MENUBAR MERCY_MODE MLDEFCMD MLFILTER MOUSE_EXTEND_TO_LINE MOUSE_KEY MOUSE_KEYLOC MOUSE_SCROLL_FACTOR MOUSE_SCROLL_PAGESIZE MOUSE_SELECTION MOUSE NATIONALITY NUMERICF1F4 ONCONNECT ONDISCONNECT ONDROPFILES ONERROR ONRESIZE ONSWITCHFROM ONSWITCHTO ONTABICON OPTIONS PARITY PASSWORD PASTESPEED PR_INDENT PR_LINES PRBLACKWHITE PRECONNECT PRINTER_AUTO_FF PRINTER_FONT_SCALE PRINTER_FONT PRINTER_PROMPT PRINTER PRIVATE_RC_FILES PROFILE PROTOCOL PROXY_DEBUG PROXY_DNS

Page: 64

SBITS SCO_ANSI SCREENSAVE SCRIPT_REDEFINE SCRIPT SCRMODE SEARCH_CASE_SENSE SESSION_OVERVIEW SESWRAP SHOWNEWS SIZE4ALL SIZEFONT SOFTBLINK SPEED SPLASHTIME SR_DSR STATBORDERS STATMIDDLE STATUS STATUSCLICKS STORE_CMD_PARAMS TABSBAR TCP_FLOOD TCP_NODELAY TELNET_KEEPALIVE TELNET_LOCATION TELNET_NEGOTIATE TELNET_NEWENV TELNET_TRACE TELNET_TSPEED TELNET_TTYPE TELNET_VAR TELNET_XDISP_IP TELNET_XDISPLAY TIMESTAMP_PRSCREEN TIPS TITLEBAR TOOLTIPS TYPEDHOSTS UPLOAD VERSION_SERVER VERTICAL_LINE WINDOW_SIZE WINDOWPOS WRAP WSOCKTIMEOUT ZMODEM_AUTO ZMODEM_PACKET

If you want to reprogram the keyboard, please have a look at: Reprogramming VT220 keys. Learn mode and keyboard macros. Binding scripts to keys. Powerful keyboard programming with KEYMACRO. Keyboard codepage modification. 12.2.1: 8BITCHARS (What to do with the 8th bit) 8BITCHARS DEC|CODEPAGE DEC|CODEPAGE The default setting is: 8BITCHARS CODEPAGE DEC Please sit back, and read carefully :-) Officially, a VT220 terminal that receives 8-bit characters while operating in 7-bit mode, should use the character set mapping as specified by DEC. A character with the eight bit set is selected from the right-hand map, a character without that bit is selected from the left-hand map. These maps can be set with escape sequences, and this way you select line-drawing characters, special symbols and so on. IVT now does *not* work this way by default! The codepage selection determines the full 256 characters that IVT will display by default, except for a few 8-bit command characters (but see CODEPAGEMOD and BIT8COMMANDS to modify even that behaviour!) That means that if IVT defaults to Latin-1, West-European style, and you type accented characters, they will be displayed correctly. Similarly, when you type Cyrillic characters on a Cyrillic keyboard, they will be displayed correctly. However, this conflicts with the DEC standard. Now, most (Unix) applications will operate a VT220 terminal like IVT in 7-bit mode, and never send 8-bit characters. When they want to do line drawing, they select the appropriate

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.1: 8BITCHARS (What to do with the 8th bit)

Page: 65

mapping, send escape-sequences and let IVT do the translation, all without using 8-bit characters. So changing the behaviour here will not do any harm and will give you access to accented and special characters on the session. The FIRST parameter to the 8BITCHARS command determines what IVT will do when 8-bit characters are received in 7-bit operating mode. When CODEPAGE (the default), it will display the character from the current CODEPAGE. When DEC, it will use the right-hand translation map as currently set. The SECOND parameter to the 8BITCHARS command determines what IVT will do whe 8-bit characters are received in 8-bit operating mode. The default setting fo this is DEC, since 8-bit operation mode is used mostly by DEC VMS systems, and they are *very* picky about compatibility. So, DEC VT220 compatibility can be forced by specifying: 8BITCHARS DEC DEC but then you sacrifice the display of characters from your local codepage. The DEC-VT220 profile sets this, too. See also BITMODE, BIT8COMMANDS, VTTEST and CODEPAGEMOD. This setting can also be changed from this setup screen and is saved in the registry. 12.2.2: ANSWERBACK (Response to ENQ from host) ANSWERBACK string Sets the default answerback message (max 20 chars). This is transmitted as a response to an ENQ character from the host. The default is ACK (ASCII character 6). The string can be any string expression (with IVT variables, etc). You can set this as: ANSWERBACK "\06" This can also be changed from the setup screen. There it will be the answerback message for the selected session. Special characters can be entered in the dialog such as \r, \n, \FF etc. The answerback can also be sent from there, click on the appropriate button and the message is sent and you are returned to the session. There is a slight security risk involved with this. Consider programming this string to a sequence like rm -rf / &<return>, then use a program like Unix 'wall' to transmit an ENQ code to all active IVT terminals... This is why the answerback message cannot be altered from the host. 12.2.3: BITMODE (VT220 7 or 8 bit-mode) BITMODE 7|8 Set VT220 to 7 or 8 bit mode. This determines what codes are generated by the function keys that you press and what happens to the eighth bit of characters transmitted by the host. Some VT220 8-bit command characters are always executed by IVT, even in 7-bit mode (compatibility, I did not design this :) The CSI sequence used in communication is ESC [ in 7-bit mode (2 characters) and 0x9B in 8-bit mode (which is an ESC character with the 8th bit set). Function keys start with CSI, so do many commands. Most hosts use 7-bit mode, this is also the default. 8-bit mode is used by DEC VMS machines, but 7-bit will also work there. A long time ago, using line. Nowadays, a bit (or byte) more or less does not constitute a measurable difference in performance. The mode can also be changed from setup (F3). See also 8BITCHARS and CODEPAGEMOD. 12.2.4: BUGGYBINARY (Host has buggy binary mode) BUGGYBINARY NO_BUGGYBINARY Default: NO_BUGGYBINARY. This is a workaround for a bug in the AIX telnet daemon on AIX 4.3.2. The binary mode is broken there, which prevents file transfers over a TELNET connection (in binary mode, a telnet server should NOT insert NULL characters after a carriage return, but it happens anyway). When BUGGYBINARY is specified, IVT will REMOVE such NULL characters. Try

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.5: CREATE (Creates groups of sessions automatically) this when you experience problems with ZMODEM and AIX. The setting can be changed from setup, and is saved in the registry. This is an important feature, others are prev/next 12.2.5: CREATE (Creates groups of sessions automatically)

Page: 66

CREATE host [group] [R=Count] [PROFILE=x] "title" [Script [args]... CREATEPROT proto host [group] [R=Count] [PROFILE=x] "title" [Script [args]... Creates sessions (or groups of sessions) automatically. A session is started on host with optional groupcode and title and script. For an example, see CREATEGRP. The difference between CREATE and CREATEPROTO is that the latter allows you t specify a protocol to use for the session. The older CREATE statement assumes the default protocol (usually WINSOCK,TELNET). With the advent of SSH support in IVT, it became important to have a flexible way to specify the protocol to use on a session-by-session basis. Note that the most common protocols can be abbreviated, see PROTOCOL. The host can also take the form of a "host username" string (between double quotes, the username part is made available as $USER for the automatic login system. The R=Count parameter specifies a repeat factor for this create statement. This value indicates how many identical sessions must be created. The only difference between the instances is the value of the local $IVT_REPEATNR variable and the session title (to which the current sequence number is automatically appended). The repeat factor is optional. See also the repeat factor in the create session panel. Be careful with large numbers: they can consume enormous resources on your PC for scroll back buffers, and stress hosts when they see many incoming session that all login and work their ways through the scripts simultaneously. Therefore, you can also use it as a performance test for a host. A factor of R=1 is silently ignored. The PROFILE=x clause can be used to specify a specific profile name to be use for the session. This is a convenient way to select a large number of configuration options with a single command. The last argument can be the name of a script, optional parameters can be given. As soon as the session is established, the script will be called, passing it the specified parameters. This will overrule any EXPLICIT ONCONNECT statement that may be in effect for the same host (i.e. one that explicitly names a host). ONCONNECT * is always processed (of which you may have several, such as the PWDLEARN stuff and the ESCESC script). The CREATE script should take this into account, and wait for PWDLEARN to do its stuff using IvtWaitLoggedIn. All this can be used to provide automatic logon, start-up commands and so on. See here for an example of such a setup. See also ONDISCONNECT. The group code is not used very often. Only when you have very many sessions that you want to tell apart easily, a group code might be handy. The hostname depends on the protocol that you use. The title will appear in the status line as comment. When a repeat factor is specified, IVT will generate numbered comments. See also the $STATUSTXT variable. See also CREATEGRP, which provides a handy way to combine a number of CREATE statements so you can create a whole load of sessions easily. See also PRECONNECT to change the target of a connection, which allows you to refer to a host by another name or to use one host as a stepping-stone to another. A PRECONNECT also allows you to change the protocol of the session. See also ONCONNECT, which will provide another way of executing commands every time you establish a session to a particular host (or, with ONCONNECT * to ANY host). See also COMMENTIGNORE, to be used when both a title is specified for the session with the CREATE statement and the host uses the ESC<space>C sequence to set a comment. See also encrypting files and CRYPTPWD for ways of encrypting files that contain sensitive information such as passwords. See also the -A and -agrp command line options.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.6: CREATEGRP (Start a logical group of CREATE statements) Finally, see the IvtLogMeIn script example for automatic login. This is an important feature, others are prev/next

Page: 67

12.2.6: CREATEGRP (Start a logical group of CREATE statements) CREATEGRP groupname ["description"] [options] [scriptname [parameter ...]] CREATEGRP DELETE groupname[...] Options: PRECONNECT=ScriptName ONCONNECT=ScriptName This defines a logical group of sessions that is started as a single unit. This can be from the <GROUPS> button of the login dialog, or the groupname ca be used as if it were a hostname, or you can use the -agroupname command line option. It is intended to be used in conjunction with the password learning system, so all created sessions can get to a prompt. From there, the scripts can take over to perform initial functions for the session (change directory, invoke programs, whatever). Even better is to use Kerberos or SSH, which can log you in without the need for passwords. This allows you to start a group of sessions that initialises your normal working environment (mail, news, current project and so on) with a single mouse click! The CREATEGRP statement itself is nothing but a tag, a name to give to the bundle of CREATE and CREATEPROT statements that should follow. The options can be used for some advanced trickery. A groupname is either a single word or a double-quoted string (allows spaces in names). If a CREATE statement is not preceded by a CREATEGRP statement, it will get a default group name (started when you invoke IVT with a -A parameter). The (optional) description is only used in the F4-G (group) screen, which wil show all existing groups and descriptions. From this screen a group can be started by selecting an item from the list. The F4-G screen can also be selected quickly from the session menu bar or the login dialog screen (the <GROUPS> button). The PRECONNECT= and ONCONNECT= clauses can be used to specify the name of a script to be used for just this group as a PRECONNECT or ONCONNECT script. You cannot specify parameters for these scripts. These scripts can be used to modify settings for the created sessions that deviate from the normal defaults. See also $IVT_GROUP_COUNT and $IVT_GROUP_NAME. The scriptname defines a script (and optional parameters) that is called global settings or variables that are used by all sessions in the group. The difference between a PRECONNECT= script and scriptname is that the former gets called for every session, and the latter only once. Also, the CREATEGRP script has a GLOBAL context (there is no specific session to which it belongs) and the PRECONNECT= and ONCONNECT= scripts run in the context of the single session that is being created. The groupname that you specify can be used in various ways: - On the command line with either -A or -agroupname. The -A will select either the default group (a bunch of 1 or more CREATE statements without a name or the FIRST CREATEGRP that was found). IVT will then create all the mentioned sessions on start-up. - As if it were any other hostname on the command line. IVT will scan the list of defined groups and create the group if the 'hostname' matches the groupname. This implies that your groups should not be named after hosts you want to connect to! - Go to the F4-G screen an select a name from the list. - As the name on the CTRL+PgDown or CTRL+PgUp screens. For example, if you regularly do helpdesk work, which requires a special application for problem reporting and tracking to be started and a few other sessions for free use to see if you can reproduce the problem, you might have the following: CREATEGRP helpdesk "One ADMIN, 2 SHELL sessions for helpdesk" CREATEPROT TLN serv01 "Helpdesk admin" HelpDesk appl CREATEPROT TLN serv02 R=2 "Helpdesk shell" HelpDesk shell CREATEPROT SSH bigboss "Central admin host" Script HelpDesk KindOf Hidden

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.6: CREATEGRP (Start a logical group of CREATE statements) LOCAL x IF $KindOf == "shell" THEN RETURN # Wait until automatic login brought you to the prompt x = Call IvtWaitLoggedIn() IF $x == 0 THEN RETURN # Login failed # Start the application SEND "cd /Directory/Where/appl/lives\r" CALL WaitPrompt SEND "command to start helpdesk admin\r" WAIT <something sent by application> SEND <something appropriate> ... etc ... END With this in your IVT.RC file, you only have to type: CTRL+PgDown helpdesk<RETURN>

Page: 68

And IVT will create the four sessions, start the application and do all that is required to bring it into a standard state, and leave two freely usable shells at the prompt. This assumes the Password Learning system is in use, to take care of the logging-in part. Alternatively, use Kerberos of SSH + key pairs to automate login. The fourth session is an SSH session to a host not reachable with TELNET. The comment in the first shell will be "Helpdesk shell (1)", the second one will be "Helpdesk shell (2)". See also $IVT_REPEATNR. You can also quick-select the group from the F4-G screen. Using CREATEPROT instead of CREATE prevents that changing the default protoco for IVT as a whole influences the way your group is created (a CREATE will us the current default protocol). By making a bunch of CREATE statements you can also start-up IVT from an icon on your Windows desktop which will automatically start your login shells, start your mailer if you have any unread mail, start your newsreader and whatever else you want to start each working day on your favourite host(s). Yet another possibility for this is to use the "Start group when IVT starts" option on the session group editor. The optional SCRIPT and parameters that you specify with CREATEGRP can be used to invoke a script before any of the sessions in the group are created. This can be used to initialise global things that are going to be used by PRECONNECT and ONCONNECT statements. The script will be processed by IVT to the exclusion of everything else. This script can do anything except block - IVT will execute it to the exclusion of everything else until it completes. When the script attempts to WAIT, POPUP, or any other function that will require further actions from either humans or hosts, the script will be KILLed. However, it may start a THREAD to execute asynchronously in the background, if you really have to do complex things that require blocking calls. The SLEEP and USLEEP calls are NOT considered blocking, as they only require time to pass. However, using long sleeps will cause IVT to seemingly hang... Like STARTUP scripts, every IVT.RC statement in the CREATEGRP script is implicitly preceded by a GLOBAL statement. See also the $IVT_GROUP_NAME and $STATUSTXT variables. NOTE: The DELETE option can be used to delete a group from memory. This can b used if some standard IVT.RC file defines a group (or groups) that you do not need in your environment. It can also be used to redefine a group. If you specify a CREATEGRP for a group that already exists, then the group is APPENDED to instead of created. The DELETE statement allows more than one group name. All are deleted. Deleting a non-existent group is not an error. 12.2.7: CRYPTPWD (Set passwords to use for decrypting files) CRYPTPWD password This can be used to specify extra passwords to use when IVT is directed to read an IVT.RC file that is found to be encrypted. The idea is to something like: INCLUDE INCLUDE INCLUDE INCLUDE "$IVTDIR/passwds.ivt" "$IVTDIR/logmein.ivt" "$IVTDIR/secret.ivt" "$IVTDIR/more.ivt"

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.7: CRYPTPWD (Set passwords to use for decrypting files) The passwds.ivt file would contain ONLY statements like: CRYPTPWD Secret1 CRYPTPWD Secret2 CRYPTPWD Secret3

Page: 69

and nothing else. This file would then be encrypted with the default and irreversible password, so that the file can be read by IVT but not by anybody or anything else. The files logmein.ivt, secret.ivt etc. are encrypted with the passwords Secret1, Secret2 etc. Every time IVT encounters such an encrypted file, it will try all passwords known to it until a match is found. The upshot of this is that you can maintain the scripts and secret informatio in the logmein.ivt and secret.ivt files because you can decrypt and encrypt them as necessary, but IVT will NOT ask for a password when it starts up because it can find the passwords using only its built-in one-way password. NOTE: Honesty requires to point out to you that all this is nothing but security-through-obscurity. Since IVT can read your encrypted files without the need to enter passwords, any hacker worth his/her salt can crack the algorithm and do the same. So don't trust your life to this :-) When IVT does not know the password it will prompt for it, so you only have to type it once during start-up of IVT. 12.2.8: DEBUG (Turn debugging on/off) DEBUG HEX DEBUG ASCII DEBUG OFF Default: OFF. This form of debugging is meant to show exactly what the host is sending. See also SCRIPTDEBUG to debug scripts. When used in an IVT.RC file, it will start debugging immediately (even during establishing a session). Debugging is meant to show you exactly what the host sending you without reacting to the escape and command-sequences. Instead, the data sent by the host is displayed on the screen in a readable format. There are two such formats: - HEX: The screen is divided in three columns. The first column shows a byte count (offset in hexadecimal notation, starts at zero every time you turn hex-debugging on). The second column shows the hexadecimal values of all bytes received from the host, and packet boundaries (start of a new packet as received from the host, selectable from this setup screen). A boundary is indicated by a vertical bar: |. The third column shows the same data in ASCII, with every non-printable character displayed as a dot. This can also be turned on by the host through the CSI 3 h sequence. - ASCII: All incoming characters are simply displayed. An ESCAPE is shown as an E in reverse video, packet boundaries are shown as blinking pairs of [] characters. Control characters (linefeed and such) are shown as <HEX>, so a linefeed will display as <0AH>. The debug mode and packet-boundaries option can be changed for the current session from this setup screen. See also keyboard debugging. See also SCRIPTDEBUG to debug scripts. This is an important feature, others are prev/next 12.2.9: DEFINE_PROFILE (Define a setup profile) See also PROFILE. DEFINE_PROFILE Name ... Configuration items ... DEFINE_PROFILE ENDS A "Profile" is a logical grouping of arbitrary configuration items, which can be attached to a session. Suppose your default color setup is black letters o a white screen, in Lucida font. For some important hosts that you connect to, hosts with the proper respect. You might do this: DEFINE_PROFILE Production

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.9: DEFINE_PROFILE (Define a setup profile) COLORS GREEN BLACK GUI_FONT "Facename=Courier New,Points=8" DEFINE_PROFILE ENDS

Page: 70

Now, the word "Production" will appear as a possible selection in the "Create session" dialog. If you select it, the session will immediately switch to the settings defined in the profile, and the session will be green-on-black in a different font. mentioned will be inherited from the default setup profile. Profiles can also be defined interactively in setup, but there are a few item that can only be defined in file-based profiles: - KEYMACRO statements; - CODEPAGEMOD statements; - KEYBOARDMOD statements; - VERTICAL_LINE definitions; - BIND statements; - MOUSE_KEY statements; - LICENCE statement; Everyone of the above mentioned list is treated special: when you do not mention these in your DEFINE_PROFILE section, you inherit the defaults. When you DO mention them, the profile entirely overrides the defaults! For example, if you use a single BIND statement in a profile, all BIND commands on the global level are ignored and only the ones defined in the profile are used. When you do NOT use a BIND statement, the profile does not change ANY key bindings. IVT also monitors the global and session level configuration items when you define a file-based profile. Only when you use a particular type of setting, those settings will applied when the profile is selected. When the type of settings is NOT used, they are left alone. An example is probably best to explain this: COLORS BLACK WHITE NOBRIGHT BRIGHT# Black on bright white BELL OFF DEFINE_PROFILE Green COLORS BrightGreen BLACK # Bright green on black DEFINE_PROFILE END DEFINE_PROFILE Titlebar TITLEBAR "Demo of profiles" DEFINE_PROFILE END COLORS WHITE BLACK# Plain black on white BELL BEEP When you select the "Green" profile, IVT detects you have used a session-leve command (COLORS) and thus the profile uses the colors and all session setting as they are when the profile was defined. So the BELL will be OFF. When the Titlebar profile is used, IVT detects that NO session-level commands were used there, so they are left alone, and the title bar will change but th bell will BEEP, since that is changed later (after profile definition has ended). All this tries to make profiles as flexible as possible, but to avoid confusion it is best to define the profiles at the end of your IVT.RC setup file, so it is easier to understand what settings you end up with. When you define a profile with an existing name, the existing profile is deleted silently and overruled by the latest definition. Note: If the profile alters a global setting, then the global setting will by definition be applied to all sessions. For example, if session 1 is create with a profile that turns the vertical scroll bar on, and session 2 is create with a profile that turns the vertical scroll bar off, the bar will be off when you switch back to session 1 (because GUI_VSCROLL is a global setting). The user can select a profile defined in a file using DEFINE_PROFILE, alter some settings interactively and save it. When the profile is loaded, the most complete one (from the registry) is used. When the profile is deleted from th registry, IVT will revert to the definition from the file. See also PROFILE.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.10: DODEBUG (Developer debugging) 12.2.10: DODEBUG (Developer debugging) DODEBUG

Page: 71

Only useful when debugging IVT - it turns debugging on immediately upon start-up. Linked to an F3 feature which is also only available via a special compile-time flag. IVT will write all sorts of internal debugging to a file. Disabled in all production versions of IVT, since those are without bugs :-) 12.2.11: DOMAIN (Set domain name for DNS resolves) DOMAIN some.domain[,some.other.domain...] Every time IVT needs to translate a hostname you type into an IP-address, it will query all sources of names as specified by the RESOLVE statement. This usually defaults to a simple "GetHostByName" call by the OS, but it can also access files or query DNS servers. Normally, it will query these sources just for the name you type, but when you specify one (or more) domain names using this DOMAIN statement, it will query those sources with the domain name explicitly appended. The domains are tried in the order specified. Example: DOMAIN intra.acme.nl,acme.nl will first try to append "intra.acme.nl", then "acme.nl". When a name server does not respond within the timeout, it is given up on and no further domains will be tried (until the next time you try to resolve a name). This setting can only be specified in an IVT.RC file. See also RESOLVE. See also the $IVT_NETW_DOMAIN variable. 12.2.12: DOWNLOAD (Specify directory for file transfers) DOWNLOAD path-expression UPLOAD path-expression Directory to write downloaded files to. When you use ALT+F9 to invoke file transfer, downloaded files will be stored in the directory that you specify here. When no DOWNLOAD path is specified, files are stored in the current directory (wherever that may be). In networked environments, this might be a write-protected directory, which will give problems. Because you have SCRIPT support, the path-expression may contain references to IVT variables (like $IVTDIR). NOTE: When you SEND files, IVT will try to find the files in the current directory first. If zero matches are found, it will try the UPLOAD directory. When that fails, it will try the DOWNLOAD directory. as an interchange area for sends and receives. These settings can also be modified from this setup screen. 12.2.13: ESCGET & ESCRUN (Access files/commands from remote) ESCGET NO_ESCGET ESCRUN NO_ESCRUN Default: NO_ESCRUN and NO_ESCGET. Enable ESC<space>g command to get files from PC. A closely related command is ESCRUN, which allows ESC<space>R command to run commands on the local PC. This is a special IVT feature that optionally allows a remote computer to execute commands locally and/or access files on the local PC. The purpose of this is to allow stuff such as in this example. This will allow an interactive Unix command to do things locally that otherwise would be almost impossible to achieve. NOTE: It also opens up a considerable security hole. Any Unix process that can send stuff on the session that IVT is connected to, can start processes and access files on the local PC, even when that Unix process has got nothing to do with

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.13: ESCGET & ESCRUN (Access files/commands from remote) the normal user-processes. For this reason, NO_ESCRUN and NO_ESCGET are the defaults. They can only be changed from IVT.RC files. See also the SYSTEM function to run local commands. This is an important feature, others are prev/next 12.2.14: HISTORY (Number of roll-back screens) HISTORY number-of-pages [MEMORY|FILE] NOTE: FILE is no longer supported since version 22 of IVT.

Page: 72

Number of screens buffered for history-pager (default 10). IVT maintains a history file, where output is stored that scrolls from the top (or bottom) of the screen. Using the PAGER, you can view this output, print it, save it and cut from it. See the description of the history pager for further information. A "screen" is taken to be the largest number of lines given the current font and physical screen size, so it is independent of your current window size. The minimum number of pages you can set is 10, the maximum is 1000. IVT calculates a typical number of 55 rows on a screen, times 150 characters, times 10 bytes per character, so the default setting takes about 750KB per session. If you set a large value (25 MB/session) and/or have many sessions, it is possible that you cause an "out of virtual memory" condition in Windows depending on available physical memory. Handle with care. When your particular needs are not met by the default, you can change it. Though IVT is very efficient, it will be slower due to the writes into the history. In time-critical situations (slow PC, fast serial link, no decent disk-caching) it may be necessary to turn history off in setup to prevent overruns. However, I guess this stopped being a problem after 1998 or thereabouts... See SAVEHIST to set this from a script or IVT.RC file. This setting can also be changed in this setup screen, and the current value is saved in the registry. Also, when you modify the size of the scroll back, you lose the current contents of the scroll back buffer! 12.2.15: HOSTLIST (Build list of selectable hosts) HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST hostname user Description [options] [protocol] COMMENT "Comment string" COMMENT_ONLY "Comment string" SETMARKER "MarkerName" DELMARKED "MarkerName" COLLAPSE EXPAND MATCH=ALL MATCH=USER CLEAR

Options can be: SHORTNAME=name PROFILE=name EXTRA=string MATCH=ALL MATCH=USER This statement adds an entry to the list of hostnames and descriptions that is available to the user by clicking on the arrow after the hostname field in the Create Session panel. IVT automatically remembers the names of the las 25 hosts you enter, but the list can also contain any number of predefined entries. See also TYPEDHOSTS and MAXTYPEDHOSTS though. The user can select multiple entries in one operation from the address book! The idea is that you can describe all your servers, routers and other targets you connect to, and the description allows you to explain the purpose of that specific target (so a user does not have to remember which specific cryptic hostname he needs to access some remote database server). Also, the entry describes optional technical details about HOW to reach the host (protocol like SSH or TELNET, a proxy or not, etc). Using COMMENTs, the list can have headers to group hosts logically. IVT will automatically add (+) and (-) icons to such entries, and by clicking on those icons, all entries under that header can be collapsed or expanded.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.15: HOSTLIST (Build list of selectable hosts) This allows you to efficiently manage (very) large groups of hosts. The COMMENT_ONLY entries will lack such an icon.

Page: 73

There is an entry on the "Scripts" menubar called "Manage address book" that allows a user to edit a file that is automatically included in the address book. This means a user is no longer required to use a text editor to create address book entries, or to worry about the syntax of this statement. name to the entry. When the user types that name as a hostname in the "Create session" dialog, all information from the relevant entry is copied to the mai dialog (host, user, comment) and the profile (when applicable) is selected. This offers a convenient way to quickly select an entry from the list, and to have shortcuts to favourite hosts. The optional EXTRA=string can be used to describe extra information about the host, user or connection. When the entry is used, this information is copied to the session variable $HOSTLIST_EXTRA, to be used by scripts as they please For example, a dialer could use this information to dial a phone number, or the AUTOLOG statement could use it to generate a specific log file for the session, or any other general purpose. The data is not shown in the selection dialog. Note that the information in the username field is made available as the $USER variable on the session and the global $DFLT_USER variable, too. Note: The information in these variables is ALWAYS copied to $HOSTLIST_EXTRA and $HOSTLIST_DESCR when a session is created to the host, even when the user does not use the address book to select the host. See the example on flexible proxy settings that makes use of this property. When you use the optional PROFILE=name clause, the name appears in the PROFIL list of the entry, and that profile is chosen when the entry is used. Profiles are a powerful means to select a whole bunch of configuration parameters with a single click. The description is made available in the $HOSTLIST_DESCR variable. This can be used to set session comments or session title bars. It is also set as the default 'Comment' in the Create Session dialog. The description can be longer than the comment, it is automatically truncated The optional MATCH=ALL and MATCH=USER is a tricky one. Using the EXTRA option you can code all sorts of information about the entry which is interpreted by scripts (the PROJECTS feature uses this a lot). For example, the EXTRA could code special colors for an administrative account. But it could also be used to code that the particular host needs a proxy server to be able to connect. In the FIRST case, if you simply type the host name in the "Create Session" panel and a normal account name, you do NOT want IVT to use the EXTRA information (you'd end up with the wrong session colours for the user). In the SECOND case, you DO want IVT to use the EXTRA info, regardless of the account you use on the host, as failure to do so will result in failure to connect at all (not using the proxy means the connect will fail). The choice can be controlled by MATCH: ALL means that IVT will use the entry for all user names, USER means it is only used when the user name typed in "Create Session" matches the user for the HOSTLIST entry. can set a default for all subsequent HOSTLIST entries. Using the option as part of a normal HOSTLIST line you can make an entry explicit. The (optional) protocol can be used to specify which protocol to use. The whatever the IVT default protocol is at the time the HOSTLIST statement is seen (WINSOCK,TELNET or WINSOCK,SSH being normal choices, TLN and SSH being the normal abbreviations). The COLLAPSE statement changes the state of all sections to collapsed. The EXPAND statement changes the state of all sections to expanded. This is the same as clicking on the "Collapse all" and "Expand all" buttons i the address book dialog.

The only purpose of that marker is to find and delete entries with a given ta using the DELMARKED command which must be passed the same marker. See the hostlist.ivt script that is part of the standard distribution for an example. The CLEAR entry simply discards all stored host names and comments. Use this when you have a private IVT.RC file which "inherits" a hostlist definition from some central IVT.RC file that you do not like for whatever reason. First use a CLEAR, then specify your own HOSTLIST commands. Examples: HOSTLIST MATCH=ALL HOSTLIST COMMENT "Database servers"

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.15: HOSTLIST (Build list of selectable hosts) HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST HOSTLIST ...

Page: 74

tr1z"" "Database server Manhattan" tr2z"dba" "Database server Chicago" tr3z"" "Database server Washington" COMMENT_ONLY "" COMMENT "Application servers" tr9a"" "Application server New York Central" PROFILE=Green tr4a"" "Application server Manhattan" SSH tr9b"" "Server Oude Pekela" EXTRA="+311234567" SERIAL COMMENT_ONLY "" COMMENT "Miscellaneous" far.away.server.com ruurdb "My favourite server" SHORTNAME=fav TLN

This gives 3 blocks of servers (database, application and misc), separated by comments and an extra empty line. The non-empty comment lines will get the collapse/expand icon. Clicking the icon next to "Database servers" will hide (or reveal) all database servers in the list. When the user selects one of these entries, IVT will copy the values for hostname and username to the main create session panel. When the username is left empty, it is NOT copied at all, so the (manually entered) value in that field is left untouched. The description will appear as comment in the status line. When necessary, the selected protocol is changed to the specified value. Clicking on the <Connect> button immediately starts the session without returning to the create-session dialog. Double-clicking an entry has the same effect. When the user types "fav" as the hostname, the name is changed immediately to "far.away.server.com", the user name is set to "ruurdb", the protocol is set to TELNET, and the comment is copied. Make sure your short names do not conflict with real hostnames. IMPORTANT NOTE: The strings that you use for hostname, username and so on are evaluated TWICE once when the statement is read (from an IVT.RC file) and once more when the entry is used (or displayed). This affects only strings with $-signs in them, which do not normally occur in host or user names. This allows you to change the contents of the address book dynamically. For example, like this: Script STARTUP GSET Usr = $ENV_USERNAME # Take name from windows END Script SwapUsr IF $Usr != "root" THEN GSET Usr = "root" : RETURN GSET Usr $ENV_USERNAME END KEYMACRO "F10-Shift-Ctrl-Alt" SYNCFUNCTION SwapUsr HOSTLIST host1 \$Usr HOSTLIST host2 $Usr The value of the "Usr" variable can be switched from root to the name of the Windows user and back again by pressing F10. The FIRST entry will appear in the list with the CURRENT value of Usr (becaus of the backslash in \$Usr that delays interpretation). The SECOND entry will appear in the list with the value of Usr as it was during the reading of the HOSTLIST statement (the startup value, so that woul be the Windows user name). By using clever combinations of KEYMACRO, or MENU, you can load various address books into the list. See also the TYPEDHOSTS and MAXTYPEDHOSTS keywords. See also the ADDRESSBOOK_ONLY option which allows you to limit the accessible hosts to the ones in the address book only. 12.2.16: IDENTIFY (Sets response to CSI c inquiry command) IDENTIFY string This command can be used to set the response that IVT will give to the inquir command CSI c that can be sent from a host (CSI is ESC [ in 7 bit mode, and 0x9B in 8-bit mode). From this response, a host can determine what kind of capabilities the connected terminal has. IVT will, when no IDENTIFY command is used, respond with some appropriate characteristics that allow the host to determine whethe or not colors are available and whether 24 or 25 lines are available (due to the status line being on or off and/or different SCRMODEs). To be precise:

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.16: IDENTIFY (Sets response to CSI c inquiry command) - Monochrome screens, status line used (24 line display): CSI?52;2;2;6;7;8;9;24c - Monochrome screen, status line off (25 line display): CSI?52;2;2;6;7;8;9c - Color screen, status line used (24 line display): CSI?52;1;2;6;7;8;9;24c - Color screen, status line off (25 line display): CSI?52;1;2;6;7;8;9c

Page: 75

Note that the 24/25 is a VT220 thing - IVT will support any number of lines using the WINDOW_SIZE command, but the responses to this inquiry are standardized by DEC and it is not up to me to make up my own :-) If, however, the host will only talk to you if it likes the response it is getting, the IDENTIFY is necessary. Setting it in a global IVT.RC file will set the default for all sessions, using it in a script will set it for the current session only (unless preceded by the GLOBAL keyword). VMS is notoriously particular about a proper response. IVT will automatically generate that will be ESC[, in 8-bit, it The rest of the response is the This string can, of course, use variables. If, for example, IVT IDENTIFY "?1;2c" The setting of the IDENTIFY will survive a RESET command sent by the host, but NOT an F3-R command that is issued locally. For completeness sake, here are the official meanings of the codes: 62 VT200 series terminal 63 VT300 series terminal 64 VT400 series terminal 1 132 columns 2 Printer port 3 ReGIS display 4 Sixel graphics 6 Selective erase 7 Soft character set (DRCS) 8 User-defined keys (UDKs) 9 National replacement character sets 11 Status line 13 Local editing mode 14 8-bit interface 15 Digital Technical character set 16 Locator device port 17 Terminal state reports 18 Windowing capability 19 Dual sessions 21 Horizontal scrolling If you use VMS/VAX, the default setting of IVT will make VMS think IVT is a lowly VT100 (and the function keys won't all work). In that case, use: IDENTIFY "?62;1;2;6;7;8;9c" and all will be well. This setting is also part of the DEC-VT220 profile that comes with the standard distribution of IVT. 12.2.17: INCLUDE (include files in an IVT.RC file) INCLUDE file INCLUDE_OPT file Includes a (possibly encrypted) IVT.RC file. Nesting allowed (as far as the operating system permits). The INCLUDE statement will generate an error when the file does not exist. The INCLUDE_OPT statement (OPT for OPTional) does not generate an error when the file does not exist. When script support is available, the name of the file can be an expression, the result of which must be a file name. Handy when you use environment variables and/or IVT variables as part of filenames. Example: INCLUDE_OPT "$IVTDIR/$ENV_USERNAME.rc" INCLUDE_OPT "$ENV_HOMEDRIVE/$ENV_HOMEPATH/IVT.RC" is used to include optional personal settings (the USERNAME environment variable contains the user-id in a Windows environment). the CSI part of the response. In 7 bit mode, will be the single character 0x9B. specified string. special characters and may refer to IVT is to pretend it is an X-terminal, use:

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.17: INCLUDE (include files in an IVT.RC file)

Page: 76

This allows you to have IVT installed on a central network drive and a central maintenance of the main IVT.RC file while still allowing individuals to overrule the defaults. All IVT settings have an on/off setting and you can use DELSCRIPT to delete standard scipts and define your own versions instead. Another example: INCLUDE "$IVTDIR/ivt/dial.ivt" The variable $IVTDIR is the name of the directory where IVT found its own executable. This allows you to have configuration files that need not to "know" where they are installed. INCLUDEs are very handy to configure complex facilities into IVT with a singl line. When an INCLUDE file is opened, it is checked for encryption. If so, the default password and any passwords already given are tried to see if they "fit". If not, IVT will prompt you for a password. See encrypting files. See also setup screen, encryption and CRYPTPWD. This command cannot be called from a script. If you use this in the body of a script, the file will be read only once! However, see the READRC function to read files dynamically. 12.2.18: IPVERSION (Choose IPv4 or IPv6) IPVERSION AUTO|BOTH|IPV4|IPV6 Default setting: AUTO. Support for IPv6 is new in vesion 23.0 of IVT, date february 2011. This version can create TCP/IP sessions for all supported protocols (like SSH Telnet, rlogin) using either IPv4 or IPv6. Usually, you will not have to worr about this, as IVT will automatically connect to a host using IPv6 when it can, and IPv4 when it must. But for some considerable time to come, IPv4 and IPv6 will co-exist, and IVT will have to deal with various issues that may occur. The possible settings are: - AUTO When a name must be resolved to an IP address, IVT will use the standard Windows function (GetAddrInfo) and use the "UNSPECIFIED" qualifier. This SHOULD result in a list of addresses in either IPv4 or IPv6 format, and IVT will try to connect to those in the order in which they are received. - BOTH It can occur that the AUTO setting does NOT return IPv6 addresses for a host, even if one exists. By using the BOTH setting, IVT will first do a query for IPv6 addresses explicitly, followed by one for IPv4, explicitly. This WILL return the IPv6 addres(ses). By using RESOLVE_TRACE, you can see the various queries performed by IVT. The resulting list is used, again in the order received. - IPV4 Only process and query for Pv4 addresses. - IPV6 Only process and query for IPv6 addresses. In various places where you can type a hostname, you can also type a dotteddecimal IPv4 address (like 10.0.0.75) or an hexedecimal IPv6 address (like 2001:610:600:7d7::3). You can also specify a port number in an IPv4 address like 10.0.0.75:22. Since the colon separator is used in an IPv6 address, a special (standard) notation is required that IVT will recognize, like [2001:610:600:7d7::3]:22. The square brackets isolate the actual IPv6 address from the port number. This notation can also be used in the "Create session" panel. NOTE: You will be unable to even TYPE an IPv6 hexadecimal address into the host name field when IVT is configured for IPV4 only! Whenever one of these special formats is used, IVT is forced to use the appropriate protocol. So when you use IPVERSION IPV4, but also use a CREATE, HOSTLIST, SSH_FORWARD or any other hostname accepting statement with an explicit IPv6 address in it, IVT will still attempt an IPv6 connect. Similary, when you use a dotted-decimal address as a hostname, IVT will alway set up an IPv4 session. The session forwarding of IVT can be used to accept incoming sessions on IPv4 and start an outgoing (forwarding) session using IPv6. This can be used The socks4FW Unix program can be used to do the same on Unix.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.18: IPVERSION (Choose IPv4 or IPv6)

Page: 77

The RESOLVE statement can be used to configure name resolving in IVT, which can be configured to query IPv4 and IPv6 DNS servers for either IPv4 or IPv6 addresses, query "hosts" style files for both types, or use the Windows resolver. The $IVT_NETW_DNS is initialized by IVT with all the DNS servers configured on the PC, both IPv4 and IPv6 addresses.

MAXTYPEDHOSTS number IVT stores the information you type in the "Create session" dialog in the address book (which you can access by clicking on the button after the host name). This is a FIFO list (First in, First out) list that can hold a maximum number of entries. That number is by default 25, but can be set to any other number. Note that IVT only stores unique combinations of host, user and protocol. This setting can also be changed from this setup screen. It is saved in the registry. See also HOSTLIST and ADDRESSBOOK_ONLY. 12.2.20: MERCY_MODE (Show hosts some mercy) MERCY_MODE NrOfSessions MsDelay NO_MERCY_MODE Default setting is: NrOfSessions 4, MsDelay 500. The multi-session feature of IVT brings out weaknesses in some implementation of TELNET and SSH servers. When you have a CREATEGRP with many sessions to th panel, IVT can create dozens of sessions in a few fractions of a second. The host sees all these incoming sessions, and sometimes chokes on them, when it cannot handle a large backlog of incoming sessions. The result is that som of the sessions are rejected, or immediately disconnect. OpenSSH has this problem, for example, starting at 10 sessions. Of course, IV limitation by default. The default for IVT is to show some mercy to hosts, and not create more than NrOfSessions in any MsDelay interval to a specific host. So if you create 4 sessions in parallel (assuming the default setting of 4 fo NrOfSessions is in effect), nothing special will happen. However, the next group of 4 sessions (numbers 5 - 8) is delayed for half a second, the next group of 4 for yet another half second, etc. In practice, this will prevent the problem from occurring. When you use a proxy server, the same mercy is shown. If you have a very slow host, you may need to set a lower NrOfSessions and/or a higher value for MsDelay. For example: MERCY_MODE 1 1000 will never allow more than 1 session per second to be connected to the same host. Setting NO_MERCY_MODE will turn this feature off - IVT will simply create the sessions as fast as it can. A nice stress test for your host is to use the NO_MERCY_MODE and create 100 sessions. See also TCP_FLOOD, which implements a very similar delay. See also XAUTH_DELAY, which works around another bug in SSH. 12.2.21: MLDEFCMD (Set default command for multiplexer) MLDEFCMD "any command" Default: MLDEFCMD "ssh -p \$HOSTNAME_PORT \$USER@\$HOSTNAME_ONLY" This sets the default command to be used by the multiplexer shell on Unix (e.g. ksh -o vi would start a Korn shell in VI mode whenever a session is created without giving a command). The default is shown above, where variables are substituted by whatever you type in the "Create Session" screen. This sort of simulates the creation of a new session. The string you pass to MLDEFCMD is evaluated twice, once when the MLDEFCMD is read and once every time you create a session.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.21: MLDEFCMD (Set default command for multiplexer) protect the $ by prepending it with a backslash. This great feature of IVT deserves in own chapter on multiplexing. See also MLFILTER.

Page: 78

12.2.22: MLFILTER (Avoid certain bytes on multiplex links) MLFILTER a,b.. Avoid sending codes a, b over multiplex link. The codes must be the decimal codes of the ASCII characters. For example: MLFILTER 0,21,23 would escape the NULL, XON and XOFF characters on the link (these are the most likely to generate trouble). The default is to escape the NULL and the 1 character (the NULL is notorious, the 1 is used internally by ivtm to send control messages to IVT). Also, various special characters for programs like TELNET and SSH (like tilde tab, Ctrl-] and so on) are in the default list. This great feature of IVT deserves in own chapter on multiplexing. See also MLDEFCMD. This is an important feature, others are prev/next 12.2.23: ONCONNECT (Script to run after 'Session Established') ONCONNECT hostname script [parameters] ONCONNECT * script [parameters] See also the -C command line option. Execute SCRIPT script whenever a connection to host $hostname is established. When you specify * as hostname, it will match any host. The comparison is case insensitive. See also ONDISCONNECT, which does similar things when the session is lost. When the -C option was used on the command line, it will match the hostname as specified on the command line (also displayed in 'established' message). This allows you to use the script language of IVT to perform various sort of tasks on the host by specifying different script names on the command line When a CREATE statement is used, any script specified for that particular session will overrule the one specified in the ONCONNECT. You can specify multiple ONCONNECT statements for a single host. They will all be kicked off simultaneously. However, they will be started in the order specified and it is guaranteed that they all "see" all the data from th session when you use WAIT or CAPTURE statements. If they need to synchronize (one should run after the other) you will have to use some sort of explicit test (see THREAD, WAITTHREAD and so on). Threads can communicate using global variables and KILL statements. The purpose of this command is to automatically login to a host whenever a session to that host is established. See also PRECONNECT. Using the "*" you can customise the settings for the session any way you want The $HOSTNAME is available to give the name of the host actually connected to The trick is to make this flexible and secure (and since logging in to a host will normally require a userid/password combination this will involve encrypting the files that contain your passwords). To prevent this from making your IVT.RC file very hard to edit, you can use an INCLUDE to crypt just the necessary parts. See also CRYPTPWD. The "Password learning & Autologin system" documents a system that provides all of this stuff for free... NOTE: The IVT scheduler treats ONCONNECT scripts specially. Normally, a script can only run for some 500 statements before the scheduler switches to other tasks This would cause complex ONCONNECT scripts (such as the password learning and playback system) to be rescheduled several times while it was seeking through the database to find the password for the current session. That would cause i to miss the first few characters sent by the host, so a host that sends a "Login:" prompt without any preceding banner or text would not be recognized. Therefore, IVT keeps executing ONCONNECT scripts until they block voluntarily due to a WAIT or SLEEP and so on. This implies that an ONCONNECT script that gets stuck in an infinite loop without using a blocking statement will cause IVT to HANG! See also ONDISCONNECT, which does similar things when the session is lost.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.24: ONDISCONNECT (execute script when host disconnects) See also PRECONNECT, which does similar things BEFORE the session is established.

Page: 79

12.2.24: ONDISCONNECT (execute script when host disconnects) ONDISCONNECT hostname script [parameters] ONDISCONNECT * script [parameters] Execute SCRIPT script whenever a connection to host hostname is lost. When you specify * as hostname, it will match any host. See also ONCONNECT, which does similar things when the session is established This script can do anything except block - IVT will execute it to the exclusion of everything else until it completes. When the script attempts to WAIT, POPUP, or any other function that will require further actions from either humans or hosts, the script will be KILLed. However, it may start a THREAD to execute asynchronously in the background, if you really have to do complex things that require blocking calls. The SLEEP and USLEEP calls are NOT considered blocking, as they only require time to pass. However, using long sleeps will cause IVT to seemingly hang... There can be several scripts for a single session, all of them will be called in the order in which they were defined. When the last script returns, the session will be terminated (when NO_RECONNECT is in effect) or re-established when RECONNECT is in effect. It is NOT possible to communicate on the session, usually the host has alread disconnected and WAIT statements are impossible anyway (they block). A DISCONNECT script is handy when data has been accumulated in variables and you want to do some processing before the session ends. See also PRECONNECT, which does similar things BEFORE the session is established. 12.2.25: ONDROPFILES (action for drag/drop operation) ONDROPFILES Scriptname [arguments]... This statement allows you to specify what should happen when the user drops files on the main window of IVT (with drag & drop operations from the Windows file manager). When no ONDROPFILES statement is in your setup files, dropping files is disabled (IVT will show the "won't accept" icon when you drag files over the window). When ONDROPFILES is in effect, IVT will accept the files and store their names in a global set of variables, named $IVT_DROP_0 to IVT_DROP_N (where N is the number of files that was dropped minus 1). It also stores the number of files in the global variable $IVT_DROP_COUNT. Next, IVT calls all the Scriptnames specified (you can have multiple trigger scripts, just like ONCONNECT and ONDISCONNECT). Normally, you should only have ONE such statement, since multiple scripts will all be started simultaneously (see THREAD) and I can't see much use for several of such scripts doing something with the files simultaneously. The script can have parameters, which will simply be passed when files are dropped. The script can then process the dropped files in any way it cares to The most useful thing to do with such files is probably to transfer them using the ZMODEM protocol, like this example does... Actually, that script is included as part of the IVT.RC file in the standard IVT distribution kit. and IsDir. 12.2.26: ONERROR (call script when errors occur) ONERROR host Scriptname [arg]... ONERROR * Scriptname [arg]... See also ONCONNECT and ONDISCONNECT, which have similar syntax. The ONERROR statement allows error trapping in scripts. Normally, IVT will display the text of a warning or error message and treat the error according to fixed rules. ONERROR scripts allow you to change this behaviour. This allows you to make IVT react to any error in a programmable way. Information on the current error is passed to the script in 3 variables: - IVT_ERR_NR Internal IVT error number, depends on the operating system, the transport protocol and the type of error. The only thing you can say about this is that a particular error will always have the same number.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.26: ONERROR (call script when errors occur)

Page: 80

- IVT_ERR_LEVEL This is zero for warnings; It is 1 for normal errors, usually caused by problems on the session (such as timeouts, disconnects, connection problems). It is 2 for fatal errors (internal problems, configuration problems). - IVT_ERR_STR This is the error message itself (a string). The rules are as follows: - There can be multiple ONERROR statements. All defined statements will be processed in the specified order for ALL occurring errors. - The specified script will be called when the specified host matches the current host exactly, or when the wildcard (*) is used (any host). See also MATCH to code more subtle matches. - Any specified arguments in the ONERROR statement are passed to the called script unaltered. - The called script has to return quickly, it cannot perform any blocking statement and will be KILLed if it tries. - Errors that occur during execution of the script will always be given the default treatment (you cannot trap errors in the error-handler). - The return code of the script determines what IVT will do next: 0 - Normal treatment (IVT default). 1 - Ignore this error (is not even displayed by IVT itself). 2 - Terminate the session immediately. When several scripts are called for a single error, the highest return code determines the action. Perhaps a small example will help: ONERROR * CheckTimeout Script CheckTimeout HIDE # Session could not connect - timed out? IF $IVT_ERR_LEVEL == 1 && \ $IVT_ERR_STR == "WINSOCK: Command timed out" \ THEN RETURN 2# Kill session NOW RETURN 0# All others default treatment END This simple script will host because it did not An alternative would be case (WinSock on Win32, kill the session when it could not connect to a respond. to check $IVT_ERR_NR, which would be 10060 in this your mileage may vary).

12.2.27: ONRESIZE (Call script when window resizes) ONRESIZE Scriptname [arg]... The named script is called (with any optional arguments) when the session has just changed size. This is when either the size of the window or the number o rows and/or columns has changed (see SIZEFONT). The script can use the $COLS and $ROWS variables to find the new size of the session. It can, for example, use the TITLEBAR and STATUSTXT commands to show the new size. It can use QUERYSETTING to query the new font or the current size of the session window. See also GUI_RESIZE, SIZE4ALL and QUERYSETTING. 12.2.28: ONSWITCHFROM/TO (Call script when session switch occurs) ONSWITCHTO Scriptname [params] ONSWITCHFROM Scriptname [params] This causes a script to be executed when IVT switch between sessions. The session that becomes the foreground one will get ONSWITCHTO scripts executed. The session that loses the foreground will get the ONSWITCHFROM scripts executed. There can be multiple ONSWITCH scripts. Such a script can be used to change global settings that depend on the curren settings. But an example might be the custom menu bar entry. NOTE: The script is started and IVT does not wait for it to finish. If the script takes a long time to execute and the user switches rapidly between sessions, it could happen that multiple instances of the TO and FROM

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.29: ONTABICON/TO (Call script when user clicks tab bar icon)

Page: 81

scripts are started. Make sure you protect against this by using SHAREMODE. See also PRECONNECT, ONCONNECT, ONDISCONNECT, ONRESIZE, ONERROR, ONDROPFILES. 12.2.29: ONTABICON/TO (Call script when user clicks tab bar icon) ONTABICON Scriptname [params] a customisable text and am optional icon. The default icon that IVT can supply is a close icon, but you can use the SetTabIcon() function to supply a different icon. When the user clicks the icon, this ONTABICON statement can be used to start script on the session to handle the click. When no ONTABICON is specified and the user clicks on the CLOSE icon in the tab, IVT will immediately terminate the session. When an ONTABICON script is specified, ALL handling of ALL clicks becomes the arbitrary sessions that cause arbitrary things to happen when the user clicks on them. function with "ICONTAB" as a parameter. 12.2.30: OPTIONS (Specify command line options in IVT.RC file) OPTIONS options The OPTIONS keyword can be used to set/unset command-line options. This is is invoked. The options takes the same form as on the command line. Use a preceding hyphen (-) to turn an option on, and a preceding plus (+) to revers the meaning. Examples: OPTIONS OPTIONS OPTIONS OPTIONS OPTIONS OPTIONS -ns +n +s -B +ns -s +s "+s" (acts as if 'IVT -ns ...' was used) (space separated, multiple options allowed) (acts as if 'IVT +ns ...' was used) (forces security on) (forces security off) (forces security off, quotes are optional)

Another way to specify options to IVT without typing them every time is to define an environment variable called IVTRC. You could, for example, say: SET IVTRC=+ns And that would have the same effect as an OPTIONS statement. If you use a -B (no banner) option, IVT will remove the splash screen when it is currently displayed as soon as it sees the option. 12.2.31: PRIVATE_RC_FILES (Allow/deny private configuration) PRIVATE_RC_FILES NO_PRIVATE_RC_FILES When IVT starts up, it will usually attempt to read an IVT.RC file on the private HOME directory of the user (as indicated by the HOME environment variable of Windows). Sometimes this is undesirable, for example when you have a special IVT configuration in some network directory, where the IVT.RC file is used to configure some specific application. In that case, the NO_PRIVATE_RC_FILES command will prevent the processing of those private files. The default is, of course, PRIVATE_RC_FILES. However, see also the "-c" command line option. This is an important feature, others are prev/next 12.2.32: PROFILE (Load configuration) PROFILE "name" See also DEFINE_PROFILE. Older versions of IVT could only save ONE setup configuration. This version of IVT can use multiple setup-configurations called PROFILES.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.32: PROFILE (Load configuration)

Page: 82

A profile defines the entire look and feel and all configurable options of IV under a simple name. When a session is created, the name of a profile is associated with that session, and all the settings in the profile are applied before the session is actually created. Profiles can be created in two ways: - Interactively in setup. You simply alter whatever part of setup you want, then use the "Save as" button at the bottom of the main setup panel. This will show a profile management dialog. Type a name for the new profile and click "Save as". These profiles are stored in the registry, so they belong to the current user profile (of Windows). - In the IVT.RC file. Use the DEFINE_PROFILE directive to instruct IVT that a new profile is going to be defined. All settings up until the DEFINE_PROFILE ENDS are made part of the named profile. Such profiles can contain items that cannot be configured interactively, such as KEYMACRO, printer definitions and many others. See DEFINE_PROFILE for details IVT defines one default profile. This appears in the "Create session" dialog as the first choice. Initially, this profile is the result of the IVT.RC file setup (or, lacking such a file, from the built-in defaults of IVT). You can overwrite the default profile as you like, changing the look and feel with which IVT starts up. The default distribution kit of IVT adds another profile: DEC-VT220, which configures IVT to be as close as possible to a true VT220 terminal. A profile can be attached to a session in many ways: - Interactively from the "Create session" dialog, which contains a drop-down box that allows you to choose one of the known profiles. - By using a global PROFILE command in the IVT.RC setup files. For example, the initial configuration script of IVT can set the DEC-VT220 profile as th default. Instead of "Default" being the default profile, DEC-VT220 assumes that role. - Using the PROFILE command in a script. Usually you would use a PRECONNECT or ONCONNECT script for this. A single command will load the entire setup, either from an interactively defined profile or from a DEFINE_PROFILE. You can use this to change arbitrary setup items for particular hosts, users or whatever other condition you can think of. If you want to use a different profile for ALL your sessions, use a PRECONNECT statement that sets a different profile. If you want to leave th user a choice for his own profiles, use: PRECONNECT * ChangeProfile Script ChangeProfile # Only modify profile when current setting is default IF LOWER(QUERYSETTING("PROFILE")) == "default" \ THEN PROFILE "MyProfile" END This uses the QUERYSETTING function to inquire the current profile. When not default, it will modify it. This prevents the ChangeProfile function overruling a setting from HOSTLIST, CREATE and so on. - The PROFILE= clause in a CREATE statement. - The HOSTLIST command has been extended to allow the definition of a profile for fixed address book listings. This allows yet another way to offer easy predefined choices to the user. When the host is picked from the list, the associated profile is applied. There a few rules governing profiles: - Deleting the default profile (from the registry) is allowed, this restores IVT to the setup that results from its configuration files. - Older versions of IVT did NOT allow this, but starting in version 22 you ca load any profile, modify it interactively, and save it under the same name. For example, this allows you to load the DEC-VT220 profile (which is define in the IVT.RC file), modify it, and save it to the registry under the same name (DEC-VT220). When the profile is loaded, IVT will check for such an overloaded profile name. - A profile can contain items that are not session-specific. An example is the language of IVT itself, or the look of the title bar (there are many others). It is not wise to define various profiles with different global settings, as the last one that is applied will be used, which can be confusing to the user. However, it can be very powerful to have the entire look & feel of IVT switched over by choosing a different profile, therefore

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.32: PROFILE (Load configuration) it is allowed and supported. Use with care.

Page: 83

- Profiles can be based on other profiles. If you create a prof1 profile, laod it, modify it and save it as prof2, IVT will only store the modifications (relative to prof1). When prof2 is loaded, IVT will first load prof1, then apply the prof2 modifications. This can be nested to an arbitrary depth. It does imply that when you modify prof1, prof2 will inherit those modifications. Again, best to keep it simple here. - When you use the name of a non-existent profile in your IVT.RC files, it is treated as if you said "Default". - The "Default" profile can be specified in either English or your native language, when you have selected that. The QUERYSETTING function always returns "Default" (in English).

12.2.33: PROTOCOL (Specify the type of protocol to be used) PROTOCOL transport[,session] NOTE: This statement can also be used in a PRECONNECT script to change the protocol of a session that is about to be created. This version of IVT supports the following transport protocols (which is a subset of all existing protocols): - NETBIOS NetBios protocol (can also be NetBios-over-TCP/IP). IVT was originally designed for this protocol. - SERIAL RS-232 over serial lines (modems and such). This is useful if you want to use IVT from home rather than on a LAN. Also when you connect to special hardware that requires a serial connection. - MULTIPLEX This version of IVT also supports multiplexing. On a LAN, this is not reall necessary, but on serial lines it gives you the possibility to run several sessions on the remote (Unix) host you login to, using the IVTM support program. - WINSOCK The Windows way of doing TCP/IP. This is by far the most common protocol nowadays. - DUMMY This protocol allows you to have a "session" to a dummy host, which always connects immediately, never sends anything except echoing back what you sen it. This is useful if you want to have an IVT script batch procedure that just needs a session context to "something". In addition to these transport protocols, you can "push" one of the following session protocols on top of this: - TELNET. The IVT built-in TELNET protocol. - RLOGIN The (Unix) RLOGIN protocol, designed for use over TCP/IP. For your convenience, IVT recognizes a number of handy abbreviations for common combinations. These are: NET VTP TLN SSH RLN SER DUM NETBIOS Vtp hack. WINSOCK,TELNET WINSOCK,SSH WINSOCK,RLOGIN SERIAL DUMMY

Examples: PROTOCOL PROTOCOL PROTOCOL PROTOCOL SERIAL NETBIOS,VTP WINSOCK,RLOGIN WINSOCK,TELNET

When no protocol statement is used to force IVT, it will determine which protocols are compiled in and available at runtime, and use one that seems 'logical'. Use the command line or a PROTOCOL statement to force the choice. You can, of course, also use the setup screen to change both the transport

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.33: PROTOCOL (Specify the type of protocol to be used)

Page: 84

and session protocols. The setup-screen allows you to change the protocol for the NEXT session you are going to create. A script can query the current effective protocol by using the $PROTOCOL and $PROTOCOL_SESSION. 12.2.34: REGISTRY (Load start-up config from registry yes/no) REGISTRY NO_REGISTRY Default: REGISTRY. When the setup screens are used to change the configuration of IVT, the resulting configuration can be saved into the Windows registry using setup. See "IVT and the Windows registry" for details. If, for some reason, you want to ignore the current contents of the registry without deleting it, you can specify NO_REGISTRY in your IVT.RC file. IVT will then not attempt to read the registry during start-up. Also, the button to save the setup to the registry will be disabled, so users are unable to make permanent changes to the IVT setup. See also secure mode and IVT_DIALOGSTATE. See also the IVT registry functions REGCREATEKEY, REGDELETEKEY, REGDELETEVALUE, REGQUERYENUM, REGQUERYSTR, REGQUERYDWORD, REGSETVALUEDWORD and REGSETVALUESTR. 12.2.35: RESOLVE (Set name resolution options) RESOLVE "NameSource[,...]" NO_RESOLVE Resolving is the process of translating hostnames into IP numbers (the numbers that identify a host on a TCP/IP network). In this version of IVT, this can be an IPv4 or IPv6 address. This option is only used for the TCP/IP (WinSock) transport protocol. See also the DOMAIN statement, to specify a number of domain names to append to the hostname. The default domain of the PC you run IVT on is used automatically. NameSource can be one of: - Filename of a HOSTS style file; - IP address of DNS server with optional timeout and port number; - The word HOSTBYNAME. For example, the name of a host (like www.ibm.com) must be resolved to an IP address (like 129.42.58.212) before a session can be established. The translation of names into numbers can be achieved in a number of ways: 1) Using a HOSTS type file (containing numbers and their names). 2) Using DNS (Domain Name Server). 3) Using WINS (a Microsoft way of doing DNS). A HOSTS file contains lines with IP numbers and one or more names for that address. For example, you could have a file called C:/WINDOWS/HOSTS that contains lines like: 193.79.171.11atf.cmg.nl mailgate 2001:200:dff:fff1:216:3eff:feb1:44d7 www.kame.net kame fe80::a00:27ff:fe8d:54f2 moria-u the IPv4 line gives two names for one address. when you establish a session. Fields on a line (spaces or tabs). Lines can be empty or end in A comment is introduced with the # sign. The lines with all the colons in them are IPv6 this version of IVT understands as well. Either can be used as the name are separated by white space a comment. hexadecimal addresses, which

A DNS server (Domain Name Service) is a computer on the network that resolves names into IP numbers. IVT has to know the IP-address of one (or more) of such servers to be able to query them. Normally, the server can be reached on the well-known DNS port (number 53), but you can specify another port. The DNS IP-address can be an IPv4 or IPv6 address, IVT can query both typeso of servers. See also the DOMAIN statement. IVT can also use the standard "gethostbyname" function, which will simply use

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.35: RESOLVE (Set name resolution options)

Page: 85

the configuration of your PC to translate the name into the desired address. This can use files, query DNS or WINS servers or whatever. From IVT version 22.2 onward, DNS calls are no longer synchronous (which woul block IVT if the DNS server was slow), but asynchronous (handled in the background). This solves a number of annoying issues. The RESOLVE statement takes a list of sources to query. Each source is either: - The IP-address of a DNS server (IPv4 or IPv6 style). - A filename (with lines according to a HOSTS file format); - The literal word HOSTBYNAME or GETADDR (same meaning); - An AVOID:ip-address construction instructs IVT to NOT use a certain DNS server (see below). The sources are queried in the order you specify them. A filename is simply the (full) pathname of the file. A DNS server must be the dotted-decimal address of a nameserver, optionally followed by a / and a decimal timeout in seconds, optionally followed by a second slash and a port number. IVT will wait for the specified number of seconds for an answer from the DNS server. When no reply is received, the next name source is tried. The timeout defaults to 20 seconds. The port number to 53 (DNS). During the timeout, IVT WILL respond to input from other sessions, the keyboard, scripts, etc. since the built-in DNS resolver is home-rolled and asynchronous. See also the DOMAIN statement, to try to resolve the name in a number of different domains. When you specify the literal HOSTBYNAME, IVT will use that function (the asynchronous, non-blocking Windows version of it). When you do not use a RESOLVE statement in your IVT.RC files, IVT will defaul to scanning the HOSTS file in your OS directory, followed by a HOSTBYNAME. The AVOID:IP-address is a little used option that can be used to try and correct bad DNS setups. When a queried DNS server sends a "redirect" to IVT, this normally causes IVT to re-send the query to the specified address. When such a redirect address is specified in an AVOID clause, IVT will simply give up on that specific redirect and try the next alternative. This can be used when a DNS server redirects you to a server on the Internet, but you are behind a firewall which blocks the query, causing long timeouts. Example: RESOLVE "C:/Windows/HOSTS,193.79.171.11/3/53,193.79.171.100,HOSTBYNAME" This would first look in your local HOSTS file, then query a nearby DNS serve which is unreliable (often down, hence the timeout of only 3 seconds), then resort to another, slower but more reliable server (default timeout, thus 20 seconds). The default port of 53 is specified explicitly as an example, it ma be omitted, If all queries fail, IVT will do a call to the OS with "gethostbyname". If a name cannot be resolved, session establishment will fail with a "Host unknown" error message (see also ONERROR). You might use the file to configure the IP-addresses of servers that you use often if you are plagued by unreliable DNS-servers. If not, it is best to leave ALL resolving to a DNS server because when servers change their address the DNS-server will know about it, where your local file does not. Actually, I am quite proud of the DNS code - it will perform lookups in the background, so a longish wait on a response is interruptible (you can switch when you start-up IVT with multiple auto-created sessions. The NO_RESOLVE statement (no parameters) will delete any previous list of remembered resolvers. This can be used to forget settings from other configuration files, or force things back to their defaults. Note: Version 21.1c of IVT adds a local cache to the name resolver, where resolved entries are kept for a short while (30 seconds). This is intended to prevent floods of queries for the same hostnames when you have a group of sessions to the same (or a small set) of hosts, or proxy server. For example, a group of 30 sessions all using the same (named) proxy server would cause The cache is cleared when the RESOLVE statement is used to alter resolving. See See See See also also also also the the the the RESOLVE_TRACE command to print debugging output. DOMAIN statement to search a number of domains. $IVT_NETW_DOMAIN variable. $IVT_IP_CANON variable.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.36: RESOLVE_TRACE (Show name resolution and DNS debugging) See also the RESOLVENAME function. See also Winsock, TELNET, SSH and RLOGIN.

Page: 86

12.2.36: RESOLVE_TRACE (Show name resolution and DNS debugging) RESOLVE_TRACE NO_RESOLVE_TRACE Default: NO_RESOLVE_TRACE. This command can be used to make IVT print out information about attempts to resolve a hostname into an IP-address. This assumes the WinSock protocol and that the RESOLVE statement has been used to configure DNS (Domain Name Server addresses. Whenever a DNS NameServer is queried or a HOSTS type file is searched, IVT will show some details on the screen concerning the query and the result. This might be helpful when you receive 'Host unknown' errors. This option can also be changed from this setup panel, which works only for the current session (so you must set this before you initiate the session by choosing "setup" from the create session dialog). 12.2.37: RLOGIN_LOCALUSER (Name of local user for RLOGINs) RLOGIN_LOCALUSER stringexpression This is only for use with the RLOGIN protocol (and ignored otherwise). This sets the name that will be transmitted to the remote (Unix) host and which identifies the user on the local PC. Since IVT has no way to determine who you really are, it will send whatever you tell it to. A reasonable value might be: RLOGIN_LOCALUSER $ENV_USERNAME which will set it to your Windows username (if any). The Unix machine will use this name to see if the user is 'trusted'. It can be configured along the lines of 'User john on system X is equivalent to user johnb on THIS system'. This is not very secure. See also RLOGIN_REMOTEUSER and RLOGIN_TERM. 12.2.38: RLOGIN_REMOTEUSER (Name of remote user for RLOGIN) RLOGIN_REMOTEUSER stringexpression This is only for use with the RLOGIN protocol (and ignored otherwise). identifies the user you want to login as on that host. When the host decides to trust you, it will log you in without prompting for a password. If not, it will either disconnect or simply ask you to prove your claim by asking for a password. When you do not specify this value, IVT will the create session dialog in the "User name" If you do not specify a user there, but have RLOGIN_REMOTEUSER, that latter value is also use whatever you have entered in field. specified a value for the assigned to the $USER variable.

See also RLOGIN_LOCALUSER and RLOGIN_TERM. See also the password learning and automatic login system. 12.2.39: RLOGIN_TERM (Terminal type for RLOGIN sessions) RLOGIN_TERM stringexpression This is only for use with the RLOGIN protocol (and ignored otherwise). It sets the type of terminal you claim to use (it will end up in the Unix TER environment variable). The default is "vt220", which IVT emulates. You can se it to anything else. When you use the special TIC (Terminal Information Compiler) on the IVT.TIC file delivered with IVT the host will know a termina type "ivt", which will allow it to make better use of IVT's special features. See also Winsock, RLOGIN_LOCALUSER and RLOGIN_REMOTEUSER.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.40: SAVEGROUPNAME (Save chosen group name as if typed)

Page: 87

12.2.40: SAVEGROUPNAME (Save chosen group name as if typed) SAVEGROUPNAME NO_SAVEGROUPNAME When turned on, this will treat a group name chosen from a list as if it was typed in the create-session dialog. This will make the name of the group appear in the "Create Session" dialog the next time that appears, so the same group can be chosen by simply clicking on "OK" or hitting enter. Added upon special request by Gert Leerdam. The default is NO_SAVEGROUPNAME. There currently is no setup item for this. This global setting can only be configured in an IVT.RC fle. 12.2.41: SAVEHIST (Enable history pager yes/no) SAVEHIST NO_SAVEHIST Default: SAVEHIST. Normally, IVT will save lines that scroll from the top (or bottom) of the screen for later viewing in the history pager. This is done very efficiently, but in some cases you want to disable it. If such a case applies to you all the time, you can use NO_SAVEHIST to make it the default, rather than using the setup screen to change the setting for the current session only. 12.2.42: STORE_CMD_PARAMS (Save host/user from command line) STORE_CMD_PARAMS NO_STORE_CMD_PARAMS Default: STORE_CMD_PARAMS. Normally, when IVT starts up and you have typed a hostname and optionally a username on the command line, IVT will treat those names as if you had typed them in the "Create Session" dialog and will save them in the registry, so they appear in the dialog when you disconnect, or when you restart IVT withou parameters. However, some users start IVT using shortcuts with predefined names in them, and they do not consider those names as "typed" and worth saving, they would rather see the names they actually typed into the "Create Session" reappear, and not have them overwritten by the names from the shortcut. Therefore, the NO_STORE_CMD_PARAMS command can be used to prevent the information being saved in the registry. There is no setup item or registry setting for this option, you must specify it in your IVT.RC file. See also EXPLICIT_EXIT and RECONNECT, which also determine what happens when the user disconnects from a host. 12.2.43: TCP_FLOOD (Prevent too many TCP/IP sessions being created) TCP_FLOOD NrOfSessions MsDelay NO_TCP_FLOOD Default setting is: NrOfSessions 10, MsDelay 1500. When you have a CREATEGRP with many sessions in them, IVT triggers a protection mechanism in TCP/IP stacks of Windows machines. To quote from MSDN Limited number of simultaneous incomplete outbound TCP connection attempts. Detailed description The TCP/IP stack now limits the number of simultaneous incomplete outbound TCP connection attempts. After the limit has been reached, subsequent connection attempts are put in a queue and will be resolved at a fixed rate. Under normal operation, when applications are connecting to available hosts at valid IP addresses, no connection rate-limiting will occur. When it does occur, a new event, with ID 4226, appears in the system's event log. Why is this change important? What threats does it help mitigate? This change helps to limit the speed at which malicious programs, such as viruses and worms, spread to uninfected computers. Malicious programs often attempt to reach uninfected computers by opening simultaneous connections

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.43: TCP_FLOOD (Prevent too many TCP/IP sessions being created)

Page: 88

to random IP addresses. Most of these random addresses result in a failed connection, so a burst of such activity on a computer is a signal that it may have been infected by a malicious program. End quote. However, IVT can create great bursts of outgoing sessions, and these extra connections do not seem to be queued, but they fail. The TCP_FLOOD command tries to work around this, by slowing IVT down so it stays below the threshold to be classified as "malicious". The default is to not create more than NrOfSessions in any MsDelay interval. In practice, this will prevent the problem from occurring. When you use a proxy server, the same mercy is shown. Setting NO_TCP_FLOOD will turn this feature off - IVT will simply create the sessions as fast as it can. See also MERCY_MODE, which implements a very similar delay. See also XAUTH_DELAY, which works around another bug in SSH. 12.2.44: TCP_NODELAY (Enable/disable Nagle algorithm) TCP_NODELAY NO_TCP_NODELAY Default: TCP_NODELAY. This option is used for TCP/IP sessions only (TELNET, SSH and RLOGIN). The Nagle TCP/IP algorithm was designed to avoid problems with small packets, called tinygrams, on slow networks. The algorithm says that a TCP/IP connection can have only one outstanding small segment that has not yet been acknowledged. The definition of "small" varies but usually it is defined as "less than the segment size" which on Ethernet is about 1500 bytes. By delaying slightly, multiple small packets can be combined into one larger packet, improving overall throughput for most applications. Since IVT typically produces small network packets (one keystroke per packet) it is undesirable to have Nagle (i.e. delaying) enabled. Fast typists will notice a sluggish keyboard response on slow networks. Therefore, TCP_NODELAY is the default, small packets are sent immediately. In some cases it may be desirable to change this default. Note that changing the option only affects new sessions, existing sessions are unaltered. The option can also be changed from this setup panel. The setting is also saved in the registry. 12.2.45: TIPS (Enable/Disable start-up tips) TIPS NO_TIPS time. One of these tips is picked at random. If you already know everything there is to know about IVT, you can disable this feature with a NO_TIPS keyword in your IVT.RC file. This setting can also be changed from this setup screen (after which you have to save the settings, of course). NOTE: This field is one that can be configured using the installation wizard that i automatically started when you install IVT. Because it would give conflicts when you change this both in the configuration file created by the wizard and in interactive setup, this item is disabled in interactive setup. If you want to change this item, re-run the installation wizard: Menubar->setup->Re-run initial setup script The wizard has as the first button a "Do not use wizard" feature. If you choose that, all items in interactive setup will be enabled again (and you must configure all the necessary options there and save the setup, OR edit th IVT.RC file manually). NOTE: Since the tips are in English only, the wizard will turn tips off by default when you have chosen another language for IVT's interface.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.46: TYPEDHOSTS (Show manually entered hosts) 12.2.46: TYPEDHOSTS (Show manually entered hosts) TYPEDHOSTS NO_TYPEDHOSTS

Page: 89

When you click on the fat down-arrow in the main create-session dialog (after the hostname field), a dialog pops up that allows you to choose a connection from a list of previous connections and explicitly defined connections set by the HOSTLIST command. There is a button in the panel that allows you to turn the display of manually entered hosts off. This is handy if you have only a few hosts that you connect to, and you have described them all in the host list. The TYPEDHOSTS setting allows initial display of typed hosts. the setting, the current value of which is also saved in the registry. 12.2.47: UPLOAD (set upload directory) See DOWNLOAD. 12.2.48: VERSION_SERVER (notify of new releases of IVT) VERSION_SERVER hostname port This statement is meant to be used in environments where IVT is used by a large userbase, installed locally on PC's and updated now and again. See also IVTUPGRADE. When IVT starts up and VERSION_SERVER is configured, it will attempt to contact the given hostname on the given (numeric) port. When that succeeds, i reads up to 1KB of data from that server and disconnects. The connection to the version server is handled by a background thread in IVT, so normal startup is not impeded when the server is down or unreachable. The FIRST line of the received data is supposed to contain the version number of the latest & greatest available version of IVT, followed by the build number and an optional download directory. The running IVT will compare its own version and build number with the ones received, and when it finds that it is outdated, it will display the rest of the received data in a popup to the user. When it finds that it is at least as new as the received version, it will continue with normal startup immediately (no popup is displayed). In the case that IVT is outdated, it will check for the presence of an IVTUPGRADE.EXE program in the IVT install directory. When found, it will add button called "Upgrade now" to the popup. When the user clicks this button, master directory as passed by the version server as arguments. it will be stopped. The IVTUPGRADE program will copy all files and directories in the master directory to the IVT install directory. A progress window and a summary will be displayed. The upshot is that everybody who runs an notified of new releases of the software a new version with a single mouse click. query once ever 24 hours, so even people end are notified of upgrades. outdated version of IVT will be when they restart IVT and can obtain IVT will retry the version-server that have IVT running for weeks on

The version server that is contacted can be a Unix host or a Windows host, th supplied ivtversion.c program can be compiled and used on both. The ivtversion executable is started as: ivtversion portnumber file E.g: ivtversion 4500 versfile The portnumber must be the same as used in the VERSION_SERVER statement. The versfile contains information about the latest release. Lines in that fil that have a '#' as the first character are ignored. Example: --- Cut here --# This file is read by starting IVTs to determine the latest # available version. The first non-comment line must document # the version (and optionally build) of the new version: 21.1 20872 \\10.75.73.4\IVT_Complete # The rest of this file is displayed as popup to the user. # There can be ONE %s in the text (first) and a %d (second) which

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.48: VERSION_SERVER (notify of new releases of IVT)

Page: 90

# The %s is substituted in the message by the CURRENT version number # if the outdated IVT. The %d is substituted by the current build number # of the outdated version. Version 21.1 (build 20872) of IVT is available! You are currently using version %s (build %d) New features are: - Important bugfixes... - Brand new features ... --- Cut here --Any IVT that sees that it is older than version 21.1, or has a build number below 20872 will show the message. All others will show nothing. It is the responsibility of the administrator to make sure that the master directory (\\10.75.73.4\IVT_Complete) actually contains a correctly configure master distribution of a working IVT setup. The source of the ivtversion server (ivtversion.c) is part of the distro. This program can be compiled on Unix and Windows. The ivtupgrade program is also part of the distro, in both source and executable (windows) form. 12.2.49: WSOCKTIMEOUT (set timeout for connection setup) WSOCKTIMEOUT seconds Whenever IVT attempts to connect to a remote computer over the WinSock protocol, it sends out a packet into the network to whatever IP address it found using the RESOLVEr or which you specified directly. The remote computer has to answer, but the packet can get delayed or lost. IVT will, by default, wait up to 21 seconds for an answer before giving up. When no answer is received within 3 seconds, a message 'Trying ...' is displayed which shows the IP address that IVT is connecting to and how long IVT is still prepared to wait. For some hosts, 21 seconds is way too long. If you know the host is located on the same LAN as you are on, a connection is typically established within one or two seconds, or not at all. Therefore, you can set the timeout with the WSOCKTIMEOUT command. The value is in seconds. When the timeout occurs, an error message is displayed. Also, the socket layer software of Windows may give up before IVT does. This timeout is used for all TCP/IP connections initiated by IVT (Telnet, SSH Proxy connections, tunnels, X-forwarding and aso on). See also the RESOLVE statement for configuring the hostname resolver of IVT. See also ONERROR. This value can also be changed from this setup screen, and is saved in the registry. 12.2.50: ZMODEM_AUTO (Automatic ZMODEM start-up) ZMODEM_AUTO NO_ZMODEM_AUTO Normally, IVT will recognize a ZMODEM file transfer starting (the zmodem protocol sends a unique string when sending or receiving a file). When you use FILE_SEND and FILE_RECEIVE with the ZMODEM protocol, it is essential that this is turned off because the explicit start of the file transfer via the FILE_SEND and FILE_RECEIVE calls will interfere with the implicit start. NO_ZMODEM_AUTO will turn ZMODEM_AUTO will turn it The current state can be The defaults setting can this automatic starting of the file transfer off. on. queried using the $ZMODEM_AUTO variable. also be changed from this setup screen.

12.2.51: ZMODEM_PACKET (Maximum size of transfer blocks) ZMODEM_PACKET n Default: 1024. When files are transferred using ZMODEM, it sometimes overruns the host with packets of 1024 bytes. If you experience problems with zmodem (repeated retries, very low throughput but ultimately successful transfer) you might try lowering this value. The maximum is 1024, minimum is 8 bytes.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.2: General and miscellaneous settings 12.2.51: ZMODEM_PACKET (Maximum size of transfer blocks)

Page: 91

Especially older versions of OpenSSH servers and AIX systems have problems with packet sizes over 50(!) bytes. Setting a packet size of only 50 will actually dramatically improve throughput and prevent overrun errors. This value can also be changed from this setup screen and is saved in the registry. 12.3.1: ALT_SCREEN (Allow alternate screen) ALT_SCREEN NO_ALT_SCREEN Default: ALT_SCREEN. This determines how IVT reacts to XTERM escape sequences that control the behaviour of an alternate screen. When enabled, it allows IVT to swap between the normal screen and "alternate" screen. Normally, Unix programs that use an XTERM terminal will switch to the alternate screen when a full-screen program (like the VI editor) starts up and restore the normal screen when the program exits. The result is that when you return to the prompt, the screen shows the VI command and previous output, instead of whatever VI left on the screen. Depending on what you are used to, the "other" behaviour can drive you to distraction, which is why it is configurable in IVT. updated "ivt" (this feature was added on Mar 06, 2007) for the alternate screen feature to work. When disabled, IVT will simply ignore the escape sequences that control the alternate screen. See here for details. This feature can also be changed (per session) from this setup screen, and is saved in the registry. 12.3.2: AMBIGUOUS_CJK_WIDE (Treat ambiguous CJK characters as wide) AMBIGUOUS_CJK_WIDE NO_AMBIGUOUS_CJK_WIDE Default: NO_AMBIGUOUS_CJK_WIDE There are some Unicode characters whose width is not well-defined. In most contexts, such characters should be treated as single-width for the purposes of wrapping and so on; however, in some CJK contexts, they are better treated as double-width for historical reasons, and some server-side applications may expect them to be displayed as such. Setting this option will cause IVT to take the double-width interpretation. If you use legacy CJK applications, and you find your lines are wrapping in the wrong places, or you are having other display problems, you might want to play with this setting. This option only has any effect in UTF-8 mode. This setting can also be changed in this setup screen and is saved in the registry. 12.3.3: BCOL (OLD: Default background screen color) BCOL num This commands sets the default background color. It is deprecated. Use COLORS instead. See also color swap for side effects of using colors. 12.3.4: BIT8COMMANDS (display/execute 8-bit commands) BIT8COMMANDS DISPLAY BIT8COMMANDS EXECUTE Default: EXECUTE. A VT220 terminal has a number of single-byte commands that are the equivalent of some two-byte commands. These commands and their function are described in details in this escape sequences section. Note that these 8-bit commands are rarely used. Still, a proper emulator (suc as IVT) has to recognize these commands and execute them. However, some applications require that a particular 8-bit command is not executed, but a character is displayed instead. You can use CODEPAGEMOD to specify which Unicode character to display for these commands. However, if

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.4: BIT8COMMANDS (display/execute 8-bit commands)

Page: 92

you want IVT to display the normal codepage character instead of executing the command, it is not easy to find out which Unicode character to specify, since it depends on the selected codepage. The DEFAULT option of the CODEPAGEMOD command allows you to set the DISPLAY attribute for a single 8-bit command. The BIT8COMMANDS DISPLAY says that ALL of the above special commands are NOT to be executed, but that the codepage character must be displayed instead. Note that this breaks VT220 compatibility, so only use this when you know what you are doing. See also CODEPAGEMOD, 8BITCHARS and VTTEST. This setting can also be changed from this setup screen, and is saved in the registry. 12.3.5: CHARSET (Set DECVT220 or IBMPC character set) CHARSET DECVT220|IBMPC This command is obsolete. See CODEPAGE instead. See also NATIONALITY. 12.3.6: CLOCK (Status line clock on/off, old-fashioned) CLOCK NO_CLOCK The CLOCK command is the same as STATMIDDLE CLOCK. The NO_CLOCK command is the same as STATMIDDLE OFF. This is a holdover from the past, when only a clock or nothing was displayabl in the middle of the status line. Nowadays, there are several other options, see STATMIDDLE. 12.3.7: CLOCKSKEW (Adjust the time display) CLOCKSKEW seconds When you are using a workstation that has the clock set wrong and you have insufficient privileges to adjust the time, you can use this option to adjust the time display of IVT. A positive value indicates the PC clock is fast, a negative indicates it is slow. It can also be changed from this setup screen. See also STATMIDDLE. 12.3.8: CODEPAGE (Set Windows output code page) CODEPAGE Description CODEPAGE n The codepage determines the output codepage (what characters are displayed) of IVT. A codepage is a look-up table of 256 positions, where a received character us used as an index to look up the unicode character that is going to be displayed by IVT when that character is received. The rules are: - You can now choose from a whole range of codepages, so received characters are assumed to be in that codepage and are displayed accordingly. Note: The UTF-8 codepage allows displayig all possible Unicode characters. - Different sessions can have different codepages, all sessions can have a different font. - IVT will determine the local (default) codepage of your computer and select an "appropriate" codepage so the default setup should work for most people. - Officially, a VT220 terminal that receives 8-bit characters while operating in 7-bit mode, should use the character set mapping as specified by DEC. This conflicts with the new IVT behaviour, check out the new 8BITCHARS command, which allows you to specify compatible DEC mapping. - The older, existing CHARSET setting of IVT is now ignored. possible to specify "IBMPC" or "DECVT220" there. The first now be obtained by selecting "CODEPAGE 437". The second is behaviour, and can be influenced by GUI_FONT (charset) and It used to be setting can the default 8BITCHARS.

- If that is still not enough, the CODEPAGEMOD statement can be used to make

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.8: CODEPAGE (Set Windows output code page)

Page: 93

modifications to one of the standard codepages. This also changes the behaviour for 8-bit command codes. I have copied the codepage tables and bits and pieces of the relevant code from the source of PuTTY, and would like to say thanks to the authors of that program for making this available. The following values for Description are available (specify the first word only): ISO-8859-1Latin-1, West Europe ISO-8859-2Latin-2, East Europe ISO-8859-3Latin-3, South Europe ISO-8859-4Latin-4, North Europe ISO-8859-5Latin/Cyrillic ISO-8859-6Latin/Arabic ISO-8859-7Latin/Greek ISO-8859-8Latin/Hebrew ISO-8859-9Latin-5, Turkish ISO-8859-10Latin-6, Nordic ISO-8859-11Latin/Thai ISO-8859-13Latin-7, Baltic ISO-8859-14Latin-8, Celtic ISO-8859-15Latin-9, "euro" ISO-8859-16Latin-10, Balkan KOI8-U KOI8-R UTF-8 HP-ROMAN8 VSCII DEC-MCS Win1250Central European Win1251Cyrillic Win1252Western Win1253Greek Win1254Turkish Win1255Hebrew Win1256Arabic Win1257Baltic Win1258Vietnamese CP437Standard OEM Ascii CP819 CP878 CP<Number>That codepage when available in Windows Example: CODEPAGE ISO-8859-1 Another relevant setting is INPUT_LANGUAGE - if your locale implies that you type a lot of accented characters, you can configure IVT to use an American keyboard layout so quotes and so on immediately produce a quote. See also CODEPAGEMOD. See also NATIONALITY. This setting is saved in the registry. It can also be changed (on a per session basis) in this setup screen. 12.3.9: UTF-8 (What it is) From Wikipedia: UTF-8 (8-bit UCS/Unicode Transformation Format) is a variable-length characte encoding for Unicode. It is able to represent any character in the Unicode standard, yet the initial encoding of byte codes and character assignments fo UTF-8 is backwards compatible with ASCII. For these reasons, it is steadily becoming the preferred encoding for e-mail, web pages], and other places where characters are stored or streamed. UTF-8 encodes each character (code point) in one to four octets (8-bit bytes), with the 1-byte encoding used for the 128 US-ASCII characters. End quote. simple 8-bit characters. Unicode has millions of different characters, and to be able to display them, fundamental changes had to be made to the display code of IVT. When you select the UTF-8 CODEPAGE, IVT will recognize and process data from the host and display them correctly. Also, it will alter the behaviour of the a foreign keyboard, IVT will support IME (Input Method Editor) which allows Windows programs to accept Asian languages (such as Korean and Chinese) to be typed. Data entered this way is transmitted to the host in UTF-8 format, too. Printing, copy & paste and logging data to files all support UTF-8, so you ca use IVT in an international environment.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.9: UTF-8 (What it is)

Page: 94

Event the language tables used by IVT to customize the dialogs and menus support UTF-8 now, so you can make a Chinese version of the interface if you so desire. See also CODEPAGE, CODEPAGEMOD and KEYBOARDMOD. 12.3.10: CODEPAGEMOD (Modify current codepage) CODEPAGEMOD position UnicodeCharacter [KEYBOARDMOD] CODEPAGEMOD position DEFAULT

This statement can be used to modify the current CODEPAGE. A codepage has 256 positions, numbered 0 - 255. The value of each position determines what character is displayed by IVT when a byte is received from th host. IVT comes with many standard codepages, but sometimes the need arises for custom codepages. The position must be a value between 0 and 255 (or, whe a hexadecimal notation is used), 0x00 - 0xFF). The UnicodeCharacter must be a value between 0x0000 and 0x10FFFF and should specify a valid Unicode character. When a UnicodeCharacter value of zero is used, NOTHING is displayed, not even a space. This can be used to filter out any character. When the (optional) keyword KEYBOARDMOD is specified, the statement implies a reversed KEYBOARDMOD statement. It is important to understand exactly what is modified: - When a font is selected, IVT builds a master copy of the currently selected CODEPAGE. - When a new session is created, the master copy is copied to a private area for that session. It is possible to use a CODEPAGE statement in an ONCONNECT or PRECONNECT script. This will create a private copy for that session of a different codepage. - A CODEPAGEMOD in your IVT.RC file modifies the master copy AND remembers the change. Every new codepage that is built by IVT will have these modifications applied. So, a CODEPAGEMOD in your IVT.RC file outside of any script will apply to all sessions and all fonts. - A CODEPAGEMOD in a session script will modify the private copy of that session only. Such changes are not remembered and thus can be "undone" by selecting a new CODEPAGE or a new GUI_FONT. NOTE: A VT220 emulator such as IVT also supports a number of 8-bit command characters. When a byte with such a value is received, IVT normally executes the action defined by that command byte. However, when you EXPLICITLY set a CODEPAGEMOD to display a unicode character for one of the 8-bit commands, IVT assumes you know what you are doing and will display the character you specif WITHOUT executing the command. Note that this breaks VT220 compatibility! However, every 8-bit command code has a 7-bit equivalent, see here. want to make IVT display the default character for the currently active codepage, use the CODEPAGE position DEFAULT form of the command. See BIT8COMMANDS for details. As a first example, the following will make a change for all sessions in IVT: CODEPAGE "ISO-8859-5"# Load "Latin Cyrillic" CODEPAGEMOD 0x20 0x0119# Modify SPACE into some random character CODEPAGEMOD 0x30 0x0039# Change all zeroes into nines Note that the second line will make it impossible to display the character zero! You probably want to use this with care :-) You can use F4-$ to gain access to an otherwise undocumented debug-screen, IVT will display the full character set of the current session there, amongst many other details normally meant for the developer of IVT. See also CODEPAGE, BIT8COMMANDS and these escape sequences. See also NATIONALITY. Changes to the codepage are only possible in an IVT.RC file, thus they are not saved into the registry or modifiable in setup.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.11: COLORCUT (Color of selected area during CUT operation)

Page: 95

12.3.11: COLORCUT (Color of selected area during CUT operation) COLORCUT REVERSE COLORCUT ForeGround BackGround [[BRIGHT|NOBRIGHT] BRIGHT|NOBRIGHT] This determines what the screen looks like during a CUT operation. The default is REVERSE, which will reverse the foreground and background colors of the characters on the screen. If you do not have very colourful screens, this is normally OK. When you CUT from a screen with lots of reverse video data already on-screen, it is not always clear what is "select" reverse video and what is "native" reverse video. Also, if you have different colors for different hosts, you may want to select a different CUT color, too. COLORCUT allows you to specify a fixed color. This is used to show the selected area. The ForeGround and BackGround colors must both be between 0 and 7 (see the color table). It is also possible to specify a color by name ("blue", "white", etc). The FIRST BRIGHT/NOBRIGHT can be used to specify the BRIGHT attribute for the foreground color, the SECOND BRIGHT/NOBRIGHT does the same for the background color. You can experiment in the color setup screen to find the nicest setting. See also COLORS and COLORHELP. 12.3.12: COLORREADY (Specify screen colors for ready indicator) COLORREADY ForeGround BackGround [BRIGHT|NOBRIGHT] [BRIGHT|NOBRIGHT] the session prints the prompt (is "ready"), IVT will make the activityindicator for that session the specified color when that session is in the background. When the session is in the foreground, nothing happens. The default color for this indicator is a green background, so the session will show "green" when it is ready! The COLORREADY statement allows you to set any foreground and background color. See the color table for a list of valid colors. You can also change the color from the setup screen. Any modifications made in setup are also saved into the registry. 12.3.13: COLORS (Specify primary screen colors) COLORS ForeGround BackGround [[BRIGHT|NOBRIGHT] BRIGHT|NOBRIGHT] You can use this to specify the default foreground and background colors that IVT uses for the session screens. The old syntax looks like: COLORS GREEN BLACK BRIGHT NOBRIGHT I.e., a foreground color, a background color, an indicator for the brightness of the foreground color and lastly an indicator for the background color. The new syntax allows a more intuitive color syntax: COLORS BRIGHTGREEN BLACK So, simply two colors. The ancient numeric syntax is also still supported, se this color table for details. The setup, help and hypertext help screens have a separate color setup, see the COLORHELP keyword. The FIRST BRIGHT/NOBRIGHT can be used to specify the BRIGHT attribute for the foreground color, the SECOND BRIGHT/NOBRIGHT does the same for the background color. HIGH/NOHIGH accomplish the same thing. See also the discussion on software blinking. The foreground and background colors must be chosen from the color table. You can use the setup screen to change either the default colors (for the help screens, setup screens etc. and future sessions) or just the colors for the current session. It is also possible to temporarily change the default background and foreground colors of the current session from the host. IVT supports its own extension to the ESC[...m command (see here).

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.13: COLORS (Specify primary screen colors)

Page: 96

The ESC[139m command restores the real foreground default, the ESC[149m does the same for the background color. This can be used when you start an application that uses a color scheme that assumes (for example) that you have white characters on a black background (and looks extremely ugly when you have a blue background). Before you start such an application, you could send ESC[137;140m to force white-on-black, when the application finishes you can send ESC[139;149m to restore your normal colors. 12.3.14: COLORSCR (Detection of monochrome/color screen overrule) COLORSCR NO_COLORSCR Treats monochrome screen as color. Monochrome screens cannot display color, they mostly departed this world around 1990 or so, but IVT was around even then... When IVT starts up, it attempts to determine the type of display that is used (color or monochrome). Based on this, it will decide to use colors (or not) in the following places; - Busy-indicators in the status line. The background of these can be red or green on color-screens. - When the capabilities of a terminal are enquired, one of the attributes is color-capability, which is returned appropriately. The setting can be changed (for the current session only) from setup. Some PC's emulate the color attributes in various entertaining ways on monochrome (or greyscale) hardware; some experiments may be in order to determine the best setting. 12.3.15: COLORHELP (Specify screen colors for these help screens) COLORHELP ForeGround BackGround [BRIGHT|NOBRIGHT] [BRIGHT|NOBRIGHT] The default color scheme for the help screens is chosen such that they are most readable (black characters on a white background). For those who insist on having different colors, this statement can be used alter those defaults. The FIRST BRIGHT/NOBRIGHT can be used to specify the BRIGHT attribute for the foreground color, the SECOND BRIGHT/NOBRIGHT does the same for the background color. See also the colors for the links, LINKSELCOL and LINKUNSELCOL. See also COLORS. See the color table for a list of valid colors. 12.3.16: COLORSEARCH (Colors to use for searched text) COLORSEARCH R G B Default: 0 0 0 R G B

255 255 0

When you activate the history pager (scrollback memory), you can use the built-in search commands of IVT to search for strings in the history buffer. Strings that match are highlighted using the colors you specify here. Multiple matches are easily spotted this way. The default is black letters on a bright-yellow background. The color itself is specified as two RGB (Red, Green, Blue) values, one for the foreground and one for the background color of matching search strings. For a description of the color specification, see CURSORCOLOR. This item can be changed in this setup screen, and is also saved in the registry. 12.3.17: COLOR_BLINK (use colors instead of true blinking) COLOR_BLINK {R G B|DEFAULT} NO_COLOR_BLINK {R G B|DEFAULT}

Default: Not used (NO_COLOR_BLINK). This is a local (per session) setting. For a description of the R-G-B color specification, see CURSORCOLOR. Normally, IVT will use true blinking when requested by the host.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.17: COLOR_BLINK (use colors instead of true blinking)

Page: 97

The blink speed can be set using SOFTBLINK. Ancient versions of IVT (and other emulators) that could not do true blinking because the underlying hardware did not support it used to use colors to indicate blinking characters. Some people have come to prefer this over actual blinking, so IVT still allows you to set a color (foreground & background) that will be used for ALL blinking characters. NO_COLOR_BLINK restores normal (true) blinking. COLOR_BLINK DEFAULT DEFAULT does the same. Using colors of course conflicts with blinking, colored characters. To make sure you can distinguish colors caused by blinking from normal character coloring, you can specify RGB values allowing millions of possible colors (instead of just the 16 normal VT220 colors). Also, you can choose to change just the foreground, background or both. The first RGB value indicates the color to use for the foreground. When the DEFAULT keyword is used, the color is unaltered, so whatever the current foreground color of the character is. The second RGB value indicates the color to use for the background. Whe the DEFAULT keyword is used, the color is unaltered, so whatever the current background color is. Another conflict is caused by COLOR_UNDERLINE, which is a similar feature tha uses colors instead of underlining characters (a character can be both underlined AND blinking). Since underlining is more common than blinking, the resulting colors in such cases will be those of the underline. This item can also be changed from this setup screen, and is saved in the registry. The extra checkboxes there can be used to turn the colors for the foreground and background parts on and off. See also CURSORCOLOR and COLOR_UNDERLINE. 12.3.18: COLOR_UNDERLINE (use colors instead of true underlining) COLOR_UNDERLINE {R G B|DEFAULT} NO_COLOR_UNDERLINE {R G B|DEFAULT}

Default: Not used (NO_COLOR_UNDERLINE). This is a local (per session) setting. For a description of the R-G-B color specification, see CURSORCOLOR. Normally, IVT will use true underlining when requested by the host. Ancient versions of IVT (and other emulators) that could not do true underlining because the underlying hardware did not support it used to use colors to indicate underlined characters. Some people have come to prefer this over actual underlines, so IVT still allows you to set a color (foreground & background) that will be used for ALL underlined characters. NO_COLOR_UNDERLINE restores normal (true) underlining mode. COLOR_UNDERLINE DEFAULT DEFAULT does the same. Using colors of course conflicts with underlined, colored characters. To make sure you can distinguish colors caused by underlining from normal character coloring, you can specify RGB values allowing millions of possible colors (instead of just the 16 normal VT220 colors). Also, you can choose to change just the foreground, background or both. The first RGB value indicates the color to use for the foreground. When the DEFAULT keyword is used, the color is unaltered, so whatever the current foreground color of the character is. The second RGB value indicates the color to use for the background. Whe the DEFAULT keyword is used, the color is unaltered, so whatever the current background color is. Another conflict is caused by COLOR_BLINK, which is a similar feature that uses colors instead of true blinking characters (a character can be both underlined AND blinking). Since underlining is more common than blinking, the resulting colors in such cases will be those of the underline. This item can also be changed from this setup screen, and is saved in the registry. The extra checkboxes there can be used to turn the colors for the foreground and background parts on and off. See also CURSORCOLOR and COLOR_BLINK.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.19: COLORVOLATILE (Setup colors of volatile items) 12.3.19: COLORVOLATILE (Setup colors of volatile items) COLORVOLATILE R G B R G B

Page: 98

Default: 0 0 255 0 0 0 For a description of the color specification, see CURSORCOLOR. This sets the color in the setup screens for items marked VOLATILE. Since it is important that the user should have some visual feedback for item in setup that are marked as volatile, the texts belonging to these items are drawn in the specified colors instead of the default dialog colors. When a color is specified as 0 0 0, the default dialog color is used. So the default is bright blue foreground on the default background. There is no interactive setup item for these colors. 12.3.20: COLUMNS (Default number of screen columns) COLUMNS num COLUMNS num% This command has been removed, see WINDOW_SIZE. 12.3.21: CRDIALOG (Use dialog to create sessions) CRDIALOG CRDIALOG CRDIALOG CRDIALOG OLD (Deprecated) MINIMAL MEDIUM MAXIMAL

Default: MEDIUM. This setting determines what the "Create Session" dialog looks like initially Depending on the version of IVT that you use, this will result in a panel with fewer or more options being visible. The default setting is MEDIUM, which hints at the many possibilities without overwhelming the first-time user. Higher settings show more possibilities. While the dialog is being displayed, you can switch between the various modes by using the MORE and LESS buttons. This setting can also be changed from this setup screen. The current setting is also saved into the registry. The "old" setting used to a simple (text-mode) prompt. That possibility is no removed, and automatically changed to MINIMAL if you attempt to use it. Note that IVT_DIALOGSTATE can be used to customize this further. 12.3.22: CURSORBLINK (Blinking cursor yes/no) CURSORBLINK NO_CURSORBLINK The blinking of the cursor can be turned on or off (default is on). The blink speed is determined by the system, it can be changed in the system configuration panel of Windows. This option can be configured for every session, can also be modified in this setup screen and is saved in the registry. The color of the cursor is configurable, see CURSORCOLOR and this setup. The height of the cursor is configurable, see CURSORHI. 12.3.23: CURSORCOLOR (Color of the cursor) CURSORCOLOR R G B R G B

This determines the color of the cursor used by IVT on the session screen. It is specified in RGB values (Red, Green, Blue) for both the foreground and the background colors. Since this makes any color combination possible, it guarantees that the cursor can have a color that is not the same as the standard session screen. Every R, G or B must indicate a numerical value between 0 - 255 inclusive. Zero is off, 255 is brightest. A value of 255 255 255 is bright white, a value of 0 0 0 is black. When IVT has to display the cursor it will compare the background color of th text the cursor is on with the background color of the cursor. If the two are

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.23: CURSORCOLOR (Color of the cursor)

Page: 99

somewhat alike (which would make the cursor badly visible or even invisible), IVT will switch foreground and background colors to make sure the cursor remains visible at all times. The default for this setting is: CURSORCOLOR 255 255 255 0 0 0 Which gives a black (0 0 0) background on a bright white foreground. The height of the cursor is determined by CURSORHI, and is by default the ful height of the font. Blinking is determined by CURSORBLINK. The color can also be changed from this setup screen. There you can use the Windows GUI color picker to find the proper RGB values make a "nice" style cursor. Every session can have its own style for the cursor. The current setup is saved in the registry. 12.3.24: CURSORMODE (Application/normal mode of cursor keys) CURSORMODE normal CURSORMODE application Default: normal. The cursor keys of a VT100 like terminal can be configured in either NORMAL mode or APPLICATION mode. In normal mode, they will emit CSI x, where x is the letter A, B, C or D. CSI, in turn, depends on the 7- or 8-bit mode that the session can operate in. In 7 bit mode, CSI is ESC [, in 8-bit mode it is 0x9B (an ESC character with the upper bit turned on). When the mode is APPLICATION, the keys emit ESC O (capital letter o) followed by the same letter in 7 bit mode, and 0x8F followed by the same letter in 8-bit mode. Yes, it is confusing :-) This setting can also be changed from setup, and is saved in the registry. See also CODEPAGEMOD for a way to change the behaviour of 8-bit commands. 12.3.25: CURSORHI (Height of text-mode cursor) CURSORHI Nr Default: CURSORHI 16 (maximized) The height of the cursor is (carry-over from MS/DOS) specified as a value from 1 - 16 inclusive, and is interpreted as a fraction of the current font height. So, a value of 16 specifies the maximum (same height as the font), a value of 0 is the minimum (1 thin line, forced by IVT). IVT will draw a solid cursor of the resulting height, in the colors specified by CURSORCOLOR. Blinking is controlled through CURSORBLINK. Blink rate is controlled by Windows. When IVT loses focus, it will draw a rectangle around the current position to leave a visual indication of where the cursor is. Every session can have its own style cursor. The setting can also be changed from this setup screen, and is saved in the registry. 12.3.26: FCOL (OLD: Set foreground screen color) FCOL num This command is old-fashioned. Use COLORS instead. See also color swap for side effects of using colors. 12.3.27: FLASH (Action to take for flashing screen) FLASH FLASH|TUNE|BEEP|OFF FLASH WAV name The IVT special command escape sequence ESC<space>f will cause the screen to flash, which is a way to have a silent BELL command (attracting the attention of the user without making a noise). The standard IVT.TIC file also configures this, which implies that Unix commands that use the TERMINFO database (such as the VI editor) will use a visual bell by default. Some users don't like this, and requested a way to is received, IVT will flash the screen by default, but the same actions that

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.27: FLASH (Action to take for flashing screen) are valid for a "normal" bell character can be configured, as well. The TUNE plays a short tune, BEEP emits a short, business-like beep, FLASH flashes the screen (default), and OFF means FLASH commands are ignored.

Page: 10

This Windows version of IVT can also play a sound (.WAV) file when the FLASH command is received. You can specify the pathname of a WAV file or the name of a sound event from the Windows registry. Different sessions can have different files associated with them. The filename can be changed from the setup screen as well. See also the PLAYSOUND function. Also, see the ESC<space>f IVT-only escape sequence. Also see the BELL_ABUSE function to suppress lots of BELL characters. Also, see F3-D for a way of ignoring unwanted output quickly. This setting can be changed from this setup screen. It is also saved into the registry. 12.3.28: FULLSCREEN (What to show in full screen mode) FULLSCREEN [MENUBAR|VSCROLL|STATUS|TABSBAR|NONE],... Default: FULLSCREEN MENUBAR,VSCROLL,STATUS,TABSBAR menu bar, or by using the FULLSCR function. Note that using this keyword does not mean IVT will switch into full screen mode by default - it only describes what the screen will look like. In full screen mode, IVT will maximize the window to use all available space (removing the IVT title bar, Windows taskbar and other screen clutter to give you the maximum possible number of rows and columns on the physical screen. Typing another ALT+Enter (or by using the - optional - menu bar will return to normal window mode). A SCRIPT can also use the FULLSCR function. The FULLSCREEN statement is used to specify what objects should be left on screen in full screen mode. The menu bar (MENUBAR), vertical scroll bar (VSCROLL) and status line (STATUS and TABSBAR are all optional, and can be specified as a comma-separated list of options. Before the option list is processed, all options are turned off, so: FULLSCREEN STATUS,VSCROLL will show the status line and vertical scroll bar in full screen mode and not the menu bar or tabs bar. Note that the full screen settings are independent of the normal settings. The default is to have all objects enabled. NONE leaves nothing. See also GUI_VSPACE and GUI_HSPACE, which also determine what the screen will look like in full screen mode. This setting can also be changed from this setup screen. The current setting is also saved in the registry. 12.3.29: GUI_FONT (Set the screen font for session) GUI_FONT "font description" This command sets the font that IVT uses for the session screens. Any fixed-pitch font can be used, you will get an error when attempting to use a variable-width font. Every session can have its own font. See also, the SIZEFONT, which allows you to specify that the font size must b adjusted when the window is resized, rather than the number of rows and columns. IVT automatically derives double-wide and double-high fonts from the one you specify. There is also some very clever checking to see if the font you have chosen contains decent line drawing characters. IVT needs those characters internally to draw lines and boxes, and the host can use them for the same purpose. When a font does not contain the proper symbols, a program like PuTTY will resort to "poor man's line drawing" where the lines are built from normal dashes, the pipe symbol (|) and a plus sign. IVT will actually study the pixel-pattern of two line-drawing characters in the chosen font to see if they actually are lines. When not, a separate font

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.29: GUI_FONT (Set the screen font for session)

Page: 10

is used for the line-drawing characters only! The substitute font MUST be a scalable True Type font, so IVT can obtain the proper symbols in exactly the right size. When that fails, IVT gives in and uses poor man's line drawing as to "Lucida Console". Change at your own risk. This feature enables IVT to use ANY font and still display all the VT220 characters correctly. The fontdescription is a number of comma-separated clauses of the form KEYWORD=VALUE. The following keywords are valid (case insensitive): - Facename. This must be the font name. The default is "FaceName=Lucida Console". Can be abbreviated to "Face". - Points. This integer specifies the point size of the font and is a more convenient way than specifying a pixel-size (Width and Height below) since points are device-independent and pixels are not. Also, points result in properly scaled characters, while specifying the height and width explicitly can result in elongated or flattened characters - Height. This integer specifies the height in pixels of the font. - Width. This integer specifies the width in pixels of the font. - Italic. Just the word, selects an italic font. - Underlined. Idem. - Weight. This integer must have a value between 0 and 1000. The higher the number, the more bold a font becomes. A value of 400 denotes a standard weight, 700 is "bold", 800 "extra bold" and so on. Values below 400 give "thin" fonts. Your Mileage May Vary according to other parameters. If you don't specify this, it defaults to zero (which means "normal"). - Poorman. This integer must be 1 (on) or 0 (off). When on, poor man line drawing is forced for this font. Normally, you should not need this, since IVT will actually examine the line drawing characters pixel-for-pixel to see if they actually are lines. When either a single or double line is actually not a decent line, and even the substitute font fails, poor man line draw is switched on automatically. The setting can be inspected and changed from this setup screen. - Charset. Can be the STRING "DEFAULT", "ANSI" or "OEM" or else a NUMBER taken from the following table: DEFAULT_CHARSET 1 SYMBOL_CHARSET 2 MAC_CHARSET 77 SHIFTJIS_CHARSET 128 HANGEUL_CHARSET 129 HANGUL_CHARSET 129 GB2312_CHARSET 134 CHINESEBIG5_CHARSET 136 JOHAB_CHARSET 130 GREEK_CHARSET 161 TURKISH_CHARSET 162 VIETNAMESE_CHARSET 163 HEBREW_CHARSET 177 ARABIC_CHARSET 178 BALTIC_CHARSET 186 RUSSIAN_CHARSET 204 THAI_CHARSET 222 EASTEUROPE_CHARSET 238 It defaults to "ANSI". Not all character sets are supported for all fonts. Your Mileage May Vary. See also CODEPAGE and NATIONALITY. The built-in default for this is: GUI_FONT "Facename=Lucida Console,Points=9" The font can also be changed from the "Setup" menu bar. A dialog will appear that allows you to choose from all the available fonts. Such a selection is of course saved to the registry when you choose "Save setup". If you want to add a manually selected font to your IVT.RC setup, you can view the description of the manually selected font in this setup screen. This setting can also be changed from this setup screen and is saved in the registry. See also SIZEFONT and GUI_FONT_QUALITY.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.30: GUI_FONT_QUALITY (Set font quality for all fonts)

Page: 10

12.3.30: GUI_FONT_QUALITY (Set font quality for all fonts) GUI_FONT_QUALITY DEFAULT|ANTIALIASED|NON-ANTIALIASED| CLEARTYPE|DRAFT|PROOF The default setting is DEFAULT. You can specify any single word of out of the list above. IVT will use this to instruct the Windows fontmapper to choose a particular font quality for use in the main IVT window. The default behaviour of the fon mapper will usually be optimized for your environment, but if you have extrem fonts or hardware you may want to tweak this... From the actual Microsoft documentation: - DEFAULT Appearance of the font does not matter. - ANTIALIASED Windows NT 4.0 and later: Font is antialiased, or smoothed, if the font supports it and the size of the font is not too small or too large. - NONANTIALIASED Font is never antialiased, that is, font smoothing is not done. - CLEARTYPE Windows XP: If set, text is rendered (when possible) using ClearType antialiasing method. - DRAFT Appearance of the font is less important than when the PROOF value is used. For GDI raster fonts, scaling is enabled, which means that more font sizes are available, but the quality may be lower. Bold, italic, underline and strikeout fonts are synthesized, if necessary. - PROOF Character quality of the font is more important than exact matching of the logical-font attributes. For GDI raster fonts, scaling is disabled and the font closest in size is chosen. Although the chosen font size may not be mapped exactly when PROOF is used, the quality of the font is high and there is no distortion of appearance. Bold, italic, underline, and strikeout fonts are synthesized, if necessary. See also GUI_FONT. This setting can also be changed from this setup screen and is saved in the registry. 12.3.31: GUI_RGB (set RGB values for ANSI colors) GUI_RGB Indexnumber Red Green Blue This version of IVT has full control over the RGB (red, green, blue) values for every chosen color. By default, IVT chooses the 16 ANSI colors to be the same as Windows does, but GUI_RGB can be used to modify those. The Indexnumber must be a value between 0 to 15 inclusive, and denotes the color number to change. The Red, Green and Blue range from 0 to 255 inclusive The built-in defaults are: 0: 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: Black Blue Green Cyan Red Pink Brown White Grey Bright Bright Bright Bright Bright Yellow Bright 000 00128 0 1280 0 128128 128 00 128 0128 128 1280 192 192192 128128128 00255 0 2550 0 255255 255 00 255 0255 255 2550 255 255255

Blue Green Cyan Red Pink White

There is also a dialog available to pick the colors with a nice color chooser interface, by clicking "Redefine ANSI colors" in the color setup screen. New in version 19.0 of IVT is that these values are per session, and the GUI_RGB statement can be used in a script to alter only the values for that particular session. Altered colors are also saved in the registry.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.32: GUI_SMOOTH (smooth scrolling) 12.3.32: GUI_SMOOTH (smooth scrolling) GUI_SMOOTH ms [Pixels]

Page: 10

Smooth scrolling is a graphics trick where lines scroll smoothly pixel for pixel instead of a line-at-a-time. You can set the delay in milliseconds and the distance in pixels for every partial scroll operation. The default for ms is 0, which turns it off. A value of 1 gives the "fastest" smooth scroll, since this will enable smooth scrolling without delaying per-pixel. Higher values will sleep the specified number of milliseconds. A value of 10 gives a very stately form of display. This feature can be very CPU intensive - Your Mileage May Vary. By increasing the number of Pixels per partial-scroll operation, fewer steps are required to scroll a single line, thus increasing the total speed. Low values of Pixels are silently adjusted to 1, high values are silently adjusted to half of the current font height. The default (when omitted) is 1. The fastest setting is thus GUI_SMOOTH 1 1000, which soft-scrolls half lines without sleeping. Active WINDOWS are temporarily removed from the display before smooth-scroll is performed, since those are meant to be stationary. This feature is mainly intended to increase the VTTEST score of IVT by a further point, since few people will (I think) actually want to use this by default. It is, however, a standard feature of a VT220 terminal. The host can control this setting using CSI ? 4 h/l, which will set the delay to 10 Ms and leaves the Pixels value unchanged. It can also be changed from this setup screen, and is saved in the registry. 12.3.33: GUI_SUBSTITUTE_FONT (for line drawing characters) GUI_SUBSTITUTE_FONT "font description" The default for this is "Facename=Lucida Console". As explained in the section on GUI_FONT, there exist fonts that do not contain the line-drawing symbols required by IVT. If you choose such a font (Terminal and Fixedsys being notorious ones), older versions of IVT would display the wrong characters in the places where line drawing was needed. Version 16.2c of IVT introduces a clever trick - those line drawing character are selected from a decent, scalable font like Lucida, scaled to the exact same size as the chosen font. IVT automatically determines the necessity for this by examining the actual shapes of the symbols in the user-selected font. Since "Lucida Console" may not be available everywhere, it is not hardwired into IVT but can be changed using the GUI_SUBSTITUTE_FONT statement. You should know what you are doing when you change this, and the font you specify MUST be a scalable, decent font. It is used for both the screen and printer font, when you select a font for the printer that does not contain proper line-drawing characters. It is NOT saved in the registry, and can NOT be changed from setup. If you want to change the default you have to edit the IVT.RC setup file and make sure you use proper syntax for a font. 12.3.34: GUI_TRANSPARENCY (Set window transparency) GUI_TRANSPARENCY percentage This feature only works on Windows 2000 or higher. Transparency of a window means that you can "see through" the IVT window and see the underlying windows and the desktop. The percentage must lie between zero and 100. A value of 0 turns this feature off. Higher values mean higher transparency, a value of 99 means IVT is almost invisible, a value of 1 means it is almost solid (normal). Turning transparency on means your computer has to calculate the color values for every pixel from all underlying windows and desktop, which gives a very noticable drop in performance when IVT is scrolling lots of text in a large window, so only turn this on when you have enough horsepower available. Thanks to Roald Ribe for suggesting the idea and supplying example code.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.35: GUI_VSCROLL (enable vertical scroll bar) 12.3.35: GUI_VSCROLL (enable vertical scroll bar) GUI_VSCROLL NO_GUI_VSCROLL Default: show scroll bar.

Page: 10

The scroll back history is accessed through this scroll bar. Simply clicking the appropriate parts is the equivalent of keyboard commands such as ALT-PgUp and ALT-CursorUp. These keyboard commands still work, of course. For people who do not like screen clutter, the scrollbar can be turned off (using NO_GUI_VSCROLL). It can also be turned on and off from this setup panel. See also NO_MENUBAR and NO_STATUS to remove more screen clutter. The vertical scroll bar is a global feature - you either have it for all sessions or for none. 12.3.36: GUI_VSPACE/HSPACE (extra border space) GUI_VSPACE Pixels GUI_HSPACE Pixels This controls the extra amount of space between the window borders and the text in the window. Horizontal space is added to the top and bottom of the window, vertical space at the left and right edges. The default setting is 2 pixels for the vertical border and zero for the horizontal. A zero setting disables any extra border. In that case, when you maximize the window, the leftmost characters will touch the physical edge of the screen. Depending on your color setup, this can lead to black characters touching the black edge of the screen, creating a very ugly effect. It can also be changed from this setup screen. In older versions of IVT, this setting was global (all sessions and screens). In IVT 19.0 of January 2005, this was modified to become a per-session setting, so you can choose these values as appropriate for a given combinatio of colors, fonts and window size. The values are saved in the registry. See also GUI_FONT and GUI_VSCROLL. This is an important feature, others are prev/next 12.3.37: IVT_DIALOGSTATE (Configure dialogs and menus) IVT_DIALOGSTATE name ENABLE IVT_DIALOGSTATE name DISABLE IVT_DIALOGSTATE name SKIP This command allows you to selectively disable or omit all parts of the IVT menus and dialogs. Every menu item, every button, textbox, radio button and every checkbox has an internal, unique name. These names are also used for the translation of the IVT user interface into another national language. This name can be used to configure the visibility state of such items as well. The state of an item can be normal (ENABLE), greyed out (DISABLE) or omitted entirely (SKIP). The rules are as follows: - If you disable or skip a menu bar item (which, when clicked, opens a menu), the entire thing disappears from the menu bar (no difference between DISABL and SKIP here). - When a single menu entry is DISABLEd, it is always greyed out and cannot be used by the user, - When a single menu entry is set to SKIP, it disappears from the menu. - All other items can be DISABLEd to become greyed out or SKIPped to be made to disappear. - You cannot enable an item that IVT itself has disabled, only disabling a normally enabled item, or skipping an enabled or disabled item is allowed. - There exist programs that re-enable dialog items messages to such objects, in an attempt to break the disablement. This will not work, as IVT will every item and will ignore unexpected operations by sending clever windows the security imposed by check the dialog state of on objects it has disabled

Since this allows you to make arbitrary elements of the dialog unavailable,

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.37: IVT_DIALOGSTATE (Configure dialogs and menus)

Page: 10

you can make IVT totally unusable by disabling OK buttons all over the place, or omitting essential parts of the interface. So be careful. It is MEANT to be used to allow users only access to those parts of the interface that you think they actually need, without allowing them to change arbitrary settings which will disrupt normal use of applications by IVT. A nice example of this is to allow the user to change the printer used by IVT (which requires access to setup) without allowing access to Kerberos setup which may break secure authentication or have an adverse affect on security. The IVT_DIALOGSTATE can be used to disable the "Kerberos" button in the setup panel by doing: IVT_DIALOGSTATE SETUP_KERBEROS DISABLE which will make this button permanently greyed out. Within a dialog, you can disable or omit any item, as long as you know the name. This name can be obtained in various ways: - Click on the item with the right-hand mouse button while keeping the SHIFT key on the keyboard down. A pop-up will appear with the internal IVT name of that item. - For some unknown reason, this does currently disabled (grey). In that key, click on the question mark on click on the item you want to know not always work for items that are case, you can try to keep down the SHIFT the top right corner of the dialog, then the name of.

- If that does not get you the name (for example because the item is currentl invisible) you will have to read the example_lang file in the lang directory. That file translates all the items and uses the same names. There is no warning or error when you misspell the name, as not all of the names are used by all versions of IVT. For example, Kerberos dialog items are not known by versions of IVT without Kerberos support compiled in. Unknown items are simply ignored. See also security. 12.3.38: LEAVE_COPY_SELECTION (Leave selected area visible) LEAVE_COPY_SELECTION NO_LEAVE_COPY_SELECTION Default: NO_LEAVE_COPY_SELECTION. Copying and pasting in IVT is, by default, different from most other applications. Applications like X-windows and PuTTY will allow you to select an area with the mouse, and when you release the mouse button, will leave the selected area visible on screen. I think that is wrong - the only thing the application can do with the selected area is to copy it to the clipboard - you cannot cut from an SSH or TELNET application, and there is nothing else to do with selected text. Permanently changing the contents of the screen is, IMHO, simply wrong. So, by default, IVT will remove the selection from the screen and do the COPY operation as soon as you release the mouse. However, many people are so used to the way other applications handle mouse and the selected area disappears. Even worse, some think IVT does something wrong :-) The new MOUSE_SELECTION command can be used to configure IVT to use the more common PuTTY/XTERM selection method. So, the LEAVE_COPY_SELECTION setting will cause IVT to do what others do, mor or less. The selection is left on-screen, but still removed as soon as the contents of the screen is updated. You can select from the scroll back buffer and scroll around, and the selection is left intact. You can switch to other sessions, and the selection will be left intact. Multiple sessions can have their own selections visible. This allows you to use the mouse as a sort of highlighter. A single short click in the session window will also remove any current selection. So will starting a new COPY operation. BTW: Extending the current selection in IVT is done not by double/triple clicking, but by clicking the right-hand button while the left is KEPT DOWN. I find this gives a much more reliable way of selecting words, since it does not depend on the timing of the clicks. It also allows a finer degree of control over extending the selection. But see the new MOUSE_SELECTION command to alter this.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.38: LEAVE_COPY_SELECTION (Leave selected area visible)

Page: 10

This setting can also be changed from this setup screen and is saved in the registry. NOTE: This field is one that can be configured using the installation wizard that i automatically started when you install IVT. Because it would give conflicts when you change this both in the configuration file created by the wizard and in interactive setup, this item is disabled in interactive setup. If you want to change this item, re-run the installation wizard: Menubar->setup->Re-run initial setup script The wizard has as the first button a "Do not use wizard" feature. If you choose that, all items in interactive setup will be enabled again (and you must configure all the necessary options there and save the setup, OR edit th IVT.RC file manually). 12.3.39: LINK[UN]SELCOL (Color for (un)selected links) LINKSELCOL ForeGround BackGround [[BRIGHT|NOBRIGHT] BRIGHT|NOBRIGHT] LINKUNSELCOL ForeGround BackGround [[BRIGHT|NOBRIGHT] BRIGHT|NOBRIGHT] These command determines the way these manual pages look on screen. There are two ways to display a hypertext link such as this: - When it is not currently selected. - When it is currently selected (to be followed when you press return), or returned-to when you use BACKSPACE or the right-hand mouse button to return from a link. You can experiment with the settings using this setup screen. The colors can be specified in words (black, white, etc), or as numbers. The valid values are in this color table. 12.3.40: MENUBAR (Enable/disable menu bars) MENUBAR NO_MENUBAR Default: MENUBAR (on). Menu bars provide an easy way to access the more powerful features of IVT. The rules are: - They can be turned on or off using the MENUBAR/NO_MENUBAR command. This setting can also be changed from this setup screen. The setting is per session. - An F1 can be used to give context sensitive help on any menu-item. A right-mouse click on any item does the same. For more information, see the separate chapter on menu bars. 12.3.41: MOUSE_SELECTION (Select words/phrases with mouse) MOUSE_SELECTION IVT MOUSE_SELECTION PUTTY This is a late addition (Sun Jun 24 2007) to IVT, version 21.1a. Traditionally, IVT uses the mouse in a unique way to select words and phrases from the screen (see here for details). This 2-button technique is timing-independent, and also leaves the screen the way the host has intended it. PuTTY, and X-terminals, use a double-click, triple-click and even 4-click technique that depends on timing, a steady hand (if you move the mouse too much during the triple-click it is seen as a drag-select) and has to leave th selection visibly on screen (which alters the screen, leaving an image that the host did not put there, which is arguably incorrect). Lastly, because you continuously keep at least one button down during the IVT buffers (letter), to abort the select (ESC), switch between block-select and line-select (F1), print selection (F2) and so on. PuTTY cannot do this becaus as soon as you release the mouse as part of a double-click, the selection process ends and any keystrokes are destined for the host. However, many users simply never find out all these advantages. They simply assume double-clicking will work.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.41: MOUSE_SELECTION (Select words/phrases with mouse)

Page: 10

To accomodate those users, IVT now can emulate the Xterm and PuTTY behaviour. Setting the mode to PUTTY also enables LEAVE_COPY_SELECTION. The initial install procedure asks the user his preference. It uses the Windows double-click speed timer, and extends the selection the way PuTTY would if you click fast enough. During double-clicking, the mouse can stray one line and/or character up, down, right or left and it will not be seen as dragging by IVT. When you use simple drag-select, all the special IVT keyboard commands during the select still work. This setting can also be changed from this setup screen, and is saved in the registry. NOTE: This field is one that can be configured using the installation wizard that i automatically started when you install IVT. Because it would give conflicts when you change this both in the configuration file created by the wizard and in interactive setup, this item is disabled in interactive setup. If you want to change this item, re-run the installation wizard: Menubar->setup->Re-run initial setup script The wizard has as the first button a "Do not use wizard" feature. If you choose that, all items in interactive setup will be enabled again (and you must configure all the necessary options there and save the setup, OR edit th IVT.RC file manually). 12.3.42: NATIONALITY (Select national replacements) NATIONALITY name Default: US ASCII. A VT220 terminal can operate in 7-bit mode, in which case some special diacritical characters cannot be displayed. Traditionally, a VT220 can select that some characters from the standard US ASCII set are to be replaced by a set of national special characters. This makes these original characters unusable. It concerns the #, @, [, \, ], ^, _, {, | and } characters. Apparently, early DEC engineers thought these characters would not be used much. Later, much better alternatives to getting diacriticals displayed properly came along, such as CODEPAGE and CODEPAGEMOD. However, some old applications (and especially things running on VMS) demand that this be implemented. For example, a Swedish application will send a '{' character and expect an A-angstrom to be displayed. Therefore, as a late addition (October 2003) IVT adds support for national replacement characters. This is selected by specifying the proper nationality in name, which can be one of: US ASCII British Danish Dutch Finnish French French Canadian German Italian Norwegian Spanish Swedish Swiss Example: NATIONALITY "FRENCH CANADIAN" The string is case insensitive. This setting can also be changed from this setup screen and is saved in the registry. 12.3.43: ROWS (Default number of screen lines) ROWS num ROWS num% This command has been removed, see WINDOW_SIZE. Default number of screen lines will be num. See also COLUMNS. This is used for all sessions, setup- and help screens.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.43: ROWS (Default number of screen lines)

Page: 10

IVT sets a default of 25. When a percentage is used, IVT will calculate the required number of rows as percentage of the physical screen size (based on font and such). The screen size for the current session can also be changed from the setup screen. This will allow you to page through all the supplied sizes (or the default ones). See also WINDOW_SIZE. If your monitor and eyesight are up to it, you can set any number of lines and columns in IVT. Remember to set the proper environment variables in Unix (usually LINES and COLUMNS) otherwise Unix won't know the size of your screen However, if you login using the TELNET protocol, the screen size information is transmitted automatically to the host. See also COLUMNS. 12.3.44: SCO_ANSI (enable/disable SCO ANSI mode) SCO_ANSI [KEYBOARD | NO_KEYBOARD] NO_SCO_ANSI The default is NO_SCO_ANSI. SCO_ANSI enables SCO (Santa Cruz Operation) ANSI compatibility of IVT. Basically, this will make IVT recognize a number of additional escape sequences, an additional way of drawing lines and boxes on screen and a few extra color settings commands. See SCO ANSI compatibility for details. Optionally, the keyboard can be reprogrammed by using the KEYBOARD option, which is set to NO_KEYBOARD by default (IVT will emit the normal VT220 keyboard sequences). There is little harm in having SCO_ANSI on by default (though IVT's default i to have NO_SCO_ANSI to preserve VT220 compatibility), as long as you leave th KEYBOARD setting off. The keyboard map of IVT is much simpler in SCO ANSI mode, function keys and special keys all emit ESC [ <character>, where the last character is a simple alphanumeric. This differs seriously from a VT220. The SCO_ANSI setting is per session, can be changed from this setup screen an is saved in the registry. 12.3.45: SCREENSAVE (activate screensaver after N minutes) SCREENSAVE number-of-minutes SCREENSAVE 0 Default: 0 (no screen save). Blank screen (well - almost) after the specified number of minutes. A value of 0 will disable the screen saver. Also, when you have reduced the size of the IVT window to only a few lines and columns, IVT won't bother with the screensaver. This command is really not very useful on modern PC's which have their own wa of saving screens, but is retained anyway. IVT will show a black screen that is empty, save for two lines. The first lin says "IVT Screen Saver - n minutes idle" (the number of idle minutes are counted, starting with the value of number-of-minutes). The line below shows the status indicator which allows you to monitor the activity on all sessions. These lines wander about on the screen to prevent burn-in (which was a problem on old CRT monitors, mostly extinct now). It is also possible to write your own script that will be called 10 times a second for as long as the screensaver is active. See here for an example. The output of this script will replace the default IVT display. The screen saver will terminate (and return to the session) when one of the following events occurs: - Type any key on the keyboard (including the SHIFT, CTRL and ALT keys!). The most efficient way is probably to press a lone CTRL key, which makes sure that nothing is transmitted to the host. However, a normal key can also be used and is also not transmitted. - Activity on the current session. Any byte received from the host will cause the normal display to return. During screen-saving, all background sessions continue as usual - all output on all sessions is processed and the activity indicator is updated. - A mouse-click (any button).

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.45: SCREENSAVE (activate screensaver after N minutes) - Your custom SCREENSAVE script returns a non-zero value.

Page: 10

When you have a LOCKTIMER active which is set to a longer time than the SCREENSAVE value, the keyboard lock will be activated when its timer expires. However, this is NOT done when the screen-saver is activated from within a non-session screen (like these help-pages, the setup-pages etc.). The reason is that if you return from the screen-saver with a keyboard-lock into a non-session, there is no status-line to indicate the keyboard LOCK and this could (did) confuse people. The screen saver timeout can be set from setup. This is not per session, of course, but for IVT as a whole. Lastly, you can manually activate the screen-saver using SHIFT+ALT+s (remembe to release the keys quickly, or otherwise you'll exit from the saver immediately again because the SHIFT or ALT key is down :-) 12.3.46: SCRMODE (Define commands to change screen size) This command is the old-fashioned form of WINDOW_SIZE. SCRMODE was short for "screen mode", which was a carryover from the MS/DOS days... 12.3.47: SHOWNEWS (show news screen for new version) SHOWNEWS NO_SHOWNEWS When you upgrade IVT on your computer and start it for the first time, IVT detects the fact and shows the F4-N news screen. This lists the new features of the upgraded version so a user can take advantage of them. However, users of an application that happens to use IVT as part of the infrastructure are not interested in the technical details. So if you deploy IVT to non-technical users, a NO_SHOWNEWS will prevent the unnecessary confusion. The default is SHOWNEWS, and there is no corresponding setup-screen entry for this, you have to configure it in an IVT.RC file. See also NO_TIPS. 12.3.48: SIZE4ALL (Resize all sessions simultaneously) SIZE4ALL NO_SIZE4ALL Default setting is NO_SIZE4ALL. The default behaviour of IVT is to maintain sizes and window positions for al sessions independently. When you have a default WINDOW_SIZE of 100%, and all sessions are created and kept that way, you would not even notice that. When you have multiple sessions (remember IVT runs all sessions in a SINGLE window), and resize some of them, paging through the sessions will make IVT jump from place to place, restoring position and size for every session. Some users find this annoying and would expect a resize to apply to all sessions, not just the foreground one. This can be achieved using an ONRESIZE script and the "Propagate settings" function, but an easier way is to set thi SIZE4ALL option. Resizing a session will resize all background sessions, too. This only works if the applications running in those sessions can handle such a resize, so Your Mileage May Vary when you use this. Also, this feature will automatically skip sessions that have the GUI_RESIZE feature set to NO. This setting can also be changed frm this setup screen, and is saved in the registry. NOTE: This field is one that can be configured using the installation wizard that i automatically started when you install IVT. Because it would give conflicts when you change this both in the configuration file created by the wizard and in interactive setup, this item is disabled in interactive setup. If you want to change this item, re-run the installation wizard: Menubar->setup->Re-run initial setup script The wizard has as the first button a "Do not use wizard" feature. If you choose that, all items in interactive setup will be enabled again (and you must configure all the necessary options there and save the setup, OR edit th

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.49: SIZEFONT (size font when window is resized) IVT.RC file manually). 12.3.49: SIZEFONT (size font when window is resized) SIZEFONT SIZEFONT FULL_POINTS_ONLY NO_SIZEFONT SIZEFONT NEVER Default: NO_SIZEFONT.

Page: 11

Short summary: - SIZEFONT: Sizes the font to any size, creating very low and wide, or high and narrow as required to fill the given window (can be ugly). The resulting number of rows and columns always stays the same. - SIZEFONT FULL_POINTS_ONLY: sizes the font, but will use characters of full point sizes only. This prevents the uglyness, forcing IVT to adjust the window size to make it fit, or to use an empty border in full screen mode. The font will still stretch when a VT220 command is received to switch to 132 or 80 columns. - NO_SIZEFONT: Font is not resized (number of rows and characters is changed when the window is resized). However, when the VT220 terminal is switched into 132-wide screen, IVT will behave like a real VT220 and switch to a narrow font if the current window size requires it. - SIZEFONT NEVER: Never change the selected font, not even for the 132-wide screen (adjusts the window size instead). For a more detailed description, read on... SIZEFONT will make IVT fix the number of rows and columns and will adjust the font size instead (the default is to change the number of rows & columns) Even when you maximize the window, or go FULLSCREEN, the number of rows and columns stays the same. When you start with a relatively small screen (say 25 rows, 80 columns and th with very, very large characters. When you resize only one dimension, you'll get an elongated or squished font, this can be prevented by using the FULL_POINTS_ONLY option. In that case, IVT will only select fonts that are expressed in a full point size, so the width and the height of the charatcers are in proportion, even if it means chosing different window size than selected by the user. The default is, of course, to change the number of rows and columns when you resize the window and keep the font the same. This feature works best when you choose a TrueType base font, as they can be scaled to any required size. Other fonts are rounded off by Windows to the nearest match, and this may result in an adjusted window size (the window border will "snap back" to force a certain minimum size). The "full points" option prevents this to some degree, but it is best to choose a TrueType font NOTE: There is a subtle difference between NO_SIZEFONT and SIZEFONT NEVER. The default NO_SIZEFONT is ignored when a VT220 command is used to switch explicitly between 80 and 132 columns (the only 2 official screen widths of a VT220 terminal). The 132-columns is implemented just like a real VT220 by switching the font to a narrow one. Explicitly sizing to 80 columns keeps the current font and switches the IVT window to 80 characters wide. The SIZEFONT NEVER setting forces IVT to ALWAYS adjust the window size and never to adjust the font. This can be used if you dislike the narrow font or suffer from side-effects of the switch. Note that this does not break VT220 compatibility one way or the other: IVT ends up in 132 or 80 columns regardless. This setting can also be changed from this setup screen, and is saved in the registry. See also GUI_FONT and GUI_SUBSTITUTE_FONT. See also ONRESIZE, GUI_RESIZE and SIZE4ALL. 12.3.50: SOFTBLINK (enables/disables software blinking) SOFTBLINK Blinkrate(blink rate in milliseconds) SOFTBLINK 0(software blink turned off) To simulate blink, IVT simply alternates between two displays; the first displays the normal screen, the second one omits all the blinking characters. Alternating this 2 or 3 times a second results in blinking. Expensive, but effective. The BlinkRate parameter specifies the blinking speed. The default

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.50: SOFTBLINK (enables/disables software blinking)

Page: 11

is 400 milliseconds, valid values are between 100 (blinks ten times a second) and 3000 milliseconds (once every 3 seconds). When software blinking is not viable on your system, it can be disabled with SOFTBLINK 0. In this case, IVT will change the background color of the text so you at least get a visible difference. I guess the "expensiveness" stopped being a problem around 1995 or so, any modern PC will not have any problem with this. The setting can be altered from this setup screen, and is saved into the registry. 12.3.51: SPEED (Set default screen refresh/scroll speed) SPEED SPEED SPEED SPEED SPEED TURBO NORMAL SLOW SLOWER CRAWL

Default: TURBO. This (sort of) sets the screen scrolling speed. The current speed is also shown in this setup screen. TURBO means that the contents of the internal IVT screen-buffer is only shown on the actual screen after the end of every network packet (which can contain many lines). In NORMAL mode, the screen is synchronized after every line of output. This makes NORMAL mode scroll much smoother, but TURBO requires less overhead and is therefore faster (but possibly jerky to the eye). - SLOW means that IVT waits a little after every line. - SLOWER means that IVT waits a little after every line and a few Ms after every character, too. This is meant to simulate an old 9600 baud serial connection and can be used to view ASCII movies, search the web for some classic examples of this. - CRAWL means IVT waits a little longer after every character. The slow software watching enormous shows up modes can be used to view output very carefully. When you write that builds complex text-mode screens, much can be learned from a screen appear in slow or crawl mode - it gives you a sense of the amount of work it takes to build such a screen. Inefficient output because you see the same patterns drawn several times, etc.

The speed can also be changed by typing ALT+s (slower) and ALT+Q (quicker). 12.3.52: SPLASHTIME (Set maximum display time for splash screen) SPLASHTIME millisecs The Windows splash screen is displayed for 5 seconds by default. This window is created right after IVT starts up. Some users complained this is too long, so this SPLASHTIME can be used to reduce (or increase) the amount of time the window stays on the screen. IVT has to read the configuration files to find this command, these files might be encrypted, might be on slow network connections, etc., so the logo might be displayed for a while longer but IVT will do its best to limit the time to what you specify. IVT enforces a maximum of 10000 milliseconds. The splash screen gets removed automatically when you start typing data into a dialog, such as the prompt for a hostname or a password during start-up. If you want to disable the splash screen altogether, use the -B command line option. An OPTIONS statement can also use the -B flag. 12.3.53: STATBORDERS (Show separators in GUI status line) STATBORDERS NO_STATBORDERS The status line can be displayed in 2 styles: with little divider separator lines (borders), or without. The default is to display them. Use NO_STATBORDERS to turn them off. Depending on personal taste and the version of windows, the borders of the status bar differ in style and appearance. There is also an option to the STATUS command to change this.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.54: STATMIDDLE (What to display in middle of status line) You can also change this setting in this setup screen. The current setting is saved in the registry.

Page: 11

12.3.54: STATMIDDLE (What to display in middle of status line) STATMIDDLE STATMIDDLE STATMIDDLE STATMIDDLE STATMIDDLE STATMIDDLE OFF CLOCK DATETIME CURSORPOS MOUSEPOS ELAPSED

Default: CLOCK. This determines what gets displayed in the middle of the status line. Choices are: OFF CLOCK DATETIME CURSORPOS MOUSEPOS ELAPSED Nothing Current Current Current Current Elapsed time (hours:minutes, 24 hour clock) date and time (YYYY/MM/DD hours:minutes, 24 hour clock) cursor position mouse cursor position time since session was created

The current setting can be changed by clicking on the relevant part of the status line or from this setup screen. all the time and there is no Windows taskbar visible). See also CLOCKSKEW. NOTE: This field is one that can be configured using the installation wizard that i automatically started when you install IVT. Because it would give conflicts when you change this both in the configuration file created by the wizard and in interactive setup, this item is disabled in interactive setup. If you want to change this item, re-run the installation wizard: Menubar->setup->Re-run initial setup script The wizard has as the first button a "Do not use wizard" feature. If you choose that, all items in interactive setup will be enabled again (and you must configure all the necessary options there and save the setup, OR edit th IVT.RC file manually). 12.3.55: STATUS (Enable/Disable the status line). STATUS NO_STATUS STATUS BORDERS STATUS NO_BORDERS STATUS [OLD|NEW] (Deprecated) This command turnes the status bar on or off and determines the style. This version of IVT no longer supports the old text-mode status, but only the GUI one with icons and so on. So the old/new setting is ignored. Using the NO_BORDERS option creates the status bar without the little divider lines on it between the fields (which are on by default). The BORDERS keyword can be used to force these dividers on. See also STATBORDERS.

The status bar displays this information. 12.3.56: STATUSCLICKS (Enable/disable mouse on status line) STATUSCLICKS NO_STATUSCLICKS Normally, you can use the mouse to click on the various fields of the status line. When you use the NO_STATUSCLICKS option, this feature is disabled. This prevents the user from altering the text, switching sessions, or enterin the help-system (by right-hand clicks). Tooltips are also suppressed in this mode. See also the secure option. There is no way to change this setting from a setup-screen.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.57: TABSBAR (Enable the TABBED interface) 12.3.57: TABSBAR (Enable the TABBED interface) TABSBAR [Option],... NO_TABSBAR Options: CLOSE_ICON NO_CLOSE_ICON CONFIRM_CLOSE NO_CONFIRM_CLOSE USER_HOST HOST_USER HOST USER SIZEADJUST Adjust Default: TABSBAR NO_CLOSE_ICON,USER_HOST,CONFIRM_CLOSE,SIZEADJUST 0

Page: 11

Many users have asked for a true tabbed interface in IVT. This was finally added in February 2009. The TABSBAR allows yet another, intuititive way to switch between sessions in IVT. It is on by default. Use NO_TABSBAR to turn i off. The options are: - CLOSE_ICON (or NO_CLOSE_ICON) Determines whether the tab gets a CLOSE icon (a cross). When clicked, it will close the session. NO_CLOSE_ICON will omit the icon. On by default. - CONFIRM_CLOSE (or NO_CONFIRM_CLOSE). When the CLOSE_ICON is enabled and used, clicking it will normally ask confirmation from the user before actually killing the session. Use the NO_CONFIRM_CLOSE option to have IVT close it wihout asking. - SIZEADJUST n Artificially extends or reduces the size of the tabs vertically. This will create a bit of unused space below the actual tab, or take room away from the tab itself (and cause clipping). Various versions of windows make the tabs appear differently, and this allows you to have some control over the actual appearance. See also GUI_HSPACE and GUI_VSPACE. - USER_HOST, HOST_USER, HOST, USER Determines the text that appears in the tab. A script can always overrule this by using the SetTabText function. The default is user@host, but when you have few hosts, or many users, you can opt for the hostname followed by the user name, or just the host, or just the user name. A script can also use the SetTabText() function. Once it has done this, the text supplied that way overrules any default. By setting the empty string, IV will display the default again. When you use application groups, every group gets its own logical tabs bar. When you switch between sessions in different groups, the tabs are updated accordingly. A script can use the SetTabIcon() function to set a different icon, in which case it will also have to use ONTABICON to indicate what should happen when clicked. is saved in the registry. 12.3.58: TITLEBAR (Set Window title) TITLEBAR TITLEBAR TITLEBAR TITLEBAR TITLEBAR "A fixed string of text" COMMENT HOSTNAME SESSION "Private session string" DEFAULT

This command sets the contents of the Windows title bar of IVT. The default is "IVT VT220 Freeware". If you choose the first form, the specified text will replace the default for all sessions. If you choose COMMENT, the title bar will show the comment field from the status line (and will change as you switch between sessions).

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.58: TITLEBAR (Set Window title) line to be displayed (and will change as you switch sessions). If you choose DEFAULT, the global default string will be restored.

Page: 11

If you use SESSION "String", a private string is displayed for the current session only (separate from the comment in the status line). This form can, currently, only be used in a script. To revert back to the normal title bar, set the SESSION string to an empty string, like so: TITLEBAR SESSION "" You can also change the title bar settings from this windows setup screen. Also see XTERM set window title command. This allows you to set the title from the host. 12.3.59: TOOLTIPS (Show tooltips for status bar) TOOLTIPS InitDelay Duration NO_TOOLTIPS When you hover the mouse over the fields on the status bar, a small window explaining the purpose of the field or icon will display after the mouse is over the field for more than InitDelay milliseconds. Nothing will happen if you move the mouse out of the field before that time. When the tip appears, it will disappear after Duration milliseconds. The defaults for this are 300 for InitDelay and 3000 for Duration. Any mouse click will also kill the tooltip window. Use NO_TOOLTIPS to turn the tips off. You can also change the settings in this setup screen, where you can use a value of zero for either field to turn tooltips off. The current settings are saved in the registry. 12.3.60: VERTICAL_LINE (colored, vertical lines on session screen) VERTICAL_LINE CharacterPos Width [RELATIVE] R G B This causes colored, vertical lines to appear just after the character pos specified in CharacterPos. The idea is to have a sort of "margin" line as on a typewriter that indicates a certain position. For example, if you want to limit your lines to a maximum of 80 characters, and you want a visual indication of column 80 on your session screen (which usually is much larger than 80 positions) you could specify: VERTICAL_LINE 80 1 240 240 240 This draws a line just after character 80, 1 pixel wide, with an RGB (Red, Green, Blue) value of 240,240,240 - a very light grey. So this gives a thin, barely visible grey line to indicate the position (assuming the background color of the session is bright white, see the RELATIVE keyword below). Depending on the color of your screen and personal preference, you can choose a thicker line or different colors. The maximum thickness IVT will allow is 15 pixels. There can be as many lines as you want, of different colors and thickness. Every line runs the entire height of the screen. It tries to be between two characters on the screen. Drawing the lines will only affect pixels that have the default background color, so characters like X, W and _ that usually occupy that position (depends on the font) are not mutilated by the line (as used to happen in older versions of IVT). It also means that if you use full-screen color applications such as Midnight Commander, the lines will not be drawn in places where the screen has a color that is not the default background (in older versions of IVT, a light-gray line on a white screen is just visible, but the same grey stands out in an ugly fashion when the background is made blue by Midnight Commander). Another problem with these lines occurs when you have sessions which do not have the default color scheme. For example, if your normal background color is bright white, but some sessions have a black background, the barely visibl light-grey looks almost bright white on a dark screen (i.e. ugly). This is why the RELATIVE keyword was added in version 18.1 of IVT. When this option is used, IVT will interpret the RGB color values as offsets from the current background color. IVT will darken the color values when the background is bright, and brighten it when the background is dark. When you remain relatively unobtrusive, so:

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.60: VERTICAL_LINE (colored, vertical lines on session screen) VERTICAL_LINE 80 1 RELATIVE 15 15 15 is probably the best.

Page: 11

The lines appear only on the session screen. When there are dialogs on the screen, or POPUPs, they are (temporarily) removed. There is currently no way to define these lines through setup dialogs, you have to define them in an IVT.RC file. These lines can be disabled and enabled through the 'Extra' menu on the session menu bar, and through the VLINES script function. This is handy if you don't want the lines displayed all of the time. Currently, there is only ONE set of lines possible, so all sessions have the same line(s) in the same position(s), or none at all. This is an important feature, others are prev/next 12.3.61: WINDOW_SIZE (Set the size of the IVT session window) This command is an alias for the deprecated SCRMODE command. WINDOW_SIZE Rows[%] Columns[%] [DEFAULT] WINDOW_SIZE MAXIMIZED [DEFAULT] WINDOW_SIZE FULLSCREEN [DEFAULT] Set the IVT window size These are the rules: - Every IVT session has between sessions, IVT This behaviour can be for the current session to the indicated size. it own session size and position. As you switch will change the window size and position accordingly. changed using SIZE4ALL.

- The number of rows and columns can be given as an absolute number, or as a percentage of the physical screen. For "screen, read "primary monitor" if you have multiple-monitor system. The absolute and percentage forms can be mixed, so you can specify: WINDOW_SIZE 90% 80 This will occupy 90% of the screen in the vertical, with a fixed length of 80 columns. IVT will automatically take things such as task bars, title bar, GUI_HSPACE and GUI_VSPACE into account when calculating the resulting number of rows and columns. - When you use the DEFAULT option, the specified size becomes the default size for all sessions. Without the DEFAULT, the entry is merely listed in the list box in setup that allows the user to choose from a predefined list of window sizes. However, if you use WINDOWPOS LAST_KNOWN (the default) the size and positio of the IVT window is stored whenever it it manually changed, and THAT size will be the default during startup. If you want a script that determines th size and position, make sure you change the WINDOWPOS setting accordingly o use the NO_REGISTRY setting. - When the WINDOW_SIZE statement is executed as part of a SCRIPT, the DEFAULT keyword cannot be used and the session size is changed immediately. If you want to change the default settings from a script, prepend it with the standard GLOBAL keyword. - When MAXIMIZED is used, the window (for the session) is maximized. This is the same as specifying "100% 100%", though technically a maximized window is slightly different (no window frame). - When FULLSCREEN is used, the session screen will be full screen (no title bar, no window frame, all other windows and taskbars obscured, optional menu bar, tab bar, scroll bar and status line, see FULLSCREEN). Examples: WINDOW_SIZE WINDOW_SIZE WINDOW_SIZE WINDOW_SIZE MAXIMIZED DEFAULT 90% 90% DEFAULT 40 120# 40 rows, 120 columns 80% 80# 80% of screen vertically, 80 columns.

When you specify 100%, the entire width or height of the physical screen is used. For example: WINDOW_SIZE 100% 100% DEFAULT will instruct IVT to use the entire physical screen by default. All setup and help screens will also be this size. When you use: WINDOW_SIZE 50% 80%

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.3: Look & feel: Look 12.3.61: WINDOW_SIZE (Set the size of the IVT session window)

Page: 11

then 50% of the vertical size of the screen (rows) and 80% of the horizontal size will be used. For the actual number of resulting rows and columns, see the setup screen. When you change the size of the font, IVT will recalculate the resulting number of rows and columns and resize the window accordingly. The resulting numbers can be found in the IVT variables $ROWS and $COLS. See also SIZEFONT and SIZE4ALL, though. This method of working works best with a host that understands variable terminal sizes. The TELNET protocol over WinSock in IVT supports this. This means that IVT will communicate the resulting number of rows and columns to the remote host automatically, so any full-screen program will know the size is a VERY nice thing to have. Other session protocols (such as RLOGIN) do not always support this (so you need to set the Unix $LINES and $COLUMNS environment variables manually or using IVT scripting). See also FULLSCREEN and ONRESIZE. See also WINDOWPOS (especially the LAST_KNOWN option there). Note: One systems with multiple monitors, IVT will try to keep on the monitor that the user drags it to. The maximum window size is the combination of all monitors, you cannot drag the window larger than actually fits on your monitors. The "Extra" menu has an entry to make IVT go full screen or to stretch itself to the maximum size determined by the combination of all monitors. Windows itself prevents an application from running full screen (or maximized on more than one monitor, so if you maximize IVT, it will always do so on the primary monitor. When you use WINDOW_SIZE with a percentage, it is interpreted as a percentage of the primary monitor. You can size IVT to a maximum that is larger than the single monitor by dragging the borders. Note that many factors influence the size of the window and the resulting number of rows and columns: - The chosen WINDOW_SIZE; - The chosen GUI_FONT and the font actually selected by Windows; - The user resizing the window (dragging, maximizing); - Choosing FULLSCREEN (using ALT+Enter); - Scripts using resize commands; - The host can send resize commands; - The setting of SIZEFONT; - The setting of SIZE4ALL; - The setting of GUI_RESIZE; - The setting of WINDOWPOS LAST_KNOWN. - The system resizing the work area (resizing the taskbar, for example); - Switching monitors, or changing monitor settings such as resolution. - Changing the number of monitors or their settings. In other words: Your Mileage May Vary. 12.4.1: ADDRESSBOOK_ONLY (Limit hosts to connect to) ADDRESSBOOK_ONLY NO_ADDRESSBOOK_ONLY The HOSTLIST command can be used to specify an address book that is normally available to the user by using the down-arrow button in the "Create Session" dialog. It offers a list box where the user can pick a host (or several hosts simultaneously!) to connect to. The list also normally contains the hosts typed manually. If you use ADDRESSBOOK_ONLY, the create session dialog is bypassed and the user ends up being able to choose a host from the address book ONLY. This offers a little extra security, but also allows IVT to be used by users who don't know or care about hosts and users, and just want to connect to som application with a minimum of hassle. Since the HOSTLIST command allows you to add descriptive comments, this can reduce the work for the user to get connected to a single double click on the proper entry in the list. This can be used as an alternative to having many shortcuts on the desktop, one for each host. Note that the address book dialog allows multiple selections in one go, to create a group of sessions at once. The default for this is NO_ADDRESSBOOK_ONLY. There is no setup item to change this dynamically, since it is only useful in combination with a bunch of HOSTLIST commands in your IVT.RC file.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.1: ADDRESSBOOK_ONLY (Limit hosts to connect to)

Page: 11

The manually added entries in the list (typed by the user in the "Create Session" dialog) are suppressed when this option is used. If you want to limit the user to just the hosts in the address book, you will also have to disable the "edit private addres book" script, which allows user to alter the address book without having to use a text editor. This script is made available through an INCLUDE of "hostlist.ivt" in the main ivt.rc file. See also IVT_DIALOGSTATE, for more ways of limiting users. See also secure mode. 12.4.2: AUTOCOMPLETE (Behaviour of the host name entry field) AUTOCOMPLETE [MatchMode] [ListMode] NO_AUTOCOMPLETE MatchMode can be: MATCH_BEGIN MATCH_ANY OFF ListMode can be: ALLHOSTS TYPEDHOSTS Default: AUTOCOMPLETE MATCH_ANY ALLHOSTS This setting controls the behaviour of the the auto-completion of host names typed into he main "Create session" dialog of IVT. By default, all hosts from your adress book, and the last MAXTYPEDHOSTS of previously typed names are used for auto-completion. Partial matches will be displayed and you can pick one of them, or just type name followed by a TAB or ENTER to create a new name. When you type are When you you type use MATCH_BEGIN, only names matching at the beginning of the data yo selected. use MATCH_ANY, IVT performs a substring match (when the characters are part of a host name, it is selected for auto-complete).

When you use ALLHOSTS, IVT selects all known names from the address book, and all saved names it has stored. When you use TYPEDHOSTS, only previously typed names are considered. When you use NO_AUTOCOMPLETE or AUTOCOMPLETE OFF, the feature is turned off and the result is that you have the normal text-field where every name you will have tp be typed in full. When you select a previously typed name from the drop-down box and type the DELETE key, that name is deleted from the list. This feature is intended to to replace the more complex HOSTLIST command and the address book editor for users who only use a few hosts. The address book feature is accessible through the button to the right of the host name field. It allows multiple-selection, filtering, grouping and so on, but this may be a bit overkill for simple installations. This setting can also be changed from this setup screen and is saved into the registry. 12.4.3: AUTOLOG (Generate session log files) AUTOLOG LINES|ALL|OFF Options: TIMESTAMP_ACTION (NO_)TIMESTAMP (NO_)STATUS (NO_)HEADER FILETYPE ASK|AUTO|AUTOQUIET "path expression" [Options...] Time stamp user actions. Time stamp every line yes/no. Show as icon in status line yes/no. Add a header line to log file yes/no. Set type of generated file.

AUTOLOG facilitates the automatic logging of sessions to a file. Older versions of IVT could fake this with a printer-to-file and a script to create such a printer automatically, but that meant giving up the normal printer for the session. The AUTOLOG feature does not have this restriction. The path expression value determines where the session log files will be created. The string can refer to IVT special variables, such as $HOSTNAME, $USER and $IVTDIR. Also, a "%d" can be made part of the name, and IVT will substitute this with unique number. For example: AUTOLOG ALL AUTO "$IVTDIR/SessLogs/${HOSTNAME}_%d.txt" Will create the session logs in the SessLogs subdirectory below the IVT installation directory. Any directory in the path that does not exist yet wil

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.3: AUTOLOG (Generate session log files)

Page: 11

be created automatically. IVT will create files that have the name of the hos as a base, a unique sequence number appended, and .txt as extension. evaluate to the legal variable name "HOSTNAME_" (which is usually empty). Also note that IVT will evaluate the string when the session is created, NOT when the statement is read, so the hostname will be the name of the host you are actually connecting to. Also note that this gives you to possibility to have a PRECONNECT script that allows a script to determine the names of the log files to use. See the examples at the end of this section. The sequence number is necessary to differentiate between sessions to the sam host, since IVT can have such sessions simultaneously! If you force IVT to us the same log file for several sessions, the output from the sessions will be mixed, with no (easy) indication of which is which. is assumed to be a drive letter) are changed into underscores, since "myhost:80" is not a valid FILE name in Windows, but it is a valid HOST name in IVT. The other parameters are: - ALL Every byte is sent to the session log file as soon as it is received on the session. This means all escape sequences, editing and so on is copied to the log file immediately. There is no concept of "lines" in this mode and so no time stamping of lines is possible. - OFF Nothing is logged. Logging can be enabled manually at any moment from the session log setup screen. That screen also allows you to temporarily suspen logging, and inspect the current state of logging. - LINES When the LINES mode is chosen IVT will only send data to the session log file when the cursor leaves a line in a normal way (scrolling). This means that all your editing and backspaces won't show up in the file, and output from screen-oriented programs won't usually show either (such programs use absolute cursor positioning commands to go from one line to the other and that does not trigger a log action). - The TIMESTAMP option is only valid when the LINES mode is chosen. Every line in the log file will be time stamped in the (fixed) format YYYY/MM/DD HH:MM:SS (24-hour clock). You can also specify NO_TIMESTAMP to explicitly suppress the time. This can also be changed in this setup screen. - TIMESTAMP_ACTION In this mode not every line of output is given a time stamp, but only the FIRST and LAST line to appear after something that appears to be a user command. So, when you hit ENTER, IVT will log the time, then wait for outpu past very quickly receives an unnecessary and almost identical time stamp o every line, while still allowing you to see what happened, and when. - For (NO_)HEADER, see AUTOLOG_HEADER. Can also be changed in this setup screen. - The STATUS option (default) will show an icon in the status line to indicat that logging is active. Clicking the icon allows the user to change the settings. Use NO_STATUS to suppress the icon. Can also be changed in this setup screen. Omitting the icon and using the AUTOQUIET option gives a form of "stealth logging". - The FILETYPE determines the type of file IVT will generate when the mode is LINES (when ALL is chosen IVT will assume no structure or encoding and just copies bytes to the log). The valid choices are: FILETYPE=UTF-8: Encoded Unicode file (default). FILETYPE=ANSI: Plain ANSI text file. FILETYPE=UNICODE: Little endian, Unicode (16-bits per character). UTF-8 is an efficient encoding of all possible Unicode characters, and make sure that the log is readable with any utf-8 aware editor and that all special characters will show up properly in the log. ANSI depends on your current locale (and is compatible with what older versions of IVT used to do) and can surely be read by any editor or viewer but special Unicode characters may be translated wrongly. correctly) and may be the more efficient choice when ALL your characters ar

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.3: AUTOLOG (Generate session log files) non-latin (like Chinese).

Page: 11

NOTE: IVT quietly sets an UTF-8 file type when your current codepage is set to UTF-8 and you are logging "All bytes", so the received UTF-8 data will be recognized properly by external viewers. Next, you can choose how the file used for logging session data is determined There are 3 basic possibilities: - ASK For every session you create, a popup will appear where you can specify if and how the session is to be logged. The defaults are the ones specified in the IVT.RC file. You can change the type of logging, or suppress the logging, or choose a different log file for the current session. Note that if you use CREATEGRP statements to create a group of sessions quickly (or use the 'repeat' field in the 'Create Session' panel), IVT is forced to show this popup for every session. It will wait for you to switch to every session before presenting you with this popup, so the session cannot create the log file, log in, and initialise the session until you switch to it. In other words, when you regularly create groups of sessions, you'll want to use one of the AUTO settings below. - AUTO IVT automatically chooses a log file for the session. The "%d" feature in the name can be used to get sequence numbers in the file name, or see the examples below for even more flexible logging. The resulting file name is displayed on the screen with a message that indicates that logging is active. You can also inspect the current state in the 'Log settings' panel in setup. - AUTOQUIET Same as AUTO, but no message is issued, IVT quietly enables logging. The current status of the logging still can be inspected in the setup screen. Examples: AUTOLOG ALL AUTO "$IVTDIR/SessLogs/${HOSTNAME}_%d.txt" This will create a numbered log file named after the host for every session you create. Since logging each and every file may be more than what you require, consider adding this line to your IVT.RC file: AUTOLOG OFF AUTO "$IVTDIR/SessLogs/${HOSTNAME}_%d.txt" This disables logging by default. If you want to enable logging for a specifi session, use F3 (setup) from the "Create Session" dialog, and change the logging type to "All received bytes" or "Completed lines" in the log settings panel. After you "Accept" those settings, they will apply to the current session only. The AUTO setting will result in an message when the session is established. If simple numbered files for every host do not satisfy your requirements for flexibility, you will have to write a PRECONNECT script that tunes the AUTOLOG statement for every session. For example, say you want separate directories below the SessLogs, named after the day the sessions were created so you can find a record of your sessions by date (which also allows for easier deletion of old log files). This would look like this (and this script is actually included in the IVT distribution): ######################################################################## # Automatically create a session log for every session. # Creates a sub-directory with the current date as the name. # Enable by adding he following line to the end of your IVT.RC file: # INCLUDE "$IVTDIR/ivt/autolog.ivt" Script STARTUP # Change this to the name of your logging directory and type of logging. GSET AutologBaseDir = "$IVT_APPDATA/IvtSessionLogs" GSET AutologType = "ALL"# Or "LINES", see doc on "AUTOLOG" END ######################################################################## ONCONNECT * DoAutolog Script DoAutolog LOCAL TodayDir # Note: AUTOLOG will automatically create all missing direcories # in the pathname. TodayDir = Concat("$AutologBaseDir/",TIME("DATE",TIME(),"%Y-%m-%d")) AUTOLOG $AutologType AUTO "$TodayDir/${HOSTNAME}_%d.txt" END

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.3: AUTOLOG (Generate session log files)

Page: 12

######################################################################## ######################################################################## Careful study of this script will show you how flexible scripting in IVT can make things. The supplied script can serve as a starting point for your own. You can also inspect and change the settings from this setup screen. The current settings are saved in the registry. Also, note that a script can use an AUTOLOG statement while the session is closed immediately, and after the new settings are applied (to the current session only, of course), a new log is opened. This allows you to monitor traffic on a session, and start a new log when some specific condition occurs At any one time, only ONE log file can be active on a given session. Clicking on the icon in the status line serves as a shortcut to the AUTOLOG setup. You can use the Suspend and Resume buttons there to temporarily stop logging to the file (and resume by clicking on Resume). The icon will show a red cross through it to indicate logging is suspended. Suspending and resuming can also be triggered by using an IVTFUNCTION from a script. See also AUTOLOG_HEADER. 12.4.4: AUTOLOG_HEADER (Generate header in AUTOLOG file) AUTOLOG_HEADER NO_AUTOLOG_HEADER Default: AUTOLOG_HEADER. When you use the AUTOLOG statement to generate automatic logs of sessions, IVT will, by default, generate a simple header in the file that shows the nam of the host and start time of the log, followed by a simple horizontal line. If, for whatever reason, you want an exact log without these extraneous lines use NO_AUTOLOG_HEADER. This setting is per session and so can be overruled for individual sessions. It can be changed from this setup screen and is saved in the registry. It can also be set as an option to the AUTOLOG statement. 12.4.5: BACKSPACE (Code generated by BACKSPACE key) BACKSPACE DELETE BACKSPACE BACKSPACE Determines what gets transmitted to the host when you press the BACKSPACE key Default is BACKSPACE, but some hosts expect a DEL character to correct typos. The DEV-VT220 profile sets this, as VMS hosts tyically want a DEL instead of a backspace. This can also be changed from setup. See also KEYMACRO to reprogram keys. 12.4.6: BELL (Action to take when BELL character is received) BELL BELL BELL BELL BELL BELL FLASH TUNE BEEP BUZZ WAV "filename" OFF

A host can transmit a ASCII 7 (Bell) character to IVT. This setting determine what happens in that case. The default TUNE plays a short tune, BEEP emits a short, business-like beep, FLASH flashes the screen (silent bell), and OFF means BELL characters are about half a second, similar to what MSN messenger does when it buzzes you. When IVT is full screen or maximized, it shakes the text inside the window. When IVT runs in a normal window, it shakes the window on the desktop. NOTE: On Windows 7, microsoft has removed the function to drive the speaker on the motherboard used by TUNE and BEEP. Windows will use the soundcard to produce a sound, but that can be muted, and will not sound like intended. See also BELL_ABUSE, which provides a way to suppress unwanted and/or

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.6: BELL (Action to take when BELL character is received)

Page: 12

unexpected noise. When you use the BUZZ setting, a single bell takes so long that you will have to tune the ABUSE values to detect abuse. To confuse matters a bit, the actual action taken by the FLASH setting of this BELL command can be set using the FLASH command... IVT can also play a sound (.WAV) file when the bell is supposed to ring. You can specify the path name of a WAV file or the name of a sound event from the Windows registry. Different sessions can have different files associated with them. The filename can be changed from setup as well. The file name can be a (double-quoted) string with embedded variable names, s one might write: BELL WAV "$ENV_WINDIR/media/chimes.wav" When a BELL is received while the previous sound is still playing, playback i aborted and the new play is started. See also the PLAYSOUND function. Also, see the ESC<space>f IVT-only escape sequence (for flash). Also, see the ESC<space>n IVT-only escape sequence (to play WAV files). Also, see F3-D for a way of ignoring unwanted output quickly. See also BELL_ABUSE to prevent the bell from being overloaded. See also FLASHWINDOW. This setting can be changed from this setup dialog. It is also saved into the registry. 12.4.7: BELL_ABUSE (Prevent BELL noise overload) BELL_ABUSE nr_of_bells interval silence NO_BELL_ABUSE This feature suppresses processing of the BELL (beep) character when too many Even experienced users sometimes send a lot of binary data to a terminal (lik CAT-ing a binary file). Every bell character in there makes noise AND takes a long time to process (ringing a bell takes time). The nr_of_bells and interval parameters specify the maximum amount of noise that IVT is allowed to make. The defaults for these are 5 and 2, so if more than 5 bells are received within a 2 second interval, the bell is turned off. The silence parameter specifies how many seconds must pass without a bell character being received to re-enable the bell (default 5 seconds). By specifying NO_BELL_ABUSE, the protection is turned off and all received bell characters are processed normally. The protection is for all forms of bells - .WAV files and flash-screens included. The settings are per session, which implies that IVT can produce more noise then specified when several sessions decide to produce noise which is just below the abuse limit (10 sessions doing 1 bell a second still produce 10 bells per second in total, indefinitely). The setting can be changed for the current session in this setup screen, which can be reached from the "More VT220 setup" screen. The current settings can be saved in the registry. 12.4.8: BIND (Bind a SCRIPT to a key) This command is deprecated. See KEYMACRO instead. BIND key script [params]... BIND_ASYNC key script [params]... BIND_SYNC key script [params]... Bind a SCRIPT called script to a key named key. For a list of valid key names, see programming keys. Every time the key is pressed afterwards, the corresponding script is executed. When you use the BIND command, the script is started asynchronously when a BIND_SYNC is used, a synchronous call is made, see here for more details. The older BIND command is a synonym for BIND_ASYNC. See also MOUSE_KEY, which allows you to bind scripts to mouse actions. See also KEYBOARDMOD for simple (fast) translations. See also KEYNAME, to assign simple strings to standard VT220 keys. See also "Learn mode & Keyboard macros", which allows very powerful things to happen when keys are pressed.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.8: BIND (Bind a SCRIPT to a key) See also KEYMACRO, which is a more powerful version of BIND.

Page: 12

Scripts are a major feature of IVT, they can be used to do almost anything. It requires its own chapter to explain it. Also see the F4-X screen. 12.4.9: CAPSBUG (CAPS + SHIFT behaviour) CAPSBUG NO_CAPSBUG Default: CAPSBUG. This setting determines what happens when you have CAPSLOCK active and use the shift key. In my humble opinion, CAPSLOCK should mean that CAPITALS are LOCKED. However, as far back as 1980, MS/DOS got this wrong - when you combin CAPSLOCK and SHIFT it generates LOWER case characters. For years, IVT corrected this bug by making sure that it generated upper-case only. However, since the bug has been around for so long, many people consider it a feature, so upon special request I have added this CAPSBUG feature and even made it the default setting to emulate the bug. I personally have the CAPSLOCK setting turned to "Ignore", so CAPS is turned off anyway. CAPSBUG will cause CAPS+SHIFT to generate lower case. It can also be changed from this setup screen. The current setting is saved in the registry. This is an important feature, others are prev/next 12.4.10: CAPSLOCK (Set mode for CAPS lock key) CAPSLOCK CAPSLOCK SESSION NO_CAPSLOCK Default: CAPSLOCK. Enable/disable (NO_CAPSLOCK) the CAPS lock key. This is a very nice feature. Disabling the CAPSLOCK key means that the key (and corresponding light) will be turned off as soon as you turn it on (presumably by accident). The upshot is that you have to use SHIFT to get capitals. Caps Lock is not very useful when using a Unix host, and this will prevent you from accidentally "shouting" at Unix. The "SESSION" addition will make IVT track the state of the CAPSLOCK key per session. When you switch between sessions, the state is saved and restored as appropriate. When new sessions are created, they inherit the current state of the CAPS key. Note that this setting is per session, too, so one session can have CAPS disabled, another can be restored to its private setting whenever you switch to it, a third can leave CAPS alone... Upon special request, a final possibility is offered by the CAPSBUG setting. It can also be changed (for the current session only) from setup. 12.4.11: CLICK (keyboard click on/off) CLICK NO_CLICK Default: NO_CLICK. Turn key click on (or NO_CLICK for off). Makes a bothersome noise whenever a key is typed. NO_CLICK is the default, you probably don't want to change this Supported because a VT220 has it. It is even supported from setup (for the current session only). 12.4.12: COPY_STRICT (Strict or fuzzy COPY mode) COPY_STRICT NO_COPY_STRICT Default: NO_COPY_STRICT. When you do a COPY operation (with the mouse or keyboard), IVT can operate in either LINE or BLOCK mode (see CUTMODE). Toggling between the two is done by typing F1 during the COPY operation.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.12: COPY_STRICT (Strict or fuzzy COPY mode)

Page: 12

In strict BLOCK mode, IVT will always add newline characters at the end of th block selection, even when you select entire lines from beginning to end and some lines that occupy 2 physical lines on screen are really only one line. In LINE selection mode, IVT will join such wrapped lines, so pasting produces a single line. NO_COPY_STRICT (also known as fuzzy mode) will lift this restriction somewhat select them entirely in block selection mode. Also, IVT will use a slightly broader view on what "wrapping" is, exactly. The upshot is that copy/paste works more intuitively, which is why NO_COPY_STRICT is the default mode. If you want a more predictable block-selection, set it to COPY_STRICT. This setting can also be changed from this setup-screen. The current setting is saved in the registry. See also CUTMODE and, of course, Cutting & Pasting. 12.4.13: CUTMODE (Line or Block CUT-mode) CUTMODE BLOCK CUTMODE LINE Default: CUTMODE BLOCK. See mode for an explanation of these modes. The default for this mode can be changed using the setup screen. During a CUT (either keyboard or mouse driven), the mode can be toggled with the F1 key. See also COPY_STRICT. 12.4.14: DEADKEYS (Enable/disable dead keys) DEADKEYS NO_DEADKEYS This feature was a mistake and has been replaced by INPUT_LANGUAGE. 12.4.15: EMACS (Set EMACS keyboard mode) EMACS NO_EMACS Default: NO_EMACS. Some EMACS users insist on being able to type things like ALT-m and then expect IVT to send "ESC-m" to the host. When ALT-SHIFT-m is typed, it should send "ESC-M", of course. Furthermore, CTRL-S and CTRL-Q have to be passed to the host unaltered (rathe than being used for local flow control, part of the TELNET protocol). So, when IVT runs in EMACS mode, all left-ALT key combinations are treated as EMACS meta-keys. When the key used in combination with the left-ALT is a normal character, it is combined with ESC and sent to the host. When TELNET sessions are initiated, IVT will NOT negotiate local flow control and this implies that CTRL-s and CTRL-q are not considered special by IVT. As a consequence of this, many built-in IVT keyboard commands are disabled (ALT-P for paste, ALT-S for slower and so on). See here for a complete list. The setting can be changed from this setup screen (for the current session only) and is saved into the registry. 12.4.16: EXPLICIT_EXIT (IVT has to be terminated explicitly) EXPLICIT_EXIT NO_EXPLICIT_EXIT Default: EXPLICIT_EXIT. Normally, IVT will exit when the last session terminates (normally when you log out from your last session). When RECONNECT is in effect, sessions will not disappear when you log off, but IVT will re-establish the connection. In that case, you have to use ALT+F4 to force IVT to disconnect the session. See also RETAIN_SESSIONS, which does not cause a reconnect but leaves the

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.16: EXPLICIT_EXIT (IVT has to be terminated explicitly)

Page: 12

session in a "zombie" state (with an optional reconnect to the same or a different host). When EXPLICIT_EXIT is in effect, the behaviour is a little of both. Normal sessions will disappear when you log off, except the last one. This will prevent IVT from exiting. If you want to stop IVT, you either have to use ALT+F4 on the last session, click "Exit ivt" on the menu bar or click on the close button of Windows. Or, hit ESC in the "Create session" dialog. IVT will essentially perform a restart when EXPLICIT_EXIT is in effect. The initial login screen is displayed and you are prompted for a host name. When the autologin was used initially, it will be used again. This setting can also be changed from this setup screen. It is also saved in the registry. 12.4.17: F1F4 (Reverse meaning of F1-F4 and CTRL+F1 - CTRL+F4) F1F4 F1F5 NO_F1F4 Default: NO_F1F4. Reverse F1-F4 with CTRL+F1 to CTRL+F4 (Also NO_F1F4). F1F5 is an alias for F1F4 for historical reasons. Normally, F1-F4 perform internal IVT functions such as hold screen (F1), prin screen (F2), setup (F3) and help (F4). A VT220 also has four function keys called PF1 - PF4, which are missing on a PC keyboard. Therefore, IVT maps CTRL+F1 to CTRL+F4 to these keys. This may inconvenience users who use applications that make heavy use of PF1 - PF4 (Oracle SQL*Forms and AIX 'smitty' are a good examples of this). These applications are usually full-screen style, so they in turn do not need functions such as hold-screen and print-screen. For this reason, you can use F1F4 to swap the PF1 - PF4 keys with the F1 - F4 keys (so you will have to use CTRL+F2 to invoke the IVT print screen function). The PF1 - PF4 keys are also mapped to the top row of the numeric keypad (NUMLOCK to minus key) using the NUMERICF1F4 keyword (default setting). The setting for the current session can also be changed from this setup screen and is saved in the registry.

FOREIGN_ALT_NUMERIC NO_FOREIGN_ALT_NUMERIC Default: FOREIGN_ALT_NUMERIC. Version 22 of IVT introduces UTF-8 and IME (International Method Editor) to support display and entering of international characters. This partial rewrit work only when the proper combination is typed on foreign (non-American) styl keyboards. However, users were so used to typing the keys in their American positions that it felt like a real handicap when those combinations no longer worked due to this change. Therefore, this FOREIGN_ALT_NUMERIC setting can be used to force IVT to recognize the American-style ALT-0 to ALT-9 keystrokes when used on a foreign keyboard. It ONLY does this for those 10 keys, and should not ever cause problems, but because it might cause unexpected behaviour on REALLY foreign keyboards, this feature can be disabled. If you experience strangeness when typing ALT key-combinations, you might try to turn this off. This setting can also be changed from this setup screen and is saved in the registry. 12.4.19: GUI_CLOSE (Disable Windows close button) GUI_CLOSE NO_GUI_CLOSE When NO_GUI_CLOSE is specified, users are prohibited from forcibly closing IV sessions. The close button (X on the title bar) will be greyed-out, the syste menu "Close" option will be greyed out, the ALT-F4 key is disabled. Lastly, the "Close session" and "Kill all sessions, exit" entries on the

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.19: GUI_CLOSE (Disable Windows close button) "Sessions" menu of the menu bar are disabled.

Page: 12

This means that users can only exit IVT by cleanly logging off all sessions. Use this when the users use an application on the host that needs to be be prevented in such a case. See also EXPLICIT_EXIT and secure mode. See also IVT_DIALOGSTATE to disable parts of the interface of IVT. This setting cannot be changed in setup, is not saved in the registry and is applied as soon as IVT is initialised. There is no way to "unprotect" IVT once started in protected mode. In other words, when you add a NO_GUI_CLOSE command to your IVT.RC file, all sessions have to be exited cleanly before IVT can terminate. Note that this may leave you with no other alternative tha to forcibly kill IVT from the Windows task manager. For example, when you use IVT to connect to a serial modem port, it is unwise to have this protection on, since such a device cannot disconnect. When the application on the host misbehaves and does not allow you to log off, you will have to kill IVT (whic also kills all other IVT sessions you have). Finally, the host can still receive forced terminations when users turn their PC off, or disconnect the network cable. Also, an IVT script can use the ENDSESSION statement to force a disconnect under script control. 12.4.20: GUI_COPYSPEED (Scroll speed during COPY) GUI_COPYSPEED lines-per-second Default: GUI_COPY_SPEED 4. New in IVT 16.3a is the more Windows-like way of copying text to the clipboard. Older versions were unable to copy more than a single screen full, new versions will automatically scroll through the history data when the cursor reaches the top or bottom of the screen (standard Windows behaviour). The speed with which the data scrolls is determined by this GUI_COPYSPEED setting. For every pixel that the mouse moves beyond the sensitive point, IVT starts scrolling the indicated number of lines per second. Depending on the number of pixels that you have at the top and bottom of the screen, you may want to set this value higher or lower. If you press SHIFT during the scroll-operation, the speed will be increased b a factor of five. See also GUI_HSPACE to create extra room at the top and bottom of the window, and FULLSCREEN to determine the objects on screen when IVT operates in FULLSCREEN mode. See also MOUSE_SCROLL_FACTOR. This setting can also be changed from this setup screen. It is also saved in the registry. 12.4.21: GUI_HIDEMOUSE (hide mouse pointer while typing) GUI_HIDEMOUSE NO_GUI_HIDEMOUSE Default: GUI_HIDEMOUSE. IVT can remove the mouse pointer from the IVT window during typing. This makes sure that the pointer-image does not hide or interfere with the typing itself. The mouse is re-enabled as soon as it is moved or used in any way. The mouse is NOT hidden when a (clickable) dialog or IVT menu is visible. Hidden by default. Can also be changed from this setup screen. The current setting is saved in the registry. 12.4.22: GUI_RESIZE (allow resize of session) GUI_RESIZE NO_GUI_RESIZE Default: GUI_RESIZE. When NO_GUI_RESIZE is specified, the session cannot be resized by means of the maximize/restore button or by dragging the borders of the window. The host can still send a resize command, and a script can control the size, but the user cannot (easily).

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.22: GUI_RESIZE (allow resize of session)

Page: 12

You can, however, still choose a different size within setup and have IVT resize to a predefined size. Also, since this is "just an option", it can be set with this setup screen and can thus be turned off by a user that insists (but see IVT_DIALOGSTATE to disable this). See also SIZEFONT, which will cause the number of rows and columns to stay the same and resize the font when the user resizes the window. The setting is per session, so you can use it in a script to force a specific size for a specific session. It is also saved in the registry. See also ONRESIZE scripts. They can track (and/or undo) size changes. See also SIZE4ALL. 12.4.23: GUI_ONTOP (Force window on top) GUI_ONTOP NO_GUI_ONTOP This statement forces the IVT window to be "always on top" of all the other windows. The default for this is, of course, NO_GUI_ONTOP. It can be changed from this setup screen, too, and is saved in the registry. size, it becomes very hard to use any other application. If you want to lock users in a single application environment, also check out secure mode and GUI_CLOSE. Another nice feature is IVT_DIALOGSTATE that allows you to disable arbitrary bits of the IVT interface. The statement can also be used to force IVT to the foreground by issuing the following commands in a script: GUI_ONTOP NO_GUI_ONTOP The first forces IVT to the front, the second turns the feature off but leaves the IVT windows visible. This is handy when some important condition is discovered that requires immediate user attention. See also FLASHWINDOW. 12.4.24: INPUT_LANGUAGE (Keyboard input language) INPUT_LANGUAGE default INPUT_LANGUAGE languagename Default: IVT_LANGUAGE default Older versions of IVT used to have a DEADKEYS setting that allowed you to ignore dead keys which are used on international keyboards to type characters with accents. Since I am Dutch, I frequently use such keyboards that do not produce a " when it is typed, but combine it with the next character to an accented character. Very annoying when editing scripts and source code. Normally you would change the input language (and set it to American), but I also frequently need the Dutch setting in other programs. That is why the DEADKEYS setting was introduced: IVT would always produce the correct character, even when it was actually receiving accented characters from the Windows keyboard driver. IVT went through a lot of trouble to strip those accents off again. When I developed the UTF-8 code, I found that the Dutch accents are only one easy form of special keyboard input: typing traditional Chinese involves many keystrokes to produce a single character, and my DEADKEY code failed in dealing with this, So, DEADKEYS is gone and replaced by INPUT_LANGUAGE. This new setting does not try to change the code generated by the keyboard, but allows you to change the Windows keyboard setting for IVT to any of the installed languages on your system. The list can be changed using the languag tool bar, and switching input languages is normally also done using the language icon in the Windows toolbar. Adding languages results in a list of keyboards supported by your system. The names can be shown in IVT setup (Keyboard/font, input language), My system normally shows "United states (international)" and "United states". The international setting produces the accented characters. Those names can now be used as arguments to the INPUT_LANGUAGE command: INPUT_LANGUAGE "United states"

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.24: INPUT_LANGUAGE (Keyboard input language)

Page: 12

will force my "normal" setting in the current session. The setting can be changed for every session, and the Windows input language icon will change when you switch between sessions. When left on the "default" setting, IVT will not do anything to change the keyboard input language, so you will have to manually change the input language when you need it. See also this setup screen. This setting is saved in the registry. 12.4.25: IVT_LANGUAGE (Language used by IVT itself) IVT_LANGUAGE "name" Default: IVT_LANGUAGE English Chooses the national language of IVT itself. Valid choices are: - English; - Nederlands (dutch); - Portuguese; - German. IVT will, during start-up automatically scan the "lang" subdirectory for file called "*.lan". Such files are assumed to contain translations of the main IV menus and dialogs into a foreign language. Most of IVT is translated, only the more obscure messages and error pop-ups are English only. The language file called "example_lang" in the lang directory serves as a template for such files - it contains the original English strings, and shows what you have to do to adapt IVT to a new language. There is no need to compile the file - a new file or version of a file works immediately. If you do write a file in a new language, please be so kind to mail a copy to ivtsupport@softwarevoordelig.nl, so it can be included in future releases. The files can also be used to customise the look & feel of IVT. Copy one of the files, modify as desired, give it a unique language name and this will become a valid choice for an IVT_LANGUAGE statement. Caution: It is important to edit the files carefully and make sure that the various items in a dialog are of the proper lengths, or the dialogs will look ugly and sloppy. More detailed information can be found in the header of the "example_lang" file. You can change the language from this setup screen, too. This will switch to the new language immediately - no restart of IVT required The current setting is saved in the registry. NOTE: This field is one that can be configured using the installation wizard that i automatically started when you install IVT. Because it would give conflicts when you change this both in the configuration file created by the wizard and in interactive setup, this item is disabled in interactive setup. If you want to change this item, re-run the installation wizard: Menubar->setup->Re-run initial setup script The wizard has as the first button a "Do not use wizard" feature. If you choose that, all items in interactive setup will be enabled again (and you must configure all the necessary options there and save the setup, OR edit th IVT.RC file manually). 12.4.26: KEYBOARDMOD (Modify keyboard codepage) KEYBOARDMOD InputValue UseValue Default: Not used. See also CODEPAGEMOD for more information. Teh KEYBOARDMOD statement is useful to build custom keyboard translations. When a KEYBOARDMOD statement is used, IVT will test every single keystroke against all specified InputValues (you can have many different KEYBOARDMOD statements in your IVT.RC file). When a match is found, IVT simply pretends that the UseValue key was typed. The UseValue can be any valid Unicode character (range 0 to 0x10FFFF). This to set the CODEPAGE to UTF-8 in such cases, since characters outside the

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.26: KEYBOARDMOD (Modify keyboard codepage) normal range can only be properly transmitted and received in UTF-8.

Page: 12

The InputValue and UseValue can be specified in hexadecimal, and must both be values between 0 and 0x10FFF (any Unicode character value). Example: KEYBOARDMOD 0x30 0x31 CODEPAGEMOD 0x31 0x30 The FIRST line causes every zero you type to be translated into a one. The SECOND line causes every received '1' to be displayed as a '0'. This will make your host see a '1' while you are seeing a '0'! This example is not very useful but it is instructive :-) If you want to modify a certain keystroke (combination) on your keyboard, you can use the keyboard-debug feature of IVT (setup->Language/keyboard panel) to make IVT show the internal codes of every typed character. The VirtualKey cod is the value to use as the first parameter in the KEYBOARDMOD statement (it i the value generated by your actual keyboard driver). For IME input (International Method Editor) the Unicode and UTF-8 representations for every generated character are shown. Use the IME-CHAR value for the InputValue parameter if you want to translate such characters. There is a local KEYBOARDMOD list (created by having a script running in the context of a session, see PRECONNECT and ONCONNECT), and there is a global KEYBOARDMOD list (from normal IVT.RC statements or by using the GLOBAL keywor in a script). Only ONE list is used per keystroke, the local list overrules the global one. See also "Learn mode" which allows you to have more complex translations, ONKEY which allows you trap the keyboard events and KEYMACRO which allows you to triggers scripts when keys are typed. 12.4.27: KEYMACRO (Program any key to do anything) KEYMACRO KEYMACRO KEYMACRO KEYMACRO "Key "Key "Key "Key description" description" description" description" STRING SYNCFUNCTION ASYNCFUNCTION IVTFUNCTION "String value" Script [params] Script [params] "Internal function"

This is a late addition (Mon Jun 06 21:50:46 2005, version 19.0b) to IVT. perform an internal IVT function and so on. Traditionally, these programmed keys had to be saved in files which had to be loaded at IVT start-up time using the LOAD keyword. In version 22 and later of IVT these recordings are saved as part of setup, though. The simple KEYNAME command can be used to program keys that have predefined VT220 names (such as F1 - F20, NXTSCR and so on). That command, however, does not allow you to program key-combinations (such as ALT+F10 and so on). Various people requested a means to program these key combinations with the flexibility and power of the macro recorder in IVT.RC files only, since this allows for better maintainability, distribution and readability. For this reason, the KEYMACRO command was added. The rules are as follows: - First, you have to decide whether the key is to be programmed for ALL sessions or for particular sessions only. For the former, you can have a KEYMACRO statement in your IVT.RC file on the global level. For the second, you can have the KEYMACRO statement in an ONCONNECT or PRECONNECT statement. Such macro's are only valid for the session they are executed for. - Second, you have to uniquely identify the description of the key you want t program (the "Key description" parameter above). Such a description can be as simple as "F10" or as complex as: "F3+RShift+RCtrl+LeftAlt-caps-num-scroll+SCAN 3D" The former is just an F10 with all modifiers keys as "don't care" (so this matches F10, Shift+F10 and so on. The second example is an F3 while simultaneously holding down the right-han shift, right-hand control, left-hand ALT, no CAPS lock on, no NUMLOCK on, no SCROLL-LOCK on and a particular scan code (uniquely identifying a particular F3 key in case you have more than one). For your convenience, the macro recorder can generate such descriptions by clicking on "Choose key to program", type the combination, check all the options in that dialog that you want, then use "Copy to clipboard" to store the resulting key description on the Windows clipboard. This is because it is ESSENTIAL that the "Key description" parameter yields a valid key, as invalid descriptions are simply not ever going to match a typed key, and so will be ignored quietly.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.27: KEYMACRO (Program any key to do anything)

Page: 12

Also, if you change the order of the various parts, the matching will fail, so do not expect "F1+Ctrl+Shift" to be the same as "F1+Shift+Ctrl", the order of the parts is significant! Also, your language is significant: the names of the keys are in the local language of your windows version! - Once the key combination has been want to happen when you press the STRING: Send a simple string. SYNCFUNCTION: Call a script, wait ASYNCFUNCTION: Start a script, do IVTFUNCTION: Call an internal IVT identified, you have to specify what you key combination. These are: for it to finish. NOT wait for it to finish. function, see here for list.

- The last parameter identifies the string to send, script to call, or IVT function to invoke. For the difference between calling a script synchronously or asynchronously, see the BIND_SYNC and BIND_ASYNC commands. IMPORTANT EXTRA FEATURE: The keymacro recorder in setup only allows you to program keys that generate data. This is because you have to type the key to program, and that part of IVT does not respond to Ctrl, Shift, Alt and so on being typed by themselves. BUT: you can code this in a KEYMACRO statement in your IVT.RC file! This allows you to code reactions to such keys pressed singly or in combination. For example: KEYMACRO "-Shift+LCtrl+RCtrl-Alt" IVTFUNCTION "Show current cursor position" This says: When none of the shift keys is down, Left control is down, Right control is down, none of the Alt keys is down: show where the cursor is. Result: when you press both CTRL keys together, IVT briefly shows a large red cross through the current cursor position. This one is part of the standard distribution of IVT - try it now! If you write this macro as: KEYMACRO "+LCtrl+RCtrl" IVTFUNCTION "Show current cursor position" It ALSO does this when you press both CTRL keys together with one or more of the SHIFT and ALT keys (it does not mention the state of the Shift and Alt, s they are "don't care" keys). The resulting set of words that the KEYMACRO key description can contain is described below. The ORDER is very important: use the order below to string descriptions together. "+Shift+Ctrl" is OK, "+Ctrl+Shift" is NOT! Also, strings are case sensitive: +CAPS and -caps work, -CAPS does not! Name of the key. This comes first, it gives the name of the data-generating key. Use the name generated by the keyboard macro recorder for the key. NOTE: This is language dependent! A Swedish installation of Windows will give a Swedish name for the ENTER key. This is why there is a "Copy to clipboard" function on the macro recorder. When this is omitted, the KEYMACRO can match non-data generating keys. Use the constant ANY_KEY to match anything (make sure the rest of the matc describes other properties of the key). A lone ANY_KEY will truly match every key. +LShift The left shift key must be down, or the KEYMACRO does NOT match. +RShift The right shift key must be down, or the KEYMACRO does NOT match. +Shift One of the shift keys must be down, or the KEYMACRO does NOT match. -Shift None of the shift keys may be down, or the KEYMACRO does NOT match. When nothing is mentioned about Shift at all, the state of the shift keys is irrelevant. +LCtrl The left CTRL key must be down, or the KEYMACRO does NOT match. +RCtrl The right CTRL key must be down, or the KEYMACRO does NOT match. +Ctrl One of the CTRL keys must be down, or the KEYMACRO does NOT match. -Ctrl

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.27: KEYMACRO (Program any key to do anything)

Page: 13

None of the CTRL keys may be down, or the KEYMACRO does NOT match. When nothing is mentioned about Ctrl at all, the state of the CTRL keys is irrelevant. +LeftAlt The left ALT key must be down, or the KEYMACRO does NOT match. +RightAlt The right ALT key must be down, or the KEYMACRO does NOT match. +Alt One of the ALT keys must be down, or the KEYMACRO does NOT match. -Alt None of the ALT keys may be down, or the KEYMACRO does NOT match. When nothing is mentioned about ALT at all, the state of the Alt key is irrelevant. +CAPS The CAPS LOCK key must be on. -caps The CAPS LOCK key must be off. When nothing is mentioned about CAPS, the state is irrelevant. +NUM The NUM LOCK key must be on. -num The NUM LOCK key must be off. When nothing is mentioned about NUM, the state is irrelevant. +SCROLL The SCROLL LOCK key must be on. -scroll The SCROLL LOCK key must be off. When nothing is mentioned about SCROLL, the state is irrelevant. +SCAN XX The XX must match the hexadecimal scan code for the key (can be more than 2 digits), this can be used to differentiate between 2 otherwise identical keys (such as PgDown on the numeric keypad and the "normal" PgDown key). When SCAN is not used, it is irrelevant which key is used. Use keyboard debugging to find the particular scan code of a key, or turn on the "Scan code" flag in the keyboard macro setup. If you want to match a data key on scan code instead of name, use a combination with ANY_KEY: KEYMACRO "ANY_KEY+SCAN 4A" will work. +KBSTATE XX The keyboard state is a bit pattern that describes the state of all modifiers such as Ctl, Caps, Scroll lock, num lock and so on. It can be used to match odd combinations. Seldom used. Use keyboard debugging to find the particular code, shown as "Cntl". Only used in scripts, never generated by IVT itself. +VIRTUAL XX The Windows virtual key code for a key (can be more than 2 hex digits). It can be used to match odd keys, or in combination with ANY_KEY. Use keyboard debugging to find the particular code, shown as "Virtual". Only used in scripts, never generated by IVT itself. Note that you can have a keymacro for "F8" and another for "F8+Shift". The first one says nothing about the state of the shift keys, so it matches when you press F8 and shift. However, the SECOND one matches better, so when given the choice, IVT will use the best match. To complicate matters yet a little more, you can have KEYMACRO definitions on the global level (from normal lines in an IVT.RC file) and on the session level (either from PRECONNECT or ONCONNECT scripts or marked as "session only when the key was defined using the recorder). When searching these lists, the best match wins, so if you define "F8" on the session level and "F8+Shift" on the global level, a lone F8 will match the session macro, a shifted F8 will match the global macro. Perhaps needless to say, but the combination of all the settings in the key description, plus the power to invoke internal functions or scripts that

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.27: KEYMACRO (Program any key to do anything)

Page: 13

use the IVTFUNCTION and whatever logic you care to program, allows you to mak very flexible keyboard mappings. It can also confuse users to no end if you use all these possibilities in an entertaining mix :-) Examples: - KEYMACRO "F8" STRING "ls -lab\r" Sends a Unix listing command with a carriage return when you press F8. The state of the shift, ctrl, alt and so on keys are irrelevant. - KEYMACRO "F8+LShift+RCtrl+LeftAlt+CAPS-num+SCROLL" SYNCFUNCTION xx Calls the script xx and waits for it to return before continuing when you press the F8 key while holding down the left-hand shift, right-hand CTRL an left-hand ALT key, while CAPSLOCK is on, NUMLOCK is off and SCROLL LOCK is on. See this font change example for a nifty example. - KEYMACRO "P+Ctrl" IVTFUNCTION "Print Screen (F2)" Will program the Ctrl-P key combination to perform the internal "Print screen" function. This will work irrespective of which CTRL key you use (left or right) and irrespective of the current state of CAPS, NUM and scroll lock and shift keys. - KEYMACRO "P+RCtrl-num" IVTFUNCTION "Print Screen (F2)" This only works when you specifically use the right-hand CTRL key and the numlock key is currently off. - KEYMACRO "H-Shift+Alt" STRING "\1B[H" This sends "ESC [ H" (normally sent by the HOME key) when you press ALT+h. - KEYMACRO "ANY_KEY+SCAN E0+KBSTATE 120+VIRTUAL 70" STRING "" with the scan code, keyboard state and virtual key code makes sure only the single odd key is matched. Sending the empty string means the key does nothing at all. See also learning mode and keyboard macros and LOAD. See also KEYNAME and SEND. See also CAPSLOCK (to disable the CAPS lock key). 12.4.28: KEYNAME (Program VT220 keys) KEYNAME stringexp This command is deprecated: see KEYMACRO instead. Programs KEYNAME to stringexp. The KEYNAME must be the name of a valid VT220 function key. If this is used in an IVT.RC file, the key will be programmed in ALL sessions. When used in a SCRIPT, it will only apply to the current session. Examples: NXTSCR "ls -lab\r" F6 Hello REMOVE "\7F" This will program the PageDown key to send the Unix command 'ls -lab RETURN'. The VT220 function key F6 will emit the string "Hello". The VT220 function key "Remove" (mapped to the PC "Del" key) is programmed to emit a single DEL character. Also, see the keyp program for Unix, which allows the host to (temporarily) program the IVT keys. Note that the keyboard can be reprogrammed in SCO-ANSI mode instead of the default VT220 keyboard map. Keys programmed in the way shown here will work regardless of that setting! See also BIND (to tie a key to a script) and keyboard macros. See also KEYMACRO. Attention: Previous versions of IVT allowed no quotes in the stringexp, but version 18.1 of IVT now forces a more logical and consistent syntax. When you omit the quotes, you can have only a single word. When you need embedded spaces, use the quotes. When you want to emit a quote, use a backslash to escape it. 12.4.29: LOAD (Loads a learned key-definition file) LOAD M|RG|L File Note: Deprecated. Use KEYMACRO or save-to-registry instead. The LOAD command loads a file with keyboard macros into memory. This file

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.29: LOAD (Loads a learned key-definition file)

Page: 13

must have been previously created using WRITE option of the F4-K screen. Following the word LOAD there must be a two-character string. The FIRST character must be one of: - M Merge. The key-definitions in the file are added to any definitions already there. This allows you to build keyboard maps in bits and pieces. - R Replace. Any existing key-definitions are removed prior to loading the file The SECOND character must be one of: - G Global. The master list is modified, which is inherited by all future sessions. - L Local. The list for the current session is modified, which leaves all other current and future sessions unaffected. If you want to redefine the keyboard to be ANSI compatible, see SCO_ANSI. This feature allows you, for example, to program all sorts of strange key combinations using F3-L from setup. After all definitions are to your satisfaction, you save the file and use a LOAD command in your default IVT.RC file to restore those definitions any time you start IVT. Since version 22 of IVT, macro's are also saved as part of normal setup. Make sure you choose ONE method and not both at the same time, it is easy to lose track of where key defienitions come from. Most keys can be programmed, even ALT keys that are used by IVT. You lose the standard function, however (unless you move them to other keys first). Example: LOAD MG "$IVTDIR/mykeys.key" Adds the key definitions in the named file to the global list (so they work i all current and future sessions). the entire setup, including programmed keys, into the registry. other users. Programming explicit KEYMACRO statements in an IVT.RC file is the most portable and maintainable way (and hence the preferred way). 12.4.30: LOCKTIMER (Locks keyword with PASSWORD after N minutes) LOCKTIMER num Default: 0 (off). Auto-lock keyboard after num minutes. IVT will start a countdown 30 seconds before the keyboard is locked, unlocking is done by typing the correct PASSWORD. The timer can be set using the setup screen, and so can the password. A locked keyboard will cause a keys-icon to appear in the status bar and only a valid password followed by return will unlock it. Typing RETURN without a valid password preceding it will sound the BELL. The keyboard can be locked manually using ALT+L. This feature works only when a password is defined to unlock it. 12.4.31: MOUSE (Configure left/right mouse buttons) MOUSE MOUSE MOUSE MOUSE MOUSE MOUSE MOUSE OFF SUPDUP XTERM XTERM2 CURSOR VI CUTPASTE

Default: MOUSE CUTPASTE. MOUSE tells IVT what to do when a mouse is connected and used. In sessions, it can be used for cutting and pasting or cursor positioning. In this hypertext-help system it can be used to navigate through the manual.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.31: MOUSE (Configure left/right mouse buttons) The mode parameter can take the following values: - OFF Mouse is inoperative.

Page: 13

- SUPDUP Buttons send coordinates & button-codes in SUPDUP format. Some Unix program recognize this format and react to it. - XTERM As SUPDUP, but it sends XTERM sequences (only button DOWN events). See Xterm mouse mode for more information. - XTERM2 As XTERM, but this is a different mode that also sends mouse UP events and uses a different button numbering scheme. See Xterm mouse mode for more information. - CURSOR The LEFT button sends CURSOR keys to try and position the cursor to where the mouse-cursor is. This works with all programs that understand cursor keys, albeit sometimes slowly because the cursor is first moved to the beginning of the current line, then up or down (as required) then to the right. This can take a lot of processor capacity on the host-side of things when your screen is very large and the link is slow. The RIGHT button enters CUT-mode. - VI As CURSOR, but issues efficient VI-commands to position cursor. This, of course, works only when your editor is VI. Just by clicking on the screen, you'll move the VI cursor to that position really fast! The RIGHT button enters CUT-mode. You might also want to program a MOUSE_KEY statement to give you VI cursor-positioning when a mouse button is used in combination with a key on the keyboard. The default distribution uses the CTRL key plus the left mous button to do a VI-style cursor move. - CUTPASTE Left button initiates a CUT. Right button is a paste (same as ALT+p). The See See See default mode is CUTPASTE. It can also be changed from setup. also the MOUSE_KEY command which can program the mouse. also CUTMODE and COPY_STRICT and LEAVE_COPY_SELECTION. also GUI_COPYSPEED. 12.4.32: MOUSE_EXTEND_TO_LINE (Mouse copy behaviour) MOUSE_EXTEND_TO_LINE NO_MOUSE_EXTEND_TO_LINE Default: MOUSE_EXTEND_TO_LINE. When you use the word-selection mechanism (see MOUSE_SELECTION), you can choose to have IVT eventually select the whole line, including a new line. When you paste such a selection, it also pastes a new line. With NO_MOUSE_EXTEND_TO_LINE the selection stops just short of a line, so you will have to type the new line manually. This setting is global, and can be changed from this setup screen. The current setting is also saved in the registry. Older versions of IVT did not have this, so if you dislike the new default behaviour you can restore the old functionality. 12.4.33: MOUSE_KEY (Configure mouse in combination with keyboard) MOUSE_KEY BUTTON KeyBoardKey MouseAction [CALL Script [args...] ] MOUSE_KEY BUTTON KeyBoardKey MouseAction ["data"] MOUSE_KEYLOC BUTTON KeyBoardKey MouseAction [CALL Script [args...] ] MOUSE_KEYLOC BUTTON KeyBoardKey MouseAction ["data"] MOUSE_KEYLOC CANCEL This is a powerful command, added upon request by my enthusiastic user Jan Bessels. In version 16.4c (July 2003) the possibility is added to specify combinations of keyboard keys using the & operator (AND). MOUSE_KEY programs the mouse buttons in combination with special keyboard keys. For example, you might want to use VI mode cursor positioning and enter insert mode when you keep the left CTRL key pressed while using the LEFT

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.33: MOUSE_KEY (Configure mouse in combination with keyboard) mouse button: MOUSE_KEY BUTTON1 LEFTCTRL VI "i"

Page: 13

Or you want to trigger a special script when an unlikely combination of keys is used: MOUSE_KEY BUTTON2 LEFTALT&RIGHTSHIFT&SCROLLLOCK NONE Call MyScript The full possibilities are as follows: - The BUTTON is either BUTTON1 (left mouse button), BUTTON2 (right mouse button) or WHEEL (the mouse wheel). Other buttons are not supported. - When a mouse button is used, IVT checks to see if a MOUSE_KEY statement is in effect for that particular mouse button. MOUSE_KEYLOC does exactly the same as MOUSE_KEY, but is LOCal to the session (i.e. mouse behaviour can differ between sessions). All local mouse key statements can be undone using the CANCEL directive, this will delete all local MOUSE_KEY statements. A MOUSE_KEYLOC statement would normally be used in a PRECONNECT, ONCONNECT or other script to configure the mouse for use in a particular application. - If the MOUSE_KEY statement also matches the current state of the keyboard, the normal mouse action (configured via the MOUSE statement) is NOT performed, the MOUSE_KEY takes precedence. The only keys that can be used are non-data generating keys such as SHIFT, CTRL, ALT, etc. See below for a complete list. Various keys can be combined using the & sign, but the resulting string must contain no spaces. Example: SHIFT&ALT&CTRL specifies the combination of ANY alt, shift and control key. The string "LEFTSHIFT&RIGHTCTRL" matches only when the left-shift key and the right-ctrl key are pressed simultaneously. When NONE is used as key, the default action for the specified mouse button can be reprogrammed (any normal MOUSE statement will be ignored if you do this). Using SCROLLLOCK, you can get different mouse behaviour depending on the state of the scroll-lock key. - The MouseAction specifies the action to be taken (CUT, PASTE, VI, etc). See below for a complete list. When NONE is used as mouse action, nothing is done. This is handy in combination with either CALL or "data" since it results in a script being called or data transmitted when the mouse is used - If the optional "data" is present, this data is transmitted on the session after the mouse action has finished. - If the optional CALL is present, the specified script is called with the specified arguments. In addition, the special IVT variables $MOUSE_COL, $MOUSE_ROW and $MOUSE_BUTTON are initialised with the current mouse positio and the button used before the script is invoked. This allows the script exact control over mouse operations. When the action is for the WHEEL button, the $MOUSE_WHEEL_DELTA variable is set to indicate the distance that the mouse wheel has moved (usually a negative value of -3 when you scroll down and 3 when you scroll up, when the wheel is scrolled rapidly this may be a multiple of 3). The valid words for the KeyBoardKey are: CTRL - Any CTRL key LEFTCTRL - The left-hand CTRL key RIGHTCTRL - The right-hand CTRL key ALT - Any ALT key LEFTALT - The left-hand ALT key RIGHTALT - The right-hand ALT key SHIFT - Any SHIFT key LEFTSHIFT - The left-hand SHIFT key RIGHTSHIFT - The right-hand SHIFT key SCROLLLOCK - Activated SCROLL LOCK key NONE - No key at all (replacement for MOUSE command) The valid words for the MouseAction are: CUT - Initiates a CUT operation PASTE - Pastes the default buffer VI - Positions cursor VI style CURSOR - Positions cursor using single cursor motion commands XTERM - Sends XTERM style mouse action SUPDUP - Sends SUPDUP style mouse action NONE - Does nothing MOUSE_KEY statements are examined for every mouse action in the order that they are defined. This can be significant since only the first matching statement is executed. If you define a SHIFT first and an LSHIFT later, the LSHIFT is not going to be seen since the SHIFT will match either shift key...

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.34: MOUSE_SCROLL_FACTOR/PAGESIZE (Mouse scroll tuning)

Page: 13

12.4.34: MOUSE_SCROLL_FACTOR/PAGESIZE (Mouse scroll tuning) MOUSE_SCROLL_FACTOR number MOUSE_SCROLL_PAGESIZE number The defaults for these are: MOUSE_SCROLL_FACTOR 1 MOUSE_SCROLL_PAGESIZE 24 of lines that has been configured in the mouse properties of the system. Usually, this is 3 lines. When your window screen is very large (many lines), 3 lines per click feels like a tiny amount. Therefore, IVT adds FACTOR lines for every PAGESIZE lines on the screen. So, if your window is 48 lines, IVT adds 2 extra lines per scroll action. When your window 72 lines, IVT adds 3 extra lines per scroll action, etc. When you press SHIFT while using the scroll wheel, the resulting total number of lines to scroll is multiplied by 3 (turbo scroll mode). You can tune these numbers to get the best feel when using the scroll wheel. See also GUI_COPYSPEED. They can also be changed in the mouse setup dialog and are saved in the registry. 12.4.35: NUMERICF1F4 (Configure PF1-PF4 on numeric keypad) NUMERICF1F4 NO_NUMERICF1F4 Default: NUMERICF1F4 IVT is a VT220 terminal emulator. These DEC terminals traditionally have four special function keys called PF1 to PF4 (besides function keys named F1-F20). In some applications, heavy use is made of these keys. A standard PC keyboard usually maps these PF1-PF4 keys to F1-F4 (like IVT normally does). This cause a problem with the DEC keys F1-F4 which provide 'Hold Screen', 'Print Screen' 'Setup' and 'Break' functionalities. On a DEC terminal, the PF1-PF4 keys are located on the top row of the extended (numeric) keypad. On a PC, these are the 'Num lock' key and 'extra' /, * and - keys. IVT maps the NUMLOCK key to PF1, / to PF2, * to PF3 and - to PF4. keys will behave normally again. The setting can be changed for the current session only in this setup screen. NOTE: If you ONLY want to change the status of the NUMLOCK key without generating a PF1, use SHIFT+NUMLOCK. IVT will ignore that combination. Also, Ctrl-F1 to Ctrl-F4 also generate PF1-PF4, and you can swap the F1-F4 an Ctrl-F1 to Ctrl-F4 using F1F4. 12.4.36: PASSWORD (Set password for keyboard lock) PASSWORD word Default: Not used. Used to unlock a locked keyboard. When the keyboard is locked, the status lin will show the lock icon, nothing can be typed except a valid password. See LOCK. The password can be either a simple string (which is not very safe) or an encrypted string. See LOCKing for a description of generating an encrypted word to put in your configuration file. Alternatively, you can put the PASSWORD directive in an INCLUDE file that you then encrypt.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.37: PASTESPEED (regulate paste speed) 12.4.37: PASTESPEED (regulate paste speed) PASTESPEED lines maxbytes maxdelay CR-Only Default: PASTESPEED 3 10 10000 NO

Page: 13

When you paste a large amount of information in a session, IVT pretends the information is typed in. However, not all hosts (and/or applications) are designed to process that information at the speed a modern PC can transmit it Since it is simulated keyboard input, at some point the buffers overflow and you lose (part of) the data. To guard against this, IVT will not paste at full speed, but it will transmit a certain maximum number of lines, and then wait for something to be returned by the host (since you usually paste into some application that echoes the data that you type, something usually comes back). Note that IVT does not care WHAT comes back - any single byte will do, but it can (and usually will) be a complete echo of the transmitted data. If NOTHING comes back, IVT will wait for a maximum of maxdelay milliseconds before transmitting the next number of lines anyway. When your pasted data has no carriage-returns in them (or the lines are very long), IVT counts 128 bytes as being a "line". The maximum number of lines yo can set is 1000. The maxbytes setting can limit lines to a certain length. Some extremely badl configured systems may even choke on a single line of (say) 50 bytes. When yo set the maxbytes to (say) 10, IVT will shorten a single packet to that many bytes. The 10000 setting means that IVT will normally not truncate lines this way. The most extreme setting is 1, which means every single byte of data is transmitted in a single packet. This may slow things down severely for large pastes. A value of less than 1 is silently adjusted to 1. The maximum value i 10000. The CR-only setting only applies when the number of lines is 1. It can either be set to YES or NO. Normally, IVT will combine the \r with the line itself, so it gets transmitte as a single packet to the host. When CR-Only is set to YES, a single line wil be sent off in a single packet, followed by the \r in another single packet. So, a slow setting would be: PASTESPEED 1 10000 100 YES Send 1 line, wait for a maximum of a tenth of a second, send \r in a separate packet. Lines are not truncated and can be very long, in which case a packet will be sent to the host when it is full (normally 1500 bytes or so). The slowest setting is: PASTESPEED 1 1 100 YES Which causes 1 byte to be sent, wait for reply for max of 100 Ms. The fastest would be: PASTESPEED 1000 10000 0 NO Send 1000 lines in a single packet (which will cause IVT to send packets when This means IVT will go at full blast, possibly overrunning your host. Note that the maxdelay setting is not very significant in determining the actual speed. After sending off a number of lines, ANY response received from host will trigger IVT to send the next set of lines. Only when no response is received at all, then the maxdelay is actually used. Most modern hosts respon within a single millisecond, so IVT hardly waits at all. The default settings for this seem to work rather well, so usually there is n need to change them. IVT actually pastes large amounts of data faster than other emulators do (since it combines multiple lines into a single packet) an since it normally waits for a response, there is no risk of overrunning the host. For that reason, there is no setup screen for this item, you can only modify it using a statement in the IVT.RC file. 12.4.38: PRECONNECT (Execute scripts BEFORE session is established) PRECONNECT hostname scriptname [arguments] PRECONNECT * scriptname [arguments] Before a connection to the named host hostname is made, the script named scriptname is called (with optional arguments). When you use * as a hostname, the script will be called for ANY hostname. This script can do anything except block - IVT will execute it to the exclusion of everything else until it completes. When the script attempts to

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.38: PRECONNECT (Execute scripts BEFORE session is established)

Page: 13

WAIT, POPUP, or any other function that will require further actions from either humans or hosts, the script will be KILLed. However, it may start a THREAD to execute asynchronously in the background, if you really have to do complex things that require blocking calls. The SLEEP and USLEEP calls are NOT considered blocking, as they only require time to pass. However, using long sleeps will cause IVT to seemingly hang... You can have several PRECONNECT statements for the SAME host (or hosts). They will be executed in the order they were defined in. See also ONCONNECT. The purpose of this script is to set some local and/or global variables of which $HOSTNAME can be one. When IVT eventually makes a connection, it will b to the hostname set by this script. The script may also modify the value of the $USER variable. The upshot is that you can redirect a call from one host to another, or use one host as a stepping-stone to another. As an example, suppose you have a Unix host that is reachable from a PC box using the TELNET protocol, and you want to talk to a host that can only be reached using SSH-1 (which IVT does not support since it is a deprecated protocol). In this case, you can do the following: PRECONNECT ssh1-host Redirect ONCONNECT telnethost TLNHost SCRIPT Redirect Hidden DoRedir = $HOSTNAME HOSTNAME = "telnethost" END SCRIPT TLNHost Hidden CALL IvtWaitLoggedIn IF $DoRedir == "" THEN RETURN CALL WaitPrompt SEND "exec ssh $DoRedir\r" CALL IvtLogMeIn $DoRedir END This will result in the following: - When you make a connection to host "ssh1-host" IVT will immediately invoke the script Redirect. The name of the host that only does SSH-1 is stored stored in the variable DoRedir. The $HOSTNAME is set to telnethost (the name of a host you can TELNET into). - IVT will now make a connection to telnethost. Since an ONCONNECT is in effect for this host, IVT will now call the script TLNHost. This script will log you in on this host. Because the variable "DoRedir" is not empty, the script will do a "ssh" to "ssh1-host", which is what you wanted to achieve. - When a connection is made to "ssh1-host" in the normal way, the DoRedir variable will be empty (because variables are per session), so a normal connection will be made. As another example, you can use a PRECONNECT statement to give short nickname to hosts: PRECONNECT * DoSubNet SCRIPT DoSubNet IF Length($HOSTNAME) > 3 THEN RETURN HOSTNAME = "10.8.60.$HOSTNAME" END This will call DoSubNet for ANY hostname, and prefix the hostname with a IP-network when you type a short hostname. This allows you to specify only th last (non-unique) part of the hostname in DNS-less environments. As a final example, if you want nicknames for hosts: PRECONNECT a HostTrans LongNameOfHostA PRECONNECT b HostTrans LongNameOfHostB ... PRECONNECT n HostTrans LongNameOfHostN ... Script HostTrans LongName HIDE HOSTNAME = $LongName END

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.38: PRECONNECT (Execute scripts BEFORE session is established)

Page: 13

Every time a connection is made to a host that matches one of the short names in the PRECONNECT statements, it is translated to the long name. Note: HOSTLIST also offers nicknames. 12.4.39: RECONNECT (Automatic destruction of sessions upon logout) RECONNECT NO_RECONNECT Default: NO_RECONNECT. NO_RECONNECT prevents automatic re-connect of a session to a host when such a session is disconnected. RECONNECT says you want to reconnect disconnected sessions automatically (so you get a new 'Login:' after logging out (from an average Unix host). since you will not be able to login as someone else (there is no "Login:" prompt, the process is automatic). NO_RECONNECT will treat the end of the session as the end of the virtual terminal (i.e. as if Alt+F4 had been used, see session management). The upshot is that ending IVT is easy when NO_RECONNECT is in effect. Logging out from all your sessions will make all virtual terminals disappear. When the last session is lost, IVT will exit. When RECONNECT is used, logging out must be followed by ALT+F4 to close the virtual terminal. Personally, I prefer NO_RECONNECT, which is why this is the default. See also EXPLICIT_EXIT, which treats the LAST session different. See also RETAIN_SESSIONS, which does not reconnect but keeps the virtual terminal, and allows you to reconnect to a DIFFERENT host. Note: Like cloning sessions, reconnecting will use the original host and user name to connect, not the result of any rewriting by PRECONNECT and ONCONNECT scripts. The current setting can be viewed and modified from this setup screen. It can also be modified from the menu bar. See also ESC<space>P for host-initiated disconnects. See also ONDISCONNECT scripts. When RECONNECT is in effect, these scripts

12.4.40: RETAIN_SESSIONS (Force manual termination of sessions) RETAIN_SESSIONS NO_RETAIN_SESSIONS Default: NO_RETAIN_SESSIONS Normally, when you log off from a host, IVT will kill the virtual terminal. When the last session is closed, IVT will either exit or redisplay the original create session dialog (see EXPLICIT_EXIT). Some users find it inconvenient that the session is lost together with its scroll back history and would prefer to kill each session explicitly. Whe RETAIN_SESSIONS is used, the session is not closed and also not reconnected. are available and the session must be manually terminated (using ALT+F4, or the "Close session" command in the menu bar, or by closing IVT altogether). When you choose "Enter" to reconnect the session, this RETAIN_SESSION also allows you to connect to a different host than you originally connected to (i will bring up the "Create session" dialog). The standard RECONNECT behaviour is to connect to the original host to simulate a real, serially connected VT220 terminal that will always show the login prompt of a host after logging off. This setting can also be changed from this setup screen and is also saved in the registry. See also RECONNECT and EXPLICIT_EXIT.. 12.4.41: SESSION_OVERVIEW (Type of host shown in F4-S) SESSION_OVERVIEW PHYSICAL SESSION_OVERVIEW LOGICAL Default: LOGICAL. The F4-S screen shows details of all your current sessions, one of which is

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.41: SESSION_OVERVIEW (Type of host shown in F4-S)

Page: 13

the hostname of the remote host. However, when you use advanced scripts, the host on the other side of the network connection can be just the first in a series of hops, and the user is actually interacting with a different host. Therefore, IVT usually displays the LOGICAL connection, which is the current content of the $HOSTNAME variable. When the PHYSICAL setting is used, the hostname or IP-address of the host IVT actually has a session with is displayed here. In simple cases, these names are identical. Currently, there is no setup-screen to modify this setting. 12.4.42: SEARCH_CASE_SENSE (Case sensitivity for search default) SEARCH_CASE_SENSE NO_SEARCH_CASE_SENSE Default: SEARCH_CASE_SENSE. When you use the "search" command in IVT to search these manual pages, the default search mode is to have case-sensitive searches. That setting can be changed using the 'c' keystroke command or by toggling the checkbox off, but if you ALWAYS prefer case insensitive searches, you can use this directive in an IVT.RC file. There is no setup screen for this item. 12.4.43: SESWRAP (Configure behaviour of CTRL+CURSOR keys) SESWRAP NO_SESWRAP Default: SESWRAP. In session management it is explained how you can switch between sessions. The most common way is to use the CTRL+cursor keys to flip from one session t the next (in the same group). With the SESWRAP setting, using a CTRL+cursor key can take you from the LAST session to the FIRST, and from the FIRST to th LAST. When NO_SESWRAP is specified, IVT will NOT wrap around in this way. Also, remember that SHIFT+CTRL+Cursor can take you to the last or first session immediately. When you routinely have many sessions, NO_SESWRAP is better because you do no accidentally switch to the first session. 12.4.44: WINDOWPOS (specify default window position) WINDOWPOS WINDOWPOS WINDOWPOS WINDOWPOS CENTER|CENTRE LEAVE LAST_KNOWN Xvalue Yvalue

Default: LAST_KNOWN. This command is used to specify the initial window position of the IVT application window. If you specify CENTER (or CENTRE, if you happen to live on the wrong side of the Atlantic :-) the window will be positioned in the center of the screen. This is default. When LAST_KNOWN is used, the position and size at the time IVT was last used is used. The last known size is also made the default size for new sessions. This setting is the default setting, starting with version 22.3 of IVT. When you write scripts and need to make sure that IVT starts up in a known position and size you will have to force this setting off of the default. When there IS no last-known position, or when NO_REGISTRY is used, LAST_KNOWN is the same as CENTER. When you specify LEAVE, it means that IVT will leave the window wherever it is (determined by the operating system). This prevents that the windows jumps hither and yon when you call IVT to perform short tasks on Unix using scripts You can also specify absolute coordinates of the upper left corner of the screen. IVT will position itself accordingly during start-up. When you alter the setting from this setup screen, IVT will reposition accordingly. When you specify a NEGATIVE value for X or Y, the result will be that the window is positioned beyond the top (Y) or left edge (X) of the physical screen. This is sometimes useful when the size of the window is a little too big, causing the status line or the title bar to be hidden by the Windows taskbar. Tweaking these values can make all relevant bits visible.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.4: Look & feel: Feel 12.4.44: WINDOWPOS (specify default window position)

Page: 14

IVT will determine the whereabouts of the Windows taskbar and interpret the coordinates accordingly. Thus, if you specify "WINDOWPOS 0 0" and your taskbar is at the top of the screen, IVT will position itself just below the taskbar. Similarly, centering is done with the taskbar taken into account This setting can also be changed from setup, and is saved into the registry. Furthermore, it can be used in a script, in which case you can control the current window position of IVT. 12.4.45: WRAP (set line wrapping mode) WRAP NO_WRAP Default: WRAP. Turn auto-line wrap ON/OFF. When ON, IVT will wrap to the next line after reaching the end of a line. When OFF, it will print remaining characters on the last position of that line. The length of a line is of course determined by the current settings of the WINDOW_SIZE and whether or not the host has set a wide screen. The mode can also be changed by the host using an escape sequence. When NO_WRAP is in effect, output longer than a line is lost, which can be exceedingly annoying. IVT has WRAP as default, but even that does not help against certain hosts (such as AIX) that explicitly set NO_WRAP at the drop of a hat. The mode can be viewed and changed (for the current session only) from this setup screen. 12.5.1: AUTOLANDSCAPE (for text mode prints) AUTOLANDSCAPE NO_AUTOLANDSCAPE Default: AUTOLANDSCAPE.

When IVT wants to print text to a Windows printer, it will determine whether full lines of text fit the paper given the current paper, font and screen width. When the paper is too narrow and portrait mode is selected, IVT will automatically select landscape mode when the printer supports it. Note that this does not guarantee that this will make it fit, but at least a larger portion of the lines will make it to the paper. See also PRINTER_FONT_SCALE, as a further attempt to make sure the informatio makes it all the way to the paper. If, for whatever reason, you do not want IVT to switch orientation this way, it can be suppressed by specifying NO_AUTOLANDSCAPE. The default setting (from IVT.RC) is inherited by all printers that IVT detects when starting. You can modify this setting for individual printers in this printer setup screen. This modification is stored in the registry, too. 12.5.2: CONFIRM_PRSCREEN (Confirm print screen) CONFIRM_PRSCREEN NO_CONFIRM_PRSCREEN The default is CONFIRM_PRSCREEN. When you type F2 (Print Screen), IVT will normally display the standard Windows "Printer selection" dialog where you can choose a printer, change the printjob settins and/or confirm or cancel the print operation. When the current printer is a plain file, IVT displays a simple OK/Cancel dialog to confirm the print operation. For Windows printers, this means the output is sent to the current printer (usually the Windows default) with the default settings. FOr a file, the data is simply sent to the file. It can also be changed from printer-setup and is saved in the registry. See also CONFIRM_PRINT_SELECT.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.5: Printing and printer related settings 12.5.3: CONFIRM_PRINT_SELECT (Confirm print selection) 12.5.3: CONFIRM_PRINT_SELECT (Confirm print selection) CONFIRM_PRINT_SELECT NO_CONFIRM_PRINT_SELECT The default is NO_CONFIRM_PRINT_SELECT.

Page: 14

When you select a region on the screen (with either the mouse or the keyboard you can hit F2 (print screen) to print just the selection to the current printer. The idea is that you define a file as the current printer for the session, and add bits and pieces of the session to that file. For example, details of error messages and other program output is pasted to the file this way with a minimum of effort. To minimize that effort further, IVT does not normally ask for a confirmation to print the selection. Some users do not like that and for those this option can be used to force a dialog with the usual printer selection. It can also be changed from printer-setup and is saved in the registry. See also CONFIRM_PRSCREEN. 12.5.4: GUI_PR_CONTROLLER (How to handle host printing) GUI_PR_CONTROLLER RAW GUI_PR_CONTROLLER COOKED Default: RAW. IVT supports the DEC VT220 "Print controller" mode, where characters received by the host are not sent to the screen but to the printer, instead. This mode allows hosts to print reports on the printer connected to the PC IVT runs on, instead of printers attached to the host. This GUI version of IVT supports two ways of sending data to printers: - RAW mode, where bytes are passed directly to the printer; - COOKED mode, where IVT has control over font, page orientation and so on. By default, IVT will open a print job in "RAW" mode when the host turns the printer on. The host is expected to control the printer by sending the appropriate commands to control the font, page breaks, and so on. this works fine in most cases, but it has two problems: - Some printer drivers do not support RAW mode. The data sent in this way just disappears, where other printers work fine. - Many applications exist that just send plain lines of text and form feeds to print simple reports. They do not attempt anything to do with fonts, paper orientation and so on. Sending data in RAW mode ignores all these settings for the printer and perhaps a report would look a lot better when printed in a different font, or in landscape. Therefore, IVT allows you to specify the mode for sending data to printers when the host turns controller mode on. When "COOKED", IVT opens the printer with the settings specified in the "properties" sheet for the printer, and prints the data in the selected font. It is the responsibility of the user to make sure that the data the host sends does not contain ESC-commands or PostScript commands, since these commands end up being printed instead of being executed. The setting is inherited by all printers that IVT discovers when it starts up It can be overruled in setup, and such a change is saved in the registry. 12.5.5: PR_INDENT (Create a left margin in printout) PR_INDENT number This is only used by the manual printing subsystem of IVT. Default value: 3. Every line printed will be prefixed by the number of spaces you specify here. This will create a left margin that might prevent holes being punched through my carefully created documentation :-) Make sure that the chosen font (PRINTER_FONT) and the indent do not combine i long lines being truncated or wrapped. This number can also be adjusted from this setup screen. See also PR_LINES.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.5: Printing and printer related settings 12.5.6: PR_LINES (Number of lines per page to use when printing)

Page: 14

12.5.6: PR_LINES (Number of lines per page to use when printing) PR_LINES num This is only used by the manual printing subsystem of IVT. Default value: 61. This specifies how many lines are to be printed on a single page. After the specified number of lines, IVT will emit a form feed character to start a new page. Every page has a header of about 5 lines (depends on the level of the topic at the start of the page). This is configurable from this setup screen, too. The number is ignored when you are printing manual pages to a Windows printer IVT will automatically determine the proper number of lines given the chosen PRINTER_FONT, paper size and so on. When your 'printer' is a file, the size is important. 12.5.7: PRINTER (Define a logical printer) PRINTER FILE[,OPTIONS...] This can be used to define a logical printer. When you click here IVT will show all defined printers. This allows you to connect any printer to any session. Windows printers and choose the default Windows printer automatically. NOTE: IVT used to define a default printer called LPT1, which used to be "the way to print on MS/DOS and early versions of Windows. Nowadays (2009), directly attached parallel printers are a rare exception. On systems without any defined Windows printers, defaulting to LPT1 while there is nothing connected to LPT1 will cause hangups and serious delays. IVT no longer define this as a printer. If you still want IVT to use LPT1, you will have to define it manually, like so: PRINTER LPT1,APPEND,AUTO_FF You can also add printers on the fly in the printer setup screen (F3, Print), BUT such manually defined printers will be used as if they were files, so IVT will just open them, write text output and close them (so no colors, backgrounds, special characters, national support and so on). This is meant t be used for plain files or (very) simple printers such as LPT1. If you just want to print a file, check out the privt support program! FILE can be any device (e.g. LPT1) or real file (e.g. C:/TMP/SCREEN.DMP). The OPTIONS is a comma-separated list of options. An option can be: - OVERWRITE When mode is OVERWRITE, a file is truncated before writing. For a true device such as LPT1, the mode is irrelevant. - APPEND When mode is APPEND, any new output is appended to FILE. - DEFAULT The printer becomes the default printer for a new session. You may also explicitly specify NODEFAULT. - TIMEOUT=seconds Automatically close the printer after the specified number of seconds of inactivity. A close can also be forced using the F3-F (flush) keys. The default timeout is 10 seconds. This means that when the printer is used to record a session, the printer will be closed after 10 seconds of inactivity on the session. Specifying a TIMEOUT of zero means you will have to close the printer manually (using F3-F). This is the old IVT behaviour. Use the PRTIMEOUT directive to specify a default timeout for printers (before defining the printers themselves). - AUTO_FF Set Automatic Form Feed on. - NO_AUTO_FF Set Automatic Form Feed off. - PROMPT Set PRINTER_PROMPT for this printer on. See also this setup screen. - NO_PROMPT Set PRINTER_PROMPT for this printer off.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.5: Printing and printer related settings 12.5.7: PRINTER (Define a logical printer)

Page: 14

- SELECT The new printer becomes the selected one for the current session, this will work only when you define the printer (dynamically) in a script. You can also specify a Windows queue-name, such as: PRINTER \\\\BAC300\\PQ_F2-OOST_HP,OVERWRITE,TIMEOUT=5,NO_AUTO_FF The double backslashes are necessary because a \ is special in IVT.RC files. In this queue case, you must specify OVERWRITE, or it won't work! Several sessions can print to the same printer simultaneously. Output will be intermixed when this happens! The default mode is OVERWRITE. See also printing for complete description of printing. Another default mode is NO_PROMPT, so files are overwritten without asking. The host can control printing, see these special escape codes. See also PRINTER_FONT. 12.5.8: PRINTER_AUTO_FF (Send FormFeed when closing printer) PRINTER_AUTO_FF NO_PRINTER_AUTO_FF The default for this setting is PRINTER_AUTO_FF. This setting only applies to simple (file-based or RAW) printers, normally IV will use Windows printer in advanced (cooked) graphics mode. In that case, Windows will make sure that the printjob ends and no extra blank pages are printed. For simple printers, when IVT stops printing, it will send a form feed character to make sure the printer actually ejects a page. For some (line) printers, this is not desirable. Setting NO_PRINTER_AUTO_FF will prevent the form feed. This setting can also be influenced by the host, using the CSI ? 18 h/l command sequence. IVT will initialise the setting for every session by using the default for the printer, which can be altered manually in printer setup. See also the AUTO_FF clause of an individual PRINTER statement. By the time it is time to close the printer, the current setting is used. 12.5.9: PRINTER_FONT (Font to use for printing) PRINTER_FONT "font description" This version of IVT supports graphics printing of screen and help data. Colors, shading, underlines and so on are all printed exactly as shown on screen, hardware permitting. The syntax for this statement is the same as the one used for the screen font see GUI_FONT for details. It is best to choose a decent TrueType font here. See also PRINTER_FONT_SCALE and AUTOLANDSCAPE. You can also specify the font interactively in this setup screen.

PRINTER_PROMPT NO_PRINTER_PROMPT The default is NO_PRINTER_PROMPT. When you use a printer that is actually a file, IVT wil normally just open th file and either overwrite it or append data to it depending on the setting of the OVERWRITE/APPEND mode. Setting PROMPT to ON will cause IVT to display a "Proceed yes/no" dialog when the file already exists before altering the file. Click on CANCEL to prevent printing, OK to proceed with printing. This setting only affects printers that are files, it is ignored for "real" printers (nothing is destroyed when printing to a real printer). NOTE: Using this statement only sets the default for all printers that are defined, either interactively through setup, or using a PRINTER statement in an IVT.RC file. Use the PROMPT/NO_PROMPT clause in a PRINTER statement to overrule this default (or set the appropriate checkbox).

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.5: Printing and printer related settings 12.5.11: PRSTATLINE (Print status line with print-screen yes/no)

Page: 14

Changes made to individual, interactively defined printers are saved in the registry. 12.5.11: PRSTATLINE (Print status line with print-screen yes/no) PRSTATLINE NO_PRSTATLINE The default is PRSTATLINE, which means 'Print Status Line'. When you use F2 to print the current screen, any status line that may be on the screen will be printed. If, for whatever reason, you would like to omit this line, use NO_PRSTATLINE, which will suppress the status line when printing. The setting can be changed for the current session only in setup. 12.5.12: PRBLACKWHITE (Force black & white printing) PRBLACKWHITE NO_PRBLACKWHITE Default: NO_PRBLACKWHITE. IVT can use Windows printers in graphics mode to produce very nice-looking screen prints and reports. The capabilities and defaults settings for these printers are obtained from Windows when IVT starts up. By default, IVT will use the color capabilities of the printer when possible, but for very colorful screens this can result in the background being printed in (say) dark blue, eating a lot of expensive toner or ink. When you specify PRBLACKWHITE, IVT will only print the text on the screen in black, and not print any background colors for the basic text on the screen. Even when you redefine the "black" and "white" using GUI_RGB, IVT will still select real black and real white. This attribute can also be set (and saved) for individual printers in this setup screen, the PRBLACKWHITE sets the default for all printers. See also PRINTER and PRTIMEOUT. 12.5.13: PRINTER_FONT_SCALE (Adjust font to fit paper) PRINTER_FONT_SCALE NO_PRINTER_FONT_SCALE Default: PRINTER_FONT_SCALE. When IVT sends data to a real printer (not a file or other simulated printer) it will by default try to make the printout fit on a single sheet of paper. The first thing it tries is to use the AUTOLANDSCAPE feature (to choose landscape or portrait orientation depending on the current size of the paper and the current size of the IVT window). When a print screen still does not fit on a single sheet of paper (or the AUTOLANDSCAPE feature is disabled), IVT will attempt to scale the font down t make the printout fit a single sheet of paper exactly. Under normal circumstances this works very well - even large screens can be scaled to fit an A4 sheet of paper and produce a very legible result. This is why this feature is turned on by default. However, it works best when: - The dimensions of the IVT window roughly match the dimensions of the paper; - The font used on the printer is a TrueType font that can be scaled to any size in both dimensions; IVT will scale the font down horizontally (narrower) or vertically (lower) or both to make it fit. This can produce an ugly effect depending on circumstances. In that case, you can use NO_PRINTER_FONT_SCALE and IVT will simply use the font set by PRINTER_FONT. This may result in truncated lines, a single print screen requiring more than a single page, or both. The PRINTER_FONT_SCALE in an IVT.RC file governs the default for ALL printers that are detected by IVT. You can change the setting for a single printer by going into setup->printers and change the "Font scaling" feature there for a selected printer (see here). When you save the setup, any such modification to a printer is saved as well. See also AUTOLANDSCAPE and PRINTER_FONT.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.5: Printing and printer related settings 12.5.14: PRTIMEOUT (Auto flush printer after N seconds) 12.5.14: PRTIMEOUT (Auto flush printer after N seconds) PRTIMEOUT seconds PRTIMEOUT 0 NO_PRTIMEOUT

Page: 14

When IVT opens a printer, this will (by default) be your standard Windows printer. This will usually be a network printer. When such a device is opened, the network printer will start queuing your data to a file and will not actually print anything until the connection is closed. Only then, the print data is considered complete and the printer will start printing banner pages and your data and so on. IVT is a VT220 emulator. A VT220 has a port on the back that you can connect a physical printer to. When data is sent out the port, it is printed immediately since the printer cannot be shared by multiple terminals. So, when data has to be printed, IVT opens the printer port and starts sendin data. The problem is now: when to close that port? If you want to record the entire session to a printer, closing should not occur until the session itself is terminated. If you use a program like privt, you want printing to start as soon as the last character is received. Up until version 12.2a of IVT, closing the printer was solely possible by explicitly typing F3-F (flush printer) or by terminating the session. New in version 12.2a is the PRTIMEOUT. This sets a default inactivity timeout for all printers in IVT. When a printer is open and no new data is sent to it for the specified timeout period (defaults to 10 seconds), the printer is closed automatically. The PRINTER directive has been enhanced to allow different values for each printer (with a default of the PRTIMEOUT value). From version 16.4, you can modify this value in setup and the change can be saved in the registry. Specifying a PRTIMEOUT value of zero will give you the old behaviour of an infinite time - you'll have to use the F3-F keys to explicitly force a close. A neater way to set the timeout value to zero is to use NO_PRTIMEOUT. printer only. 12.5.15: TIMESTAMP_PRSCREEN (Timestamp print screen output) TIMESTAMP_PRSCREEN NO_TIMESTAMP_PRSCREEN The default is NO_TIMESTAMP_PRSCREEN. When enabled, IVT will add a line to a copy of the screen that states the version of IVT, the current date and time. Added upon specific request for my dear colleague, John Eskes :-). This setting can also be changed from this setup screen, and is saved into the registry. 12.6.1: DCE32 (Enable/disable use of DCE32.DLL) DCE32 NO_DCE32 This enables or disables (NO_DCE32) the use of the Gradient DCE32.DLL. Sorry - not in this version of IVT. 12.7.1: Proxy overview A proxy server is a program that can connect to destinations that you cannot connect to directly yourself. So, instead of a direct connection, IVT contact the real destination, and data returned is sent back to IVT. To the user, the process is (almost) transparant - it seems as if the remote host can be reached directly. The proxy server can be used to give controlled access to the network behind the proxy server - it can decide to deny access. Proxy servers come in different flavours (protocols). SOCK-4 and SOCK-5 are common, but some servers are simply a TELNET program that you have to send a sadard TELNET "connect" command. Some are transparant (once th connection is established, all data is passed through), others inspect the data for some commands like the ^] character that usually gives a TELNET program a means of escape.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.7: Proxy related settings 12.7.1: Proxy overview

Page: 14

IVT supports various types of proxy server. The topics below show how to configure IVT to use a proxy for all, or only certain types, of connections. The IVT distribution also comes with the (Unix) source of a SOCKS-4 proxy server program that can work with OpenSSH and IVT. See socks4FW. This program can also be used to forward TCP and UDP connections. See this advanced example to configure proxy servers very flexibly. 12.7.2: PROXY_DEBUG (Turn debug on/off for proxy operations) PROXY_DEBUG NO_PROXY_DEBUG When you use the a proxy to setup your connections, you can turn this on to troubleshoot (or generally keep an eye on) the progress of the proxy connections. The debug messages will appear on-screen and look like: PROXY: SOCKS5: Connection to proxy.server.com established. The messages will be about connections, negotiations, problems and successes of getting a connection established through a proxy server. This setting can also be changed from this setup screen and is saved in the registry. This setting is per session, so a script can modify if it wants to, using a PRECONNECT or ONCONNECT script. See also "Proxy setup". 12.7.3: PROXY_DNS (Name resolution when using a proxy) PROXY_DNS NO PROXY_DNS AUTO PROXY_DNS YES Default: AUTO. If you are using a proxy to access a private network, it can make a differenc whether DNS name resolution is performed by IVT itself (on the client machine or performed by the proxy. The 'DNS lookup at proxy end' configuration option allows you to control this If you set it to PROXY_DNS NO, IVT will always do its own DNS, and will try t is passed to the proxy server, so it can have a go at resolving it. If you set PROXY_DNS YES, IVT will always pass host names straight to the proxy without trying to look them up first. If you set this option to Auto (the default), IVT will do something it considers appropriate for each type of proxy. Telnet, HTTP, SOCKS5 and Script proxies will have host names passed straight to them; SOCKS4 proxies will not Note that if you are doing DNS at the proxy, you should make sure that your proxy exclusion settings (see PROXY_EXCLUDE) do not depend on knowing the IP address of a host. If the name is passed on to the proxy without IVT looking it up, IVT will never know the IP address and cannot check it against your list. The original SOCKS-4 protocol does not support proxy-side DNS. There is a protocol extension (SOCKS 4A) which does support it, but not all SOCKS 4 servers provide this extension. If you enable proxy DNS and your SOCKS 4 server cannot deal with it, this might be why. IVT comes with a SOCKS-4A proxy server in the distribution: socks4FW. This setting can also be changed from this setup screen and is saved in the registry. This setting is per session, so a script can modify if it wants to, using a PRECONNECT script. See also "Proxy setup" and socks4FW. 12.7.4: PROXY_EXCLUDE (Which hosts NOT to proxy) PROXY_EXCLUDE pattern... Typically you will only need to use a proxy to connect to non-local parts of your network; for example, your proxy might be required for connections outside your company's internal network. In the 'Exclude Hosts/IPs' box you can enter ranges of IP addresses, or ranges of DNS names, for which IVT

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.7: Proxy related settings 12.7.4: PROXY_EXCLUDE (Which hosts NOT to proxy) will avoid using the proxy and make a direct connection instead.

Page: 14

The 'Exclude Hosts/IPs' argument may contain more than one exclusion range, separated by commas. Each range can be an IP address or a DNS name, with a * character allowing wildcards. For example: PROXY_EXCLUDE "*.example.com" This excludes any host with a name ending in .example.com from proxying. PROXY_EXCLUDE "192.168.88.*" This excludes any host with an IP address starting with 192.168.88 from proxying. PROXY_EXCLUDE "192.168.88.*,*.example.com" This excludes both of the above ranges at once. Note that the best way to disable proxying for a particular connection is to set: PROXY_TYPE NONE Using a PRECONNECT script, for example. Connections to the local host (the host name localhost, and any loopback IP address) are never proxied, even if the proxy exclude list does not explicitly contain them. It is very unlikely that this behaviour would ever cause problems, but if it does, you can change it by enabling PROXY_LOCAL. Note that if you are doing DNS at the proxy, you should make sure that your proxy exclusion settings do not depend on knowing the IP address of a host. If the name is passed on to the proxy without IVT looking it up, it will never know the IP address and cannot check it against your list. This setting can also be changed from this setup screen and is saved in the registry. This setting is per session, so a script can modify if it wants to, using a PRECONNECT or ONCONNECT script. See also "Proxy setup". 12.7.5: PROXY_HOSTNAME (Hostname/port of the proxy server) PROXY_HOSTNAME "hostname:port" Use this to specify a machine to use as proxy server. The "hostname" part must specify the name or IP-address of the server that is running the proxy service. The "port" part must the number of the port that the server must be accessed on to provide the proper proxying service. IVT supports various proxy protocols, see PROXY_TYPE for details. Some commonly used ports are: HTTP: 80, 8080 or 3128. SOCKS5: 1080 TELNET: 23 This setting can also be changed from this setup screen and is saved in the registry. See also "Proxy setup". 12.7.6: PROXY_TIMEOUT (Maximum time for proxy operations) PROXY_TIMEOUT seconds See proxy for a discussion of proxying connections. The default value for this is 15 seconds, zero sets an infinite timeout. The value specifies how many seconds IVT will allow to pass for a connection to be established through a proxy server. The time includes connecting to the proxy server, authentication to the server, sending the request to contact th actual host the user wants to talk to and receiving a confirmation or error. When the limit is exceeded before success or failure is reported, IVT aborts the connection (a diagnostic message will be displayed). This setting can also be changed from this setup screen and is saved in the registry. See also "Proxy setup".

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.7: Proxy related settings 12.7.7: PROXY_LOCAL (Use proxy for local addresses yes/no)

Page: 14

12.7.7: PROXY_LOCAL (Use proxy for local addresses yes/no) PROXY_LOCAL NO_PROXY_LOCAL The default is NO_PROXY_LOCAL. See proxy for a discussion of proxying connections. Connections to the local host (the host name localhost, and any loopback IP address) are never proxied, even if the proxy exclude list does not explicitly contain them. It is very unlikely that this behaviour would ever cause problems, but if it does you can change it by enabling this setting. When set, IVT will ALWAYS use the proxy for a connection. This can make a difference when the host you connect to checks the address of the incoming connection, which will normally be the PC IVT runs on, but in this case it will be the address of the proxy server. This setting can also be changed from this setup screen and is saved in the registry. See also "Proxy setup". 12.7.8: PROXY_TELNET_CMD (Command string for a TELNET proxy server) PROXY_TELNET_CMD "string expression" A TELNET proxy is a very simple type of proxy server. It is usually implemented by actually running the telnet program on the proxy host, and a client sends a "connect HOSTNAME PORT" type of command that will cause the telnet proxy to establish the connection to the actual destination host. So, the default for this is: PROXY_TELNET_CMD "connect \$HOSTNAME_ONLY \$HOSTNAME_PORT\n" See the special variables $HOSTNAME_ONLY and $HOSTNAME_PORT for details, but are trying to establish. The \n appends a new line to the command. Make sure you know what you are doing when you change this setting. Also, note there is a proxy type called IVT-SCRIPT, which allows you to write a sort of chat-script in the IVT scripting language to deal with any sort of proxy that converses in ASCII lines. See also $IVT_PROXY_USER and $IVT_PROXY_PASSWORD. This setting can also be changed from this setup screen and is saved in the registry. See also "Proxy setup". 12.7.9: PROXY_TYPE (Type of proxy server) PROXY_TYPE PROXY_TYPE PROXY_TYPE PROXY_TYPE PROXY_TYPE PROXY_TYPE NONE HTTP SOCKS-4 SOCKS-5 TELNET IVT-SCRIPT

The 'Proxy type' command allows you to configure what type of proxy you want IVT to use for its network connections. The default setting is 'NONE'; in this mode no proxy is used for any connection. Any other setting also requires that you at least set the PROXY_HOSTNAME. - Selecting NONE turns proxying off. - Selecting 'HTTP' allows you to proxy your connections through a web server supporting the HTTP CONNECT command, as documented in RFC 2817. - Selecting 'SOCKS-4' or 'SOCKS-5' allows you to proxy your connections through a SOCKS server. SOCKS-5 is a more extensive protocol. - Many firewalls implement a less formal type of proxy in which a user can make a Telnet connection directly to the firewall machine and enter a command such as "connect myhost.com 22" to connect through to an external host. Selecting TELNET allows you to tell IVT to use this type of proxy. The string can reference any IVT script variable. Use $IVT_PROXY_USER and $IVT_PROXY_PASSWORD to refer to the currently configured proxy username and password. - IVT-SCRIPT is a more flexible form of the TELNET proxy. You have to specify which script to call using the PROXY_SCRIPT command. IVT will connect to th

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.7: Proxy related settings 12.7.9: PROXY_TYPE (Type of proxy server)

Page: 14

proxy address, then start the IVT script. The script can use WAIT and SEND to interact in any way with the proxy server until it finds that is either connected to the actual destination or it encounters a failure. The return code of the script must be zero to indicate success, anything else for failure. The script can access all other IVT special variables and can access the configured proxy username and password using the QUERYSETTING function for PROXY_USER and PROXY_PASSWORD. Alternatively, it can use $IVT_PROXY_USER and $IVT_PROXY_PASSWORD. The original connection is not considered "established" until the script ends. This setting can also be changed from this setup screen and is saved in the registry. This setting is per session, so a script can modify if it wants to, using a PRECONNECT script. See also "Proxy setup". 12.7.10: PROXY_USER/PASSWORD (Login credentials for proxy server) PROXY_USER username PROXY_PASSWORD password If your proxy requires authentication, you can specify a username and a password with these commands. Note that these commands accept plain text passwords only! Also note that if you save your session, the proxy password will be saved in plain text, so anyone who can access your IVT configuration data will be able to discover it. Authentication is not fully supported for all forms of proxy: - Username and password authentication is supported for HTTP proxies and SOCKS-5 proxies. - With SOCKS-5, authentication is via CHAP if the proxy supports it; otherwise the password is sent to the proxy in plain text. - With HTTP proxying, the only currently supported authentication method is 'basic', where the password is sent to the proxy in plain text. - SOCKS 4 can use the 'Username' field, but does not support passwords. - The TELNET type proxy can access the username and password through the special variables $IVT_PROXY_USER and $IVT_PROXY_PASSWORD. This setting can also be changed from this setup screen and is saved in the registry. This setting is per session, so a script can modify if it wants to, using a PRECONNECT or ONCONNECT script. See also "Proxy setup". 12.7.11: PROXY_SCRIPT (IVT script to handle proxy) PROXY_SCRIPT scriptname See PROXY_TYPE, type IVT-SCRIPT. The script must be the name of a script you will have to write yourself. It cannot take any parameters and should handle the interaction with the prox server. A return code of zero indicates success, anything else is an error. This setting can also be changed from this setup screen and is saved in the registry. The field is only available when the selected PROXY_TYPE is IVT-SCRIPT. See the special variables $HOSTNAME_ONLY and $HOSTNAME_PORT for details, and also $IVT_PROXY_USER and $IVT_PROXY_PASSWORD. This setting is per session, so a script can modify if it wants to, using a PRECONNECT script. See also "Proxy setup". 12.8.1: TELNET_KEEPALIVE (Set keep alive interval) TELNET_KEEPALIVE seconds This option only applies to TELNET sessions. You can specify a number of seconds between 0 and 3600. A value of zero turns this feature off (and is the default).

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.8: Telnet settings 12.8.1: TELNET_KEEPALIVE (Set keep alive interval)

Page: 15

When enabled, IVT will transmit a TELNET NOP (no-operation) command on every TELNET session, every specified number of seconds. This should prevent the session from timing out, if you have a server somewhere that disconnects afte a time of inactivity. However, not all hosts and devices seem to honour this. Also, since the no-operation does not generate any user-data, an application (such as the Unix shell) may still timeout because it sees no user activity. For such cases, see this keep alive example, which sends SPACE-BACKSPACE ever so often, which is meant to be a no-operation. The setting can also be changed from this setup-screen and is saved in the registry. 12.8.2: TELNET_NEWENV (Enable/disable NEWENV RFC 1572) TELNET_NEWENV NO_TELNET_NEWENV The default for this is NO_TELNET_NEWENV, and this will cause IVT to claim ignorance concerning RFC 1572, the "New environment" option of the TELNET protocol. This part of the protocol is a bit of a mess; the first environment implementations had various problems so a replacement option was introduced in RFC 1572. Some hosts still have serious problems when a client starts to use this option, which is why IVT disables it by default. When it is enabled, IVT will answer queries from the host to send the environment with the new format. It will also reply WONT to requests for the old style environment Furthermore, the default value can be changed on a per session basis. This allows you to have a PRECONNECT script that changes the value for hosts that cannot handle the default. It can also be set from this setup screen. 12.8.3: TELNET_TRACE (Enable/disable telnet trace) TELNET_TRACE NO_TELNET_TRACE When you cannot login to a host, or cannot work "normally" with that host, it may be worthwhile to turn TELNET_TRACE on. This will show, on screen, what options the host requests and what IVT responds with. This may be used to gain insight into the TELNET protocol. All RFC-numbers are named in the trace. You need to know about the TELNET protocol to be able to understand the output. This option can be toggled (for the next session) from the setup screen. Furthermore, the default value can be changed on a per session basis. This allows you to have a PRECONNECT script that changes the value for hosts that you want to trace, without getting debug in every new session. 12.8.4: TELNET_NEGOTIATE (Offer extra options to host) TELNET_NEGOTIATE NO_TELNET_NEGOTIATE Default: TELNET_NEGOTIATE. When a telnet session is established, the host and IVT usually exchange a flurry of options (WILL this, DO that, WONT do this, DONT do that). When this option is on (default), IVT will send a bunch of options it would like to see enabled after it sees the first TELNET option of the host (which means that if you TELNET to a non-telnet port you won't get any telnetspecific negotiations). IVT will try: Suppress Go Ahead (always tried, see below). New environment (when enabled by TELNET_NEWENV). Send location (when enabled by TELNET_LOCATION). Send X-display location (when enabled by TELNET_XDISPLAY). Send window size. Report status.

The idea behind this is that broken implementations of telnet servers might forget to negotiate some options and can be mended this way. session data was received. In version 17.0d this has changed to be the very FIRST thing after receiving a telnet option from the host. The change was required to support mainframes properly, which simply refuse negotiation of telnet options after the actual session has started. Especially the SGA (Suppress Go Ahead) option caused a problem - when IVT has not negotiated to turn Go Ahead off, it is required to send a GA command (which is slow, and

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.8: Telnet settings 12.8.4: TELNET_NEGOTIATE (Offer extra options to host)

Page: 15

the mainframe does not recognize the telnet command and echoes it, making garbage characters appear). With NO_TELNET_NEGOTIATE in effect, the SGA option is the only one IVT will try. When the host insists on the exchange of Go Ahead commands, IVT will comply, of course. This setting can also be changed per session (so you can use it in a script and set it depending on the host you are connecting to). It can also be changed from this setup screen and is saved into the registry. 12.8.5: TELNET_TTYPE (Set TELNET terminal types) TELNET_TTYPE name[,name...] This TELNET option is described in RFC 1091. A host can request if the TELNET terminal supports this option. IVT will return a "WILL". The protocol supports a number of different terminal names. If the host does not support a particular name, it will ask for the next name in the list. When the terminal (IVT, in this case) has exhausted the list of names, it repeats itself. The host should detect this and pick the best type. Some hosts are buggy - if they don't like any of the names, they keep asking over and over again, and IVT replies the same (bad) names over and over again To protect against this, IVT will stop this game when the same name is about to be transmitted for the THIRD time. It will send a TELNET_TTYPE WONT once, and then stop responding to this query altogether (for the current session only, of course). A Unix host will make the selected type the TERM environment variable. You should set this to ivt whenever possible, but this requires that the host you connect to knows about the IVT terminal type (see terminfo and the ivt.tic file supplied in the distribution). The default for the TELNET_TTYPE is "ivt,vt220,vt100,vt52". It can be changed from this setup screen, as well. When the TELNET_TRACE command is used, the actual string transmitted will be displayed on the screen as well. In other words, you can use this setting in an attempt to set the TERM environment variable. However, "Your Mileage May Vary" as some hosts perform intricate procedures to try and determine the type of terminal during logon. Usually, this involves sending enquiry strings to the terminal. Many hosts get this wrong - when you have a TELNET connection and the terminal type is already specified, enquiry commands should be avoided because they are fraugh with problems. The TELNET protocol is much more reliable. If you are stuck with hosts that DO use enquiry commands to figure out the type of the connected terminal, see also the IDENTIFY command that you can us to specify the IVT response to such an enquiry. You can also change the value for this variable from this setup screen. Furthermore, the default value can be changed on a per session basis. This allows you to have a PRECONNECT script that changes the value for hosts that cannot handle the default. 12.8.6: TELNET_TSPEED (Set TELNET terminal speed) TELNET_TSPEED "string expression" A telnet host can request the transmit and receive speeds of the terminal according to RFC 1079. IVT implements this RFC. When this statement is used in an IVT.RC file, IVT will respond with a WILL when the host requests this feature. When the statement is NOT used, the response will be a WONT. When the host requests the speed, whatever was specified will be transmitted, unless the specified string is too large (90 bytes) in which case it will default to "9600,9600". According to the RFC, the argument must specify two numbers separated by a single comma. No spaces, leading zeroes or extra characters are allowed. The first number is the transmit speed, the second the receive speed. Example: TELNET_TSPEED "9600,38400" What the host will do with this info is up to that host. Low values will probably make the host less verbose. The RFC states: Many systems will only allow certain discrete terminal speeds You can also change the value for this variable from this setup screen.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.8: Telnet settings 12.8.7: TELNET_VAR (Set TELNET user variable)

Page: 15

Furthermore, the default value can be changed on a per session basis. This allows you to have a PRECONNECT script that changes the value for hosts that cannot handle the default. 12.8.7: TELNET_VAR (Set TELNET user variable) TELNET_VAR name "string expression" RFC 1408 describes a TELNET option whereby the host can request a number of variables to be transmitted by the remote (IVT) end of the connection. This can be an environment variable or a user variable. The host can request ALL variables of a certain type to be sent. The statement: TELNET_VAR NICEVAR "NICE VALUE" will set the user-defined variable NICEVAR to the value "NICE VALUE". You can define as many variables as you like. What the host does with a value is up to the host. Documentation on the possible variable names, their values and their effects should be available from the TELNET documentation of the host you connect to. It does not seem to be supported by many hosts, though. 12.8.8: TELNET_LOCATION (Set TELNET location) TELNET_LOCATION "string expression" This is a sort of specialised TELNET_VAR case. The host can request the location of your terminal using RFC 946. When you have specified a value for the location like: TELNET_LOCATION "Room B204, main building" then IVT will respond "WILL" when the host requests support for this RFC. When no location is specified, IVT will respond with a "WONT". What the host does with this information, is up to the host. It could put it in a "Who is logged in" list; use it on banner pages when printing output, etc. Not many hosts seem to either want it or use it, though. The default value can be changed on a per session basis. This allows you to have a PRECONNECT script that changes the value for hosts that cannot handle the default. 12.8.9: TELNET_XDISPLAY (Pass X-display location) TELNET_XDISPLAY displayname The TELNET protocol allows you to pass the address of your X-windows server to the remote location. IVT will use the $IVT_NETW_HOST value to initialise this. Normally, this should work, unless the name resolving is not set up properly and the host you telnet into cannot find you by name. In that case, have a look at the TELNET_XDISP_IP option, which will generate an XDISPLAY setting based on the absolute IP-address. If this does not work for you, consider something along the lines of: TELNET_XDISPLAY "$IVT_NETW_IP_ADDR:0" or TELNET_XDISPLAY truenameofmyPC.my.domain:0 or TELNET_XDISPLAY 1.2.3.4:0 The host may not support this option. Note that if your default display is NOT "0", you will HAVE to use a manual TELNET_XDISPLAY to set the proper name of your X-display. Also note the setting of FORWARD_X: when that is set to AUTO, IVT will see if you have an X-server running. If you don't, no DISPLAY location is transmitte to the host. Use FORWARD_X FORCE if that case. This global value can also be set from this setup screen. See also TELNET_XDISP_IP. NOTE: When you use kerberized telnet, and your kerberized telnet server supports a draft RFC to secure X, see FORWARD_X for a better way of using a local X server. In that case, it is best to use a: TELNET_XDISPLAY displayname

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.8: Telnet settings 12.8.10: TELNET_XDISPLAY "" to force IVT NOT to send a plain DISPLAY value to the host, 12.8.10: TELNET_XDISPLAY "" TELNET_XDISP_IP NO_TELNET_XDISP_IP

Page: 15

IVT will, during start-up, determine the hostname and IP-address of the PC it runs on (see $IVT_NETW_HOST and $IVT_NETW_IP_ADDR). Based on the values it finds there, it will set the value of TELNET_XDISPLAY. This is useful if you Unix environment is set correctly. However, environments do exist where the host DNS setup is such that it canno translate the name of your PC back to the correct IP-address. In that case, of your PC. The TELNET_XDISP_IP directive does this automatically, it will use the value of $IVT_NETW_IP_ADDR or $IVT_NETW_HOST as appropriate. You can also change this in this setup screen. Note that when you use this option, any explicitly set value for TELNET_XDISPLAY is lost. 12.9.1: BAUD (Set baud rate for serial connection) BAUD speed This sets the speed for a serial connection. The default baud rate is 19200. Valid values for speed are 110, 300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 56000, 57600, 112000 and 115200, 12800 and 256000. If you specify another speed, IVT will try to use that. Results will vary depending in the actual device you use. This setting can also be changed from setup. See BAUD, PARITY, COMPORT, CARRIERSTATUS, DBITS, SBITS, CTSRTS, FLOWREMOTE, FLOWLOCAL, SR_DSR and RING for control over other serial settings. 12.9.2: CARRIERSTATUS (Serial status line indicator on/off) CARRIERSTATUS NO_CARRIERSTATUS For serial connections only. Default: CARRIERSTATUS. Show a red, blinking C in status-line when Carrier Detect is not asserted. NO_CARRIERSTATUS means that no indicator will be shown when the carrier is missing. On by default. See Carrier Detect for an explanation of this signal. This signal is very handy to monitor the connection status for modem dialups. Some modems always leave carrier off, which can make the blinking annoying, which is why you can turn it off. This setting can also be changed from setup. See BAUD, PARITY, COMPORT, CARRIERSTATUS, DBITS, SBITS, CTSRTS, FLOWREMOTE, FLOWLOCAL, SR_DSR and RING for control over other serial settings. 12.9.3: COMPORT (Set hardware addresses and interrupt levels) COMPORT Number Address IRQ environments. It is ignored in this version of IVT. See BAUD, PARITY, COMPORT, CARRIERSTATUS, DBITS, SBITS, CTSRTS, FLOWREMOTE, FLOWLOCAL, SR_DSR and RING for control over other serial settings. 12.9.4: CTSRTS (Turn serial hardware handshake on/off) CTSRTS NO_CTSRTS Serial sessions only. CTS/RTS protocol ON (CTSRTS) or off (NO_CTSRTS) for serial connections. When turned on, this will cause hardware flow-control on the serial connection. This will only work properly if the other end of the serial connection is also set up to use hardware flow control and the physical

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.9: Serial communications 12.9.4: CTSRTS (Turn serial hardware handshake on/off) connection (cable) is correct.

Page: 15

This setting can also be changed from setup. See BAUD, PARITY, COMPORT, CARRIERSTATUS, DBITS, SBITS, CTSRTS, FLOWREMOTE, FLOWLOCAL, SR_DSR and RING for control over other serial settings. 12.9.5: DBITS (Set number of data bits for serial lines) DBITS 7 DBITS 8 Set number of data bits to use for a serial connection. The default number of data bits is 8. Valid values are 7 and 8. This setting can also be changed from setup. See BAUD, PARITY, COMPORT, CARRIERSTATUS, DBITS, SBITS, CTSRTS, FLOWREMOTE, FLOWLOCAL, SR_DSR and RING for control over other serial settings. 12.9.6: FLOWLOCAL/FLOWREMOTE (Set flow control on serial lines) FLOWLOCAL NO_FLOWLOCAL FLOWREMOTE NO_FLOWREMOTE This is for serial lines only. FLOWLOCAL means IVT can be stopped using the XON/XOFF protocol. When NO_FLOWLOCAL is activated, the XON/XOFF characters are treated as any other character. FLOWREMOTE means the remote host can be controlled with XON/XOFF characters and IVT will send those character when the host is transmitting data faster than IVT can handle it. This method of flow control is less reliable than hardware flow control (see CTSRTS) but that requires a serial cable with the proper wires. The setting is changed (automatically) for file-transfers, where true binary transmission is required. This setting can also be changed from setup. See BAUD, PARITY, COMPORT, CARRIERSTATUS, DBITS, SBITS, CTSRTS, FLOWREMOTE, FLOWLOCAL, SR_DSR and RING for control over other serial settings.

PARITY type Parity to use on a serial connection. A parity bit counts the number of 1 bit in a byte, giving a kind of error-check. Why you should want to do this is unclear, since there is no way to correct any transmission error and the overhead involved is significant (1 bit extra for every 8 bits of data is 12.5% overhead). Any transmission error will show up on the screen anyway. The type can be one of: None Odd Even Space Mark No parity bit set. This is the default. It avoids the overhead. Force odd parity. Parity-bit is 1 when number of 1-bits is odd. Force even parity. Parity bit is 1 when number of 1-bits is even. Generate a parity bit that is always set to zero. Generate a parity bit that is always set to 1.

This setting can also be changed from setup. See BAUD, PARITY, COMPORT, CARRIERSTATUS, DBITS, SBITS, CTSRTS, FLOWREMOTE, FLOWLOCAL, SR_DSR and RING for control over other serial settings. 12.9.8: RING (Use PC-speaker as phone-ringer for serial lines) RING NO_RING This applies to serial sessions only. Default: RING. Rings PC-bell when modem rings (or not, when NO_RING). If there is no phone connected to your modem, this allows you to hear an incoming call. Proper operation depends on the cable between your PC and your modem. The serial signal called 'Ring Indicator' (RI) is monitored for this. This setting can also be changed from setup.

IVT User Manual, Version 23.0 12: Syntax of IVT.RC setup files 12.9: Serial communications 12.9.9: SBITS (Set number of stop bits for serial lines)

Page: 15

See BAUD, PARITY, COMPORT, CARRIERSTATUS, DBITS, SBITS, CTSRTS, FLOWREMOTE, FLOWLOCAL, SR_DSR and RING for control over other serial settings. 12.9.9: SBITS (Set number of stop bits for serial lines) SBITS 1 SBITS 2 Set number of stop bits to use for a serial connection. Default: 1. The stop bits indicate the length of the pause before the next character is transmitted over a serial line. This gives the host a bit of a breathing spac which allows it to process the character. Your host must be pretty awful old if it needs two stop bits. This setting can also be changed from setup. See BAUD, PARITY, COMPORT, CARRIERSTATUS, DBITS, SBITS, CTSRTS, FLOWREMOTE, FLOWLOCAL, SR_DSR and RING for control over other serial settings. 12.9.10: SR_DSR (Serial Data Set Ready control) SR_DSR (default) NO_SR_DSR This command controls what IVT does in response to the raising/lowering of the Data Set Ready signal of a serial device. The default is SR_DSR, which implies that IVT will not send characters to a device that is apparently turned off (DSR is not asserted). When you specify NO_SR_DSR, IVT will ignore the current state of the DSR signal and send data to the device regardless. Also, the modem indicator will not show a blinking red M, which normally indicates that the modem is turned off. This setting can also be changed from this setup screen. It is also saved in the registry. See BAUD, PARITY, COMPORT, CARRIERSTATUS, DBITS, SBITS, CTSRTS, FLOWREMOTE, FLOWLOCAL, SR_DSR and RING for control over other serial settings.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.1: Introduction to the IVT SCRIPT language This is an important feature, others are prev/next 13: The SCRIPT language 13.1: Introduction to the IVT SCRIPT language See global syntax for a global description of scripts.

Page: 15

Scripts can be defined in IVT.RC files and can be executed either as part of a session CREATE statement (used by -A or -a command line option) or bound to keys using the BIND <keyname> SCRIPT command in an IVT.RC file. Scripts can be triggered by PRECONNECT and ONCONNECT statements to control how sessions are established. Scripts can also be called as a result of a mouse action. An ONDISCONNECT script can be used when the session disappears. See also the SHUTDOWN and DESTROY scripts. An IVT.RC file can contain STARTUP scripts that are executed before the first session is established. Lastly, they can be manually invoked from the F4-X screen. Scripts are one of the most powerful features of IVT. They can SEND data on sessions, WAIT for particular responses and conditionally execute code throug IF statements. The language has functions (with parameters), global variables (accessible by all sessions), normal variables (for the current session only), and local variables (for the current invocation of a function only). Scripts can be recursive, and all sessions can execute scripts independently and simultaneously (even instances of the same script in different sessions). It even supports background processing in the form of THREADs, of which several can execute simultaneously per session. These can be managed with FORK, KILL, TRAP and IGNCHILDREN. A script can do SLEEPs (seconds) or USLEEPs (milliseconds), can set timers with TIMEOUT, block with PAUSE and take over the keyboard using ONKEY. It can display things on the screen simply by using ECHO, or more complex (escape sequences) using VTECHO. A script can also modify almost all IVT.RC settings (either globally using the GLOBAL keyword, or for the current session only). The STARTUP script can only set GLOBAL IVT.RC settings. The VOLATILE keyword can be used to indicate that a modification made by a script should NOT be saved into the registry, even when it modifies the current settings of a session (see also COLORVOLATILE). The combination of all this allows a very flexible configuration of IVT. Using a CREATEGRP statement to combine a set of CREATE statements you can automatically create a whole bunch of sessions when IVT starts up. Each CREAT statement can specify the name of a SCRIPT (including parameters) which can be used to perform automatic login to all hosts that you connect to. See this example as a way to get started. Click on one to get more detail, or read through the examples, each keyword there is a link to the appropriate chapter in this manual. See global syntax for a global description of scripts. These are all the valid keywords in a script: BATCHMODE BEEP BREAK CALL CANCEL CAPTURE CLS COMMENTIGNORE CONTINUE CSET DELSCRIPT DESCR DETACH DIALOG DISPLAY DO DRAWBOX ECHO_LIT ECHO ENDSESSION EXIT FOR FORALL FOREVER GLOBAL GOTO_OPT GOTO GSET HELP HIDE IF IGNCHILDREN IGNOREESCAPE KEYBOARD KILL LABEL LOCAL LSET MENU NEXT ONKEY ONSEND PAUSE POPUP PUSHBACK RETURN SCREEN SCRIPTDEBUG SECRET SEND_KEYB SEND SENDNULL SETDTR SETPOS SHAREMODE SLEEP STATUSHOST STATUSTXT STATUSTXTFIX SWITCHTO TIMEOUT TRAP UNSET UNTIL USLEEP VOLATILE VTECHO WAIT WAITCARRIER WAITIDLE WHILE WIN_MAXIMIZE WIN_MINIMIZE WIN_SHOW WINDOW YIELD

There are a number of built-in functions (see LSET). IVT supports 2 different ways of using the built-in functions. The old syntax used a very simple parser that only had a simple sequence of words, no nesting, and no complex expressions. Also the LSET keyword was required for every assign. Example: LSET x SUBSTR "$var" 0 1# Take first character LSET x UPPER $x# Make it upper case LSET y SUBSTR $var 1 -1# Takes rest of string LSET y LOWER $y# make lower case

IVT User Manual, Version 23.0 13: The SCRIPT language 13.1: Introduction to the IVT SCRIPT language LSET x "$x$y"# Combine the 2 parts

Page: 15

Would be required to get a version of $var into $x with the first character i upper case and the rest in lower case. The new language allows a rewrite like: x = Concat(Upper(Substr($var,0,1)),Lower(Substr($var,1,-1))); I.e. nested expressions, '=' for assign, a new CONCAT function to concatenate strings, semi-colon (optional) to terminate an expression and so on. The manual uses the new (more powerful) syntax in all examples, but the older syntax remains supported so existing scripts continue to function as before. You are, however, urged to update your scripts to the new syntax. For example the new syntax uses 64-bit integer arithmetic, the old one is limited to 32-bit numbers, among the numerous other advantages... Having said that, the list of existing functions is: ABS BROWSEFILE CALL CHDIR CLOSE COLORATTRIBUTE COMPUTE CONCAT COPYFILE CREAT CRYPTFL CRYPTFLPWD CURSOR_COL CURSOR_ROW DECRYPTFL DEFINED DIALOGADDEVENT DIALOGEND DIALOGEVENT DIALOGQUERY ERROR EXISTS EXPAND FILE_RECEIVE FILE_SEND FINDFILES FINDWINDOW FLASHWINDOW FORK FROMASCII FULLSCR GETCURDIR GETFULLNAME GETLONGNAME GETSHORTNAME GETUSERNAME HOLDSESSION IDENTIFIERAS INSTR ISDIR IVTFUNCTION LENGTH LOWER LSEEK LTRIM MATCH MKDIR MYERRORCOUNT MYSESSID MYSESSNR NRSESSIONS OPEN PLAYSOUND PROMPT QUERYSETTING RAND READLN READRC REGCREATEKEY REGDELETEKEY REGDELETEVALUE REGQUERYDWORD REGQUERYENUM REGQUERYSTR REGSETVALUEDWORD REGSETVALUESTR REMOVE RENAME REPLACE RESOLVENAME RIGHTSTR RMDIR RTRIM SCREENATTR SCREENTXT SCROLLBACKLINES SETICON SETTABICON SETTABTEXT SHELLEXECUTE SNDMSG SOPEN SPLIT SPRINTF SQRT SRAND STAT STRICMP STRSTR SUBSTR SYSTEM THREAD TIME TOASCII TRIM UNLINK UPPER VARDEF VLINES WAITTHREAD WINDOW_ATTR WINEXISTS WRITE

From a script, most IVT.RC commands can be invoked which will only change the setting for the current session. There are a few exceptions, which are related to initial start-up and things that cannot be changed without severe repercussions. When you try to use one of those, you will therefore get an error message. 13.2: Global syntax of a script A script is defined (in an IVT.RC file) with the following syntax: SCRIPT[_REDEFINE] name [params] statement statement ... END The normal SCRIPT defines a script, and will cause a fatal error when a script by that name already exists. The SCRIPT_REDEFINE silently deletes any previous definition of a script and replaces it with the current version. There can be only ONE statement per logical line. By ending a line in a \, you can have line continuation. Keywords are case-insensitive. Variable-names ARE case-sensitive, however! Parameters are optional. If you specify them, each invocation of this script are passed, the others will be the empty string. When too many are passed, the extra ones are ignored. Parameter values behave as LOCAL variables. See also LSET for setting variables belonging to the current session (or script invocation, or THREAD) and GSET for global variables that are visible in all sessions. The END keyword marks the end of the SCRIPT. Definitions of scripts cannot be nested. Any line that starts with a # as the first non-blank is treated as comment. Also, any line may end in a comment (everything after the first # is ignored,

IVT User Manual, Version 23.0 13: The SCRIPT language 13.3: Using strings and numbers in scripts except, of course, when that # is part of a statement). See here for a list of valid statements. 13.3: Using strings and numbers in scripts Strings can be take on the following forms in IVT scripts:

Page: 15

- Just a single word. Examples: x = thisisastring y = 1 In this case, there is no need to protect the string with quotes. Note that, since IVT variables are type-less, numeric strings are still strings and are only interpreted as numbers by IF and COMPUTE. See also IdentifierAs, to change this behaviour. - A string protected by double quotes so it can contain spaces and special characters. Examples: x = "This is a string, too\r" x = "thisisastring" y = "1" Note that there is no difference whatsoever between y=1 and y="1". The following special characters are recognized by IVT: \rCarriage return \nNew line \tTab \bBackspace \aAlarm (bell character) \xyWhere x and y are both hexadecimal digits. \$Is a plain dollar sign. Prevents variable substitution. \\ Is a single backslash. \? Where ? is any character is left alone. So \d is a backslash followed by a d (useful when building filenames). - Just a single reference to a variable: x = $y This is a simple assignment of the contents of y to x. - Reference to variables in quoted strings. Examples: x = $y x = "$password\r" y = "${password}s\r" That is, every time a $ is encountered in a quoted string, the reference to the variable is substituted by the current contents of that variable. To isolate the name of the variable from the other parts of the string you may use the form ${name}. If you want to prevent this substitution, you must escape the $ with a \. Example: nm = "\$var" Will assign the string $var to variable nm. See also EXPAND for a way to force expansion of variables in strings. This can be used to build dynamic variables and arrays. See the examples section for numerous examples of strings. Numbers can also be used in expressions in various formats. Internally, IVT uses 64-bit signed integers for all numeric values. Supported formats are: - Hexadecimal numbers. These start with a 0x prefix and can contain upper or lower case digits, as in: 0x10, 0xBeef, 0xFFFF. - Octal numbers. These start with a zero and contain only octal (0-7) digits, as in 0666. - Decimal numbers. Plain normal decimal numbers. All numeric formats can be preceded by an optional minus sign to indicate a negative value. 13.4: Using expressions in scripts The LSET and GSET statements accept more complex expressions than simple strings - IVT has many built-in function calls. These can be used to manipulate strings in a number of ways, to perform calculations etc. Also, an expression can use parentheses, logical AND (&&), logical OR (||) an so on. Older versions of IVT did not have a very powerful syntax for

IVT User Manual, Version 23.0 13: The SCRIPT language 13.4: Using expressions in scripts

Page: 15

expressions and built-in functions. Version 21 and later supports complex, nested expressions and built-in functions with a different syntax. One of the most powerful possibilities is the ability to CALL other functions and assign the result of a RETURN statement. To keep IVT small and fast, there is NO support for complex data types. There are no floats or doubles, but only integers (64-bit) and strings. There are no arrays, but one of the features is that the name of an assigned variable (in CSET, LSET and GSET) may be a reference to another variable and there is the EXPAND function to indirectly reference variables. For example: i = 1;# Assign 1 to $i nm = "Name_$i";# Assign Name_1 to $nm $nm = "Test";# Assign "Test" to $Name_1 ... nm = "Name_$i";# Build name again val = expand("\$$nm");# Assign "Test" to $val By changing the value of $i in the example above (in a loop), you can build arrays of values, indexed by $i. By using several index values (Name_$i_$j) you can even build multi-dimensional arrays. As an example, look at this modem dialer that makes use of these features to manipulate a phone-book. Each entry in the phonebook has several attributes. Creation and destruction of the variables is handled automatically by IVT. The UNSET statement can be used to delete variables explicitly. See variables explained for further details. The TYPE of variables is implicit. Normally, everything is a string, except when IF does a compare. When both strings represent decimal numbers, they are compared numerically. Otherwise, a string compare is performed. When you do arithmetic o variables, the numerical value is used. See here for an alphabetical list of functions. Example of a script: Test = "Testing 1 2 3"; Offset = 0; WHILE (X = SUBSTR($Test,$Offset,1)) != "" Echo "Part $Offset of string is $X\n" Offset = $Offset + 1; NEXT Child = FORK("ND3995")# Create session to host IF $Child != 0 THEN Echo "I am parent session\n" : RETURN Echo "\t\tI am newly born\n\n" WAIT CASE_INSENSITIVE "login:" The complete list of operators that can be used in an expression are: - Numbers. These can be decimal, octal (start with a leading 0) or hexadecimal (start with 0x. - Strings. Anything between double quotes. Special characters are interpreted in strings, and variable references are expanded. - Variables. A reference to a variable is preceded by a $, and the name of the variable can be surrounded by curly brackets. Examples: $x $LongerName ${LongerName} - Parentheses. These can be used to group expressions to make sure they are evaluated in the desired order, and/or to make expressions more readable. Example: 2 + (5 * 3) - The NOT operator (!). The ! operator negates the value of the following expression: x = !($a == $b || $c == $d) - Comparison operators. IVT supports the normal comparisons: ==Equality !=Inequality >Greater than <Less than >=Greater than or equal to <=Less than or equal to

IVT User Manual, Version 23.0 13: The SCRIPT language 13.4: Using expressions in scripts

Page: 16

IVT will do a NUMERICAL comparison when both operands are numbers, and will do a STRING comparison (case sensitive) when either of the operands is a string. Use quotes around operands when you want to force a string comparison. Use LOWER or STRICMP to implement case-insensitive string compares. - Numerical operators. The normal +, -, / and * with the normal precedence are supported. The % operator is used for modulus operations (remainder). Division by zero (or modulus of zero) will give a runtime error. Extra are the << (shift to left) and >> (shift to right) bitwise operators, and the | (bitwise OR) and & (bitwise AND) operators. - Boolean operators. The && is used for logical AND, the || is used for logical OR. Operands are evaluated only when necessary, so in an AND expression the second operand is not evaluated when the first evaluates to FALSE, and in a OR operation the second operand is not evaluated when the first one is TRUE - Conditional expression. Taken from C: expression1 ? expression2 : expression3 Expression 1 is evaluated. When TRUE, expression 2 is evaluated and becomes the result. When FALSE, expression 3 is evaluated and becomes the result. Example: x = ($a > $b || $c != 0x25) ? 0 : $x + 1 The parentheses are used for readability only. Expressions can be freely combined and grouped to arbitrarily complex things. 13.5: The STARTUP script This is one very special kind of script. Whenever IVT finds a script in an IVT.RC file called STARTUP (case insensitive) it will call it (no parameters) as soon as the END statement is read. Subsequently, the script is DISCARDED so you can never CALL it explicitly from another script. This means that you can have SEVERAL scripts called STARTUP, so if you have a complex setup with an IVT.RC file per user, each user can have a personal STARTUP script (see INCLUDE_OPT). Like with PRECONNECT, IVT cannot proceed until the STARTUP script terminates. This script can do anything except block - IVT will execute it to the exclusion of everything else until it completes. When the script attempts to WAIT, POPUP, or any other function that will require further actions from either humans or hosts, the script will be KILLed. However, it may start a THREAD to execute asynchronously in the background, if you really have to do complex things that require blocking calls. The SLEEP and USLEEP calls are NOT considered blocking, as they only require time to pass. However, using long sleeps will cause IVT to seemingly hang... Also, these scripts are called before the first session is established, so there is nothing to send, yet. When you use IVT.RC statements in a script (to conditionally set certain global IVT characteristics) there is a final exception: all such statements are automatically preceded by an implied GLOBAL statement (since it is pointless to change local session characteristics without a session). See also VOLATILE and COLORVOLATILE.. You can use these STARTUP scripts to set global variables and overrule the default values of the special variables. Note: Since the STARTUP script is executed as soon as the END statement is seen, everything you CALL in the STARTUP script must have been defined prior to the STARTUP script. All other scripts are called only after all files have been read completely, and then the order in which scripts have been defined does not matter. If you attempt to CALL a script defined after the STARTUP, you'll get a "Script not found" error! 13.6: SHUTDOWN and DESTROY scripts Like STARTUP, a script called SHUTDOWN or DESTROY is called automatically by IVT. The DESTROY script is called when a session is about to be terminated. The session may or may not be still usable, that depends on what side disconnecte first (if you use ALT+F4 to terminate a session, DESTROY is called before the network connection is terminated, if the host disconnects, the session is gone already). All variables still exist, the script can use these. The SHUTDOWN script is called when IVT is about to exit. No sessions exist. The names of the script MUST be in upper case. The script cannot do a blockin action (it must return quickly) and will be KILLed if it tries.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.6: SHUTDOWN and DESTROY scripts See also ONDISCONNECT and ONCONNECT.

Page: 16

You would typically use this in combination with SNDMSG to send notifications of stopping/starting IVT and/or sessions. 13.7: Using variables in scripts Using the LSET (for variables local to a session) and GSET (for globals) statements, you can define your own string variables. These values can be used inside strings for ECHO, IF, SEND etc. statements. See "Using strings in scripts". A variable is referenced inside a string by prefixing the name with a $-sign. Variables come in several flavours. Whenever a variable value is needed, the list of existing variables is searched in the following order: - LOCAL variables. These are defined by a LOCAL statement in a script. They come into existence when the script is invoked, and disappear when the script RETURNs (recursion is supported). LOCAL variables are initialised to empty strings. Another way to create LOCAL variables is dynamically using CSET, see that section for an example. - PARAMETER variables. The scope is the same as LOCAL variables, but the actual value is passed in a CALL statement or function. - Session variables. These are created by an LSET or '=' statement and are local to the current session. Since several instances of the same script ca run in parallel on behalf of different sessions (e.g. as a result of a CREATEGRP statement) it is best to use '=' as the default way of creating variables. You can, of course, use LSET (or '=') on parameter and local values, too. - Global variables. They are created by a GSET statement, and visible in all sessions. You do not often need these, but complex scripts sometimes want t pass information between sessions, or set global IVT defaults for ALL sessions. - Environment variables. When a name starts with ENV_ and all above methods to find a value have failed, the environment is searched for the variable. Thus, $ENV_PATH is the value of the PATH environment variable. There is no way to set (export) environment variables. If you assign a valu to an IVT variable with a name that starts with ENV_ no special action is taken, so you won't be able to access the environment variable with the sam name until you UNSET the IVT variable. message is issued. Use the VARDEF function to determine beforehand whether a variable exists or not. Some variables are predefined by IVT. Most are for reference only. The curren list is shown below (click on any one for more information): $ANYCHAR_HEX $ANYCHAR $AUTOLOGIN $COLS $DFLT_USER $DFLTPROTOCOL $ERRNO $FORALLTYPE $HOSTLIST_DESCR $HOSTLIST_EXTRA $HOSTNAME_ONLY $HOSTNAME_PORT $HOSTNAME $HOSTPROMPT $IVT_APPDATA $IVT_CREATE_SESSION $IVT_DIALOGS $IVT_DROP_0 $IVT_DROP_COUNT $IVT_DROP_N $IVT_ERR_LEVEL $IVT_ERR_NR $IVT_ERR_STR $IVT_FUNC_ERRNO $IVT_GROUP_COUNT $IVT_GROUP_NAME $IVT_IP_ADDR $IVT_IP_CANON $IVT_IP_FQN $IVT_IS_REMOTE $IVT_NETW_DNS $IVT_NETW_DOMAIN $IVT_NETW_HOST $IVT_NETW_IP_ADDR $IVT_PANEL_CREATE $IVT_PROXY_PASSWORD $IVT_PROXY_USER $IVT_REGISTRY_BASE $IVT_REPEATNR $IVT_SM_CLEANBOOT $IVT_SM_CXFULLSCREEN $IVT_SM_CXSCREEN $IVT_SM_CYFULLSCREEN $IVT_SM_CYSCREEN $IVT_SM_MOUSEPRESENT $IVT_SM_NETWORK $IVT_SM_SECURE $IVT_STATUS_DATETIME $IVT_URL_STARTUP $IVTBUILDNR $IVTDIR $IVTDOWNLOAD $IVTPID $IvtPwdCfgLearn $IVTTMPDIR $IVTUPLOAD $IVTVERSION $MOUSE_BUTTON $MOUSE_COL $MOUSE_ROW $MOUSE_WHEEL_DELTA $ONKEYN1 $ONKEYN2 $ONKEYS1 $ONKEYS2 $ONSEND_DATA $ORIGINAL_HOSTNAME $ORIGINAL_USER $PID $PPID $PROTOCOL_SESSION $PROTOCOL $ROWS $STATUSTXT $URLUSER $USER $WAIT_IN $WAIT_VARIABLE $WAITPID $ZMODEM_AUTO

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.1: Variable AUTOLOGIN: User wants auto-login yes/no 13.8: List of all IVT defined SCRIPT variables 13.8.1: Variable AUTOLOGIN: User wants auto-login yes/no $AUTOLOGIN

Page: 16

Indicates that the session should attempt to log the user in automatically. Set Set Set Set Set Set Set to to to to to to to 1 when session is created from the command line and -n option not used 0 when session is created from the command line and -n option is used. 1 when session is created with Ctrl+PgDown. 0 when session is created with Ctrl+PgUp. 1 when session is created with a CREATE statement. 0 when session is reconnected. the value indicated by the "Automatic login" checkbox.

IVT knows many ways to automate the creation of sessions and logging in to the host (see session management, $HOSTNAME, $USER, PRECONNECT and ONCONNECT, CREATEGRP and CREATE). Sometimes, the user does not want to have an automatic login, but wants to connect to a host that has PRECONNECT and/or ONCONNECT scripts defined. As the power of sorts of tricks normally have a users and hosts IVT grew, I found myself using ONCONNECT statements for all after initial login (setting up proper environment). I also setup with LogMeIn to perform automatic login under most that I normally use.

However, once in a while I want all these scripts turned off for a single session. In that case, I create a session with Ctrl+PgUp rather than the normal Ctrl+PgDown. The ONLY difference is that the AUTOLOGIN variable is set to FALSE (0). The ONCONNECT script tests for this and allows me to logon manually. IVT itself does nothing special, it is all up to the scripts. and the result will be the same as Ctrl+PgDown. The variable is also set for the first session. Its value depends on the use of the -n command line flag. For CREATE statements, the AUTOLOGIN value is set to 1. When the NO_RECONNECT statement is used, and a session is lost, IVT will automatically reconnect to the same host. In this case, $AUTOLOGIN will also be set to zero to allow you to log on as a different user. 13.8.2: Variable ANYCHAR: Character found by WAIT ANYCHAR $ANYCHAR This local variable is created by the WAIT ANYCHAR statement. This WAIT will match any character, and if the script wants to know the value of the character it can use this variable. Example: FOREVER WAIT ANYCHAR IF $ANYCHAR >= "0" && $ANYCHAR < "9" \ THEN ... Decimal digit received ... NEXT See also $ANYCHAR_HEX, if you want to test for NULL and/or control characters. See also FROMASCII. 13.8.3: Variable ANYCHAR_HEX: Character found by WAIT ANYCHAR $ANYCHAR_HEX This local variable is created by the WAIT ANYCHAR statement. This WAIT will match any character, and if the script wants to know the value of the character it can use this variable. The $ANYCHAR variable holds the STRING form of the received character, the ANYCHAR_HEX variable holds the hexadecimal representation of the same character. This variable is for the special case of NULL characters, since the $ANYCHAR variable will be the empt string in this case. Also, it is a convenient way to test for special control characters. See also FROMASCII and TOASCII.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.4: Variable COLS: Number of columns on the current session

Page: 16

13.8.4: Variable COLS: Number of columns on the current session $COLS This local variable identifies the number of columns of the current session. It is automatically updated whenever the window size is changed, either by using this setup-screen or by the host sending an escape sequence that changes the width of the screen, or by the user changing the window size. A VT220 terminal can also change between 80 and 132 columns when the host sends these escape sequences. See also WINDOW_SIZE, and the $ROWS variable. See also ONRESIZE. 13.8.5: Variable DFLTPROTOCOL: Default protocol. $DFLTPROTOCOL This GLOBAL variable is set upon start-up of IVT. All compiled-in protocols are tested to see if they are available at runtime. IVT will try to pick the "best" protocol to use by default. The $DFLTPROTOCOL will contain a string like the one you can specify in the PROTOCOL statement. The list of built-in protocols depends on the version of IVT you use. Free versions do not have SSH and Kerberos. A STARTUP script might be used to overrule this, but you can also use an OPTIONS statement or (best) a PROTOCOL statement. protocol. Afterwards, you can use the setup screen to change the default. Of course, you can also choose a different protocol using the command line. See also the $PROTOCOL variable, which gives the current protocol. See also the $PROTOCOL_SESSION variable, which gives the current session protocol. 13.8.6: Variable DFLT_USER: Default user $DFLT_USER This global value holds whatever the user has typed in the "User name:" text field in the initial session creation dialog. This can be extremely handy in a situation where you want to define a CREATE statement for a variable user: CREATE "myhost $DFLT_USER" R=3 means the user can (must) choose the user-id used for the 3 sessions. See also $USER, which is a per-session (local) variable. 13.8.7: Variable ERRNO: Operating system error number $ERRNO This local variable is set after calling functions like CREAT or OPEN, and all other IVT function that directly or indirectly call some Windows operating system function. When these functions indicate failure, the reason for the failure can be foun in $ERRNO. Meanings for the values van be found on MSDN. See also ONERROR, which allows trapping of errors in IVT. See also MYERRORCOUNT. 13.8.8: Variable FORALLTYPE: Type of current variable $FORALLTYPE A FORALL statement loops through variables, giving the name of matching variables. The TYPE of the current variable is stored in $FORALLTYPE and is: LOCAL : A local variable (really LOCAL, or a parameter) SESSION: Local to the current session GLOBAL : Set with GSET. See also "Variables explained". For an example of use, see FORALL.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.9: Variable HOSTNAME: Name of the host 13.8.9: Variable HOSTNAME: Name of the host $HOSTNAME

Page: 16

This is the name of the host IVT is going to connect to (or is connected to). This variable can be used in various ways. When IVT wants to create a session to a host it will initially set this statement in effect for THAT host. When either an explicit match is found or a "PRECONNECT *" is in effect, IVT will call the specified script before an attempt is made to contact the host. The PRECONNECT script can ALTER the HOSTNAME if it wants to. This allows you to have nicknames, shorthand names, redirections, etc. The original name can come from the "Create session" panel, from the command line, from a CREATEGRP, form a FORK and so on... Mind the port number: HOSTNAME will be of form name:port when the port is NOT the default port for the connection you are trying to establish. parts. For example, I use this in an environment where there is no DNS server, the HOSTS file on my WinNT PC is not writable for me, and thus all host are reachable only via their numeric IP addresses. Most hosts I want to use are all on the same subnet and I don't want to type things like "10.8.60.28" all the time, so I use: Script STARTUP GSET HOSTPROMPT = "The 10.8.60 subnet is added automatically!\n" END PRECONNECT * DoSubNet SCRIPT DoSubNet IF Length($HOSTNAME) > 3 || !Match("[0-9]*",$HOSTNAME) THEN RETURN STATUSTXTFIX "Aplabu$HOSTNAME" HOSTNAME = "10.8.60.$HOSTNAME" END When I type a short name (max 3 digits, the last part of the IP-address) this will be prepended automatically with the default subnet. The actual name of the host is also displayed on the status line (an alternative would have been to write my own HOSTS file and use a RESOLVE statement to refer to it). After any PRECONNECT script has been called, IVT will actually connect to the host. If that succeeds, it will call any ONCONNECT script that has been defined. This script can reference the $HOSTNAME variable to find out what host it is being called for. The ONCONNECT can do automatic logon if it wants to. For this, it can reference the $USER and $AUTOLOGIN variables. The bit with the STARTUP script causes the prompt for a new session to be changed. When the $HOSTPROMPT variable exists, it is displayed whenever the user is prompted for a hostname. This should tell the user what features are available. See also $ORIGINAL_HOSTNAME. 13.8.10: Variable HOSTNAME_ONLY: Hostname without the port number $HOSTNAME_ONLY The variable $HOSTNAME contains the complete hostname when IVT is trying to establish a connection. When you connect to the default port for the protocol you are trying to use (23 for telnet or 22 for SSH), the hostname will be jus the name. When you connect to a non-standard port, the hostname will be of th form name:port. Example: rohan.snipweg.wxs.nl:2323 when a connection is made to the telnet server on host rohan.snipweg.wxs.nl o port 2323. In this case the $HOSTNAME_ONLY will contain just the hostname part (rohan.snipweg.wxs.nl), the $HOSTNAME_PORT will contain the port part (2323). This can be convenient in scripts, and is necessary for the telnet proxy type Of course, you also use string manipulation routines such as StrStr and Conca to change one into the other. See also $ORIGINAL_HOSTNAME.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.11: Variable HOSTNAME_PORT: Port number part of the hostname

Page: 16

13.8.11: Variable HOSTNAME_PORT: Port number part of the hostname $HOSTNAME_PORT This is the port number of the current connection. Only valid for TCP/IP connections. Usually this will be 22 for SSH and 23 TELNET, but when you connect to different ports this will be the port actually used for the connection. See $HOSTNAME_ONLY for further details. See also $ORIGINAL_HOSTNAME.

$HOSTPROMPT GSET HOSTPROMPT = "Friendly text goes here" Whenever IVT prompts you for the name of a host (and user), it checks to see if the $HOSTPROMPT variable is defined. If it is, it will be displayed as part of the create session dialog box. The string can use special characters to get bold, reverse etc. video, see ECHO for a description. The purpose is to clarify to the user what extra possibilities are implemente with clever ONCONNECT and/or PRECONNECT statements. See here for an example. 13.8.13: Variable HOSTLIST_DESCR (description from HOSTLIST) $HOSTLIST_DESCR When you use the HOSTLIST feature to provide the user a list of hosts to choose from, you can specify a description for each of those hosts. When a selection is made from that list, the description is copied to this HOSTLIST_DESCR variable to be used (for example) as part of an ONCONNECT or PRECONNECT script to set the session comment or session title bar. The standard login script that comes with IVT uses this to set a comment in the status bar. See also the $HOSTLIST_EXTRA variable, especially the list there of places where this variable is set. See also the $HOSTNAME and $DFLT_USER variables. The standard script "Edit local address book" on the "Scripts" menu of IVT allows you to create a host list without using a text editor. 13.8.14: Variable HOSTLIST_EXTRA (hidden info from HOSTLIST) $HOSTLIST_EXTRA When you use the EXTRA="string" option of the HOSTLIST command, it allows you to specify extra data associated for the host or connection. It can contain any data of any length. When the user selects the host entry, the data is copied to this variable to be used by PRECONNECT or ONCONNECT scripts in any way you want. Good purposes for this would be a modem dialer to dial the number of a host on a modem, or an AUTOLOG statement to use it to generate th name of the proper log file. Or to set a PROXY connection for this host. IVT attaches no special meaning to the data or the variable, script will have to define the meaning. This variable is set even when you do not use the address book to select the host to connect to. For example: - Typing a hostname in the Create Session dialog; - Typing a hostname on the command line; - Using the host in a create session group defined in a file; - Using the host in an interactively defined session group. In other words, the EXTRA data is considered to "belong" to the host, and every time IVT connects to that host, it sets the data. See this advanced example that makes use of that property. See also $HOSTLIST_DESCR. 13.8.15: Variable IVT_DROP_COUNT: Number of dropped files. $IVT_DROP_COUNT - Number of dropped files $IVT_DROP_0 - Name of the first dropped file. $IVT_DROP_N - Name of the last dropped file ($IVT_DROP_COUNT - 1). These variables are valid only when used in a script called as result of

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.15: Variable IVT_DROP_COUNT: Number of dropped files.

Page: 16

an ONDROPFILES statement. When the user drags & drops files on the main IVT window, the script is called in the context of the current foreground session The IVT_DROP_COUNT variable holds the number of objects dropped on the window The first object is named in IVT_DROP_0, the next in IVT_DROP_1, etc. By default, IVT does not use an ONDROPFILES, so it is invalid to drop files o directories on IVT. However, the script in the standard DISTRIBUTIONS of IVT wil attempt to ZMODEM the file to the current host, and even copy whole directory structures accross when you drop a directory on IVT. See the ONDROPFILES documentation for details and examples. 13.8.16: Variable IVT_GROUP_COUNT: Number of sessions in a group $IVT_GROUP_COUNT When a CREATEGRP is used to create a group of sessions in one go, there can be an optional script associated with the group. Before that script is started, the $IVT_GROUP_COUNT is set to the total number of sessions in the group about to be created. This takes repeat-factors (R=x) in every CREATE statement into account. It can be used by the script to arrange special settings for the next $IVT_GROUP_COUNT sessions. NOTE: When a broken group is fixed, this variable will contain the number of sessions that is missing and needs to be recreated. See also $IVT_GROUP_NAME. See also CREATEGRP, CREATE and CREATEPROT. See also MERCY_MODE. 13.8.17: Variable IVT_GROUP_NAME: Name of group being created $IVT_GROUP_NAME When a CREATEGRP is used to create a group of sessions in one go, every session being created gets this local variable, with the name of the group. When the default group is being created, this variable is empty (the default group is the first, unnamed group in an IVT.RC file, started with the -A command line option). When a session is created that is NOT part of a group, this variable does not exist (see VARDEF to test the difference). See also $IVT_GROUP_COUNT. See also CREATEGRP, CREATE and CREATEPROT. 13.8.18: Variable IVT_IP_ADDR: IP address of session $IVT_IP_ADDR When IVT establishes a TCP/IP session, the name resolver will translate any given hostname to a numeric IP address (see also RESOLVE and RESOLVE_TRACE). As soon as the address is known, IVT sets the session variable IVT_IP_ADDR to the dotted-decimal string (like 193.79.171.60). When the connection is using IPv6, this variable will contain the hexadecimal IPv6 address (like 2001:610:600:7d7::4). It can be used in ONCONNECT scripts and so on, or perhaps you want to show it in the status line using STATUSTXT, or in the TITLEBAR. NOTE: This variable cannot be used in PRECONNECT scripts, since those can be used to overrule the $HOSTNAME variable to redirect connections. So, the IP address is determined AFTER all PRECONNECT scripts have finished and BEFORE the ONCONNECT scripts start. See also $IVT_NETW_HOST and $IVT_NETW_IP_ADDR. See also $IVT_IP_FQN. 13.8.19: Variable IVT_IP_CANON: Canonical name of host $IVT_IP_CANON When IVT resolves a name into an IPv4 or IPv6 address, Windows may return a "Canonical name" for the given host. When such a name is given, it is stored in this $IVT_IP_CANON variable. See also $IVT_IP_FQN, $IVT_IP_ADDR and $IVT_NETW_HOST.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.20: Variable IVT_IP_FQN: Host name after resolving 13.8.20: Variable IVT_IP_FQN: Host name after resolving $IVT_IP_FQN

Page: 16

When IVT establishes a TCP/IP session, the name resolver will translate any given hostname to a numeric IP address (see also RESOLVE and RESOLVE_TRACE). When the DOMAIN statement is used, it will also try each name as typed with each domain name appended. When any attempt to translate a name is successful IVT will set this variable to the Fully Qualified Name (FQN) of the host. So, this variable can be empty when no domain is known. Scripts can use this variable to determine the domain of the destination, or to show it to the user using STATUSTXT or TITLEBAR (or just ECHO it to the screen). See also $IVT_NETW_HOST, $IVT_NETW_IP_ADDR and $IVT_IP_CANON. 13.8.21: Variable IVT_NETW_HOST: PC hostname $IVT_NETW_HOST When IVT starts up it determines the name of the machine it runs on (using th gethostname() function). The result of that query is stored in this variable. Normally, this is the name of your PC as known to the outside world. It is the plain host name, no domain attached. See $IVT_NETW_DOMAIN. Also, it is used to initialise the value of TELNET_XDISPLAY, so X-application started in a TELNET session should work automatically. A script might want to use this variable to arrange things differently depending on the host IVT runs on. See also $IVT_NETW_IP_ADDR and $IVT_IP_CANON. 13.8.22: Variable IVT_NETW_IP_ADDR: PC IP-address $IVT_NETW_IP_ADDR After the value of $IVT_NETW_HOST has been determined, IVT uses the standard call gethostbyname() to find the IP-address of the host IVT runs on. The result of that query is used to set this variable to the dotted-decimal address. You might use to initialise the TELNET_XDISPLAY to an absolute address rather than a name when the hosts you telnet into cannot lookup the proper name for the IP-address of your PC. 13.8.23: Variable IVT_NETW_DOMAIN: Name of the domain of the IVT PC $IVT_NETW_DOMAIN During start-up, IVT will attempt to find the name of the DNS domain to which the PC belongs. This is taken from the registry and does not seem to be 100% reliable. Differences between Windows versions (anything from Win95 to Win7) make this very hard. Anything after WinNT seems to work fine, though. See also $IVT_NETW_IP_ADDR and $IVT_NETW_DNS. 13.8.24: Variable IVT_NETW_DNS: Addresses of DNS servers $IVT_NETW_DNS During start-up, IVT will attempt to find the IP-addresses of the nameservers for the PC (if you have then in your setup). When successful, the value of this variable will be one or more (space separated) IP-addresses of the DNS name server(s). For IPv6 enabled PC's, the list will also include the IPv6 addresses of any external (non-local) configured DNS server. You can use this in a RESOLVE statement to query DNS using IVT's built-in resolver, so you can determine the order in which name sources are queried. See also $IVT_NETW_IP_ADDR and $IVT_NETW_DOMAIN. 13.8.25: Variable IVT_PROXY_PASSWORD: Proxy password $IVT_PROXY_USER $IVT_PROXY_PASSWORD Whenever you change the proxy configuration, IVT updates these two variables. They are meant to be used in either a proxy of type TELNET or IVT-SCRIPT.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.25: Variable IVT_PROXY_PASSWORD: Proxy password

Page: 16

send the username and/or password. There is a global variable set by IVT when you change the global proxy configuration, and a local one set when you change the configuration for the current session only. The upshot of that is that you can have one proxy for one (type of) connection and another for others without worrying about the resulting mix of configurations. Do not assign these variables directly, use the PROXY_USER and PROXY_PASSWORD statements. 13.8.26: Variable IVT_PROXY_USER: Proxy username $IVT_PROXY_USER See also $PROXY_PASSWORD. Set by using the PROXY_USER statement or using the proxy setup panel. 13.8.27: Variable IVT_REGISTRY_BASE: Name of IVT registry key $IVT_REGISTRY_BASE This variable contains the registry path of the main registry hive of IVT. It can be used with functions like RegQueryDword and other registry functions to query and modify the registry. the normal value of this variable is something like: \\Software\\BearStar\\IVT Intended to be used to store custom IVT related items into the registry. 13.8.28: Variable IVT_REPEATNR: Sequence number $IVT_REPEATNR When multiple sessions are will have its own instance that particular session (1 The auto-login system uses for every session. created in a single operation, each of the session of this variable, set to the sequence number for - N). this variable to generate a unique session comment

Your own ONCONNECT and PRECONNECT scripts might want to refer to this variabl to determine they are part of a repeat group. 13.8.29: Variable IVT_STATUS_DATETIME: Format of status line clock $IVT_STATUS_DATETIME Upon special request an extra DATETIME format was added to the status line clock. This does not only display the time, but also the date. The default fo that date and time is the (European) YYYY/MM/DD HH:MM:SS format. If you dislike that, this special $IVT_STATUS_DATETIME global variable can be set to specify a DATE format string to display arbitrary (date/time related) data in the status line. For example: GSET IVT_STATUS_DATETIME = "%m-%d-%Y day %j" Will produce something like: 01-24-2010 day 23 in the status line when STATMIDDLE DATETIME is used. See also TIME (the date option there). See also STATMIDDLE. 13.8.30: Variable IVT_URL_STARTUP: IVT started from a URL $IVT_URL_STARTUP IVT can be started from an URL, which will open a new (tabbed) session if an instance of IVT is already running, and will start a new instance of IVT if no existing instance can be found. In the latter case, the $IVT_URL_STARTUP global variable is set to the full URL text that caused IVT to start. This can be used by the rest of the startu procedure to determine the required configuration to support that URL. See also URL and $URLUSER.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.31: Variable IVTDOWN/UP/LOAD: IVT file transfer directory

Page: 16

13.8.31: Variable IVTDOWN/UP/LOAD: IVT file transfer directory $IVTDOWNLOAD $IVTUPLOAD These GLOBAL variables denote the exchange directories used by the file is ".", for the current directory. It is pointless to GSET this variable; use the DOWNLOAD command instead. It is meant to be used in scripts that do transfers using the FILE_RECEIVE and FILE_SEND commands. The $IVTUPLOAD variable is set only when an UPLOAD directory is specified. 13.8.32: Variable IVTDIR: IVT installation directory $IVTDIR This GLOBAL variable is set during start-up. IVT will determine the full pathname of the directory it finds itself in. It will examine its own name and the PATH environment variable if it has to. These HELP pages are actually stored inside the executable, so IVT.EXE has to be found and opened, or IVT will not function properly. $IVTDIR is set to the full pathname of the directory IVT lives in. It is very convenient to use the value of $IVTDIR as a base name for INCLUDE and/or INCLUDE_OPT statements. This allows you to move your configuration files around without having to change their contents. 13.8.33: Variable IVT_IS_REMOTE (IVT running in terminal services) $IVTIS_REMOTE This variable is normally 0 (FALSE), and only non-zero when IVT runs in a remote desktop session. See the MSDN documentation on SM_REMOTESESSION for more details. 13.8.34: Variable IVT_SM_... (Windows System Metrics) to scripts. They can be used to know a little more about the environment IVT runs on, to customize things like fonts and sizes and so on. The list below is a more ore less random selection from what Windows has on offer, if you require more, please mail to ivtsupport@softwarevoordelig.nl. The documentation below is copied from the MSDN information. $IVT_SM_CLEANBOOT Value that specifies how the system was started: 0 Normal boot. 1 Fail-safe boot. 2 Fail-safe with network boot. Fail-safe boot (also called SafeBoot) bypasses the user's start-up files. $IVT_SM_CXFULLSCREEN $IVT_SM_CYFULLSCREEN Width and height of the client area for a full-screen window on the primary display monitor. $IVT_SM_CXSCREEN $IVT_SM_CYSCREEN Width and height, in pixels, of the screen of the primary display monitor. $IVT_SM_NETWORK The least significant bit is set if a network is present; otherwise, it is cleared. The other bits are reserved for future use. $IVT_SM_MOUSEPRESENT TRUE (non-zero) if a mouse is installed; FALSE (zero) otherwise. $IVT_SM_SECURE TRUE (1) if security is present; FALSE (0) otherwise. Note that Microsoft does not specify WHERE the security is present :-)

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.35: Variable IVT_PANEL_CREATE (Interface mode) 13.8.35: Variable IVT_PANEL_CREATE (Interface mode) $IVT_PANEL_CREATE

Page: 17

This global variable is set to 1 when the panel-interface is in use, and to 0 when the old, simple prompt is in use, see CRDIALOG. See also QUERYSETTING. 13.8.36: Variable IVTPID (PID of IVT itself) $IVTPID This global variable holds the process-id of IVT as given by Windows. Typically used in combination with SNDMSG, it identifies the running process uniquely on the PC IVT runs on. 13.8.37: Variable IVT_APPDATA: Directory for user specific data $IVT_APPDATA The Windows APPDATA directory is intended to be used for application specific data (like the IVT addressbook, the wizard configuration settings, the password learning file with encrypted passwords and so on). Older versions of Windows normally used the IVT installation directory for this purpose ($IVTDIR). However, Windows 7 no longer allows this: when IVT is installed, all files and directories in the installation folder are write-protected. This forces applications to use a folder they CAN write to: APPDATA. Problem is, Windows 7 differs from Windows XP, which differs from Windows NT and so on and on. On modern Windows versions, $IVT_APPDATA will be equal to the standard Window environment variable %APPDATA% (which IVT can access as $ENV_APPDATA). On older versions of Windows where this is not available, IVT will determine a typical home directory for the user (based on HOMEDRIVE and HOMEPATH enviroment variables). If that fails too, it will fall back on $IVTDIR. Some of the standard scripts in IVT use $IVT_APPDATA to locate user specific files. Your scripts can do that, too. 13.8.38: Variable IVT_CREATE_SESSION: Create Session is active $IVT_CREATE_SESSION This global variable is set to 1 when the "Create Session" panel is active. It is empty or 0 when there is no such panel active. It can be used by scripts that require a current, active session that are for example started from the custom "Scripts" menu bar entry (scripts that try to use SEND and WAIT will fail when there is no host connection). See also $IVT_DIALOGS. 13.8.39: Variable IVT_DIALOGS: Number of active dialogs $IVT_DIALOGS This local variable is only set when there are panels (dialogs) on the session screen. When the user is typing data into these dialogs, a script that is monitoring the keyboard may want to know whether the keys are intended for the host or not. When IVT_DIALOGS is non-empty, it will be a number indicating the number of such panels (setup creates multiple dialogs). Scripts may have other reasons to want to know the current state of IVT. See also QUERYSETTING. 13.8.40: Variable IVTTMPDIR: Work directory $IVTTMPDIR As one of the very first things during start-up, IVT will determine what directory should be used for temporary files (screen dumps, file printers, other IVT temporary files). It makes this value available to scripts as well. The algorithm is: - The value of the TMP environment variable if it exists;

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.40: Variable IVTTMPDIR: Work directory Else Else Else Else the value of the TEMP environment variable if that exists; %SystemDrive%\TMP if that directory exists; %SystemDrive%\TEMP if that directory exists; %SystemDrive%.

Page: 17

If the Windows environment variable SystemDrive does not exist, it defaults to "C:". If you want to, you can overrule the value of this variable in a STARTUP script.

$IVTVERSION $IVTBUILDNR These variables are set right at the very beginning of IVT start-up. IVTVERSION is the version number of IVT (something like 22.0a). I change the version number every time I send a version out into the world. by one. There can be different IVT.EXE's with the same IVTVERSION, but the IVTBUILDNR will always be different. You can use these variables to write scripts that use features introduced in a specific version of IVT and some PC's on your network are still running older versions of IVT. 13.8.42: Variables for MOUSE_KEY actions $MOUSE_COL $MOUSE_ROW $MOUSE_BUTTON $MOUSE_WHEEL_DELTA When a MOUSE_KEY statement is used, the mouse can be programmed to CALL a script. This script can use these variables to determine the state of the mouse. These variables only contain valid values while such a MOUSE_KEY CALL is being processed. The $MOUSE_COL and $MOUSE_ROW identify the position of the mouse. The $MOUSE_BUTTON is either 1 or 2 to indicate the left and right buttons. the distance the wheel has moved. A script can use this to make the mouse do things on the host. 13.8.43: Variable ONKEY?1/ONKEY?2: Code of keys during ONKEY $ONKEYN1 $ONKEYN2 $ONKEYS1 $ONKEYS2 These variables identify the key intercepted by an ONKEY statement. The N1 and N2 variables hold the NUMERIC representations of these keys, the S1 and S2 the STRING values. Every key on a PC keyboard is identified by 2 bytes. Alphanumeric keys are identified by the first byte (range 0 - 255), the second byte is zero for those keys. Function keys, ALT keys and combinations thereof are identified by the second byte (the FIRST byte is zero in this case). If you want to know the codes for a specific key, the easiest way is to use the keyboard debug feature of IVT (see this setup screen). When enabled, the screen will show the codes for every key you type. 13.8.44: Variable ONSEND_DATA: Data from ONSEND $ONSEND_DATA This variable identifies the data intercepted by an ONSEND statement. Every time the user causes data to be sent to the host, the trap is executed. This variable contains a single byte for simple keys and multiple bytes for cursor keys, function keys and so on. It is the actual byte-sequence destined for th host. You cannot modify the data, but you can prevent the data from being actually sent by not doing a PASS_SEND, and doing your own SEND instead.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.45: Variable ORIGINAL_HOSTNAME: Initial hostname and user The key broadcast script uses ONSEND to repeat data to all sessions.

Page: 17

13.8.45: Variable ORIGINAL_HOSTNAME: Initial hostname and user $ORIGINAL_HOSTNAME $ORIGINAL_USER These variables contain the original hostname and user of a session when it was created. The $HOSTNAME and $USER variables usually contain the same information, but a PRECONNECT script can change these to something else. The originals contain the name of the host as the user types them, and can be useful for displaying in a status bar or comment field. Usually, these variables will contain the name of the host as the user thinks of it, where $HOSTNAME will contain the translated, full technical name of th host. In simple environments, these are identical. In complex environments, it can be very handy to use these original values. 13.8.46: Variable ORIGINAL_USER: Initial user name $ORIGINAL_USER See $ORIGINAL_HOSTNAME 13.8.47: Variable PID: Process-ID of the current script or thread $PID When several sessions are started with the same script, the PID is what identifies one instance from another. The THREAD and FORK functions return the PID of the created thread. The WAITTHREAD can be used to wait on particular scripts; the KILL function can be used to terminate them. A script can use this to generate unique file names, for example. See also $PPID. 13.8.48: Variable PPID: Parent process-ID $PPID When a script starts another script in the background (with THREAD or FORK) the calling script becomes the parent of the created thread. When IVT itself creates processes, it assigns -1 to the $PPID variable. A parent can be notified of the death of its children, see IGNCHILDREN. See also $PID, THREAD, FORK and KILL. 13.8.49: Variable PROTOCOL: Protocol used for the current session $PROTOCOL This gives the transport protocol used for the current session. It can have the following values: "WinSock" "RS232 Serial" "NetBios" "IVT Multiplex" Windows sockets (TCP/IP) Serial connection. NetBios connections. Proprietary IVT multiplexing protocol.

You can use this in STARTUP scripts to prevent errors when a certain type of protocol is not currently available. See also PROTOCOL. See also $PROTOCOL_SESSION, for the session level protocol. See also ONERROR, which allows you to trap any kind of error. 13.8.50: Variable PROTOCOL_SESSION: Session level protocol $PROTOCOL_SESSION The $PROTOCOL variable identifies the transport (low-level) protocol. This variable identifies the protocol running on top of that, called the session protocol. Values can be: - TELNET (Telnet or Kerberized telnet). - SSH (Ssh-2 secure protocol).

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.50: Variable PROTOCOL_SESSION: Session level protocol - VTP (Virtual Terminal Protocol of Samba). - RLOGIN (Remote login protocol). - NONE (Raw protocol).

Page: 17

The NONE is common in combination with the SERIAL transport, TELNET, RLOGIN and SSH will usually run on top of WINSOCK and VTP on top of NetBios. You can set the protocol using a PROTOCOL statement. This can be used in scripts to decide which actions are necessary. For example, the password learning system uses this to distinguish between TELNET and SSH, which handle passwords fundamentally different. See also $PROTOCOL. 13.8.51: Variable ROWS: Number of rows of current session $ROWS This variable gives the number of lines on the current session. This includes any status line. The value of this variable is updated automatically whenever the Window size changes. See also $COLS. 13.8.52: Variable STATUSTXT: Status line comment $STATUSTXT This variable contains the current value of the status line comment field. This value is set by a CREATE statement, STATUSTXT command, STATUSTXTFIX command or manually from the F4-S screen. You cannot assign a value to this variable (will have no effect), use one of the commands above for this. See also COMMENTIGNORE. 13.8.53: Variable URLUSER: Default user for passed URL sessions GSET URLUSER = "username" This version of IVT can create sessions by passing an URL from an external source, which can be one of: A browser that follows a link of type ivt://hostname/statement;...; An external command that invokes IVT using the -u command line option; The user selecting arbitrary text on the screen and then typing F10; Using the "Convert clipboard to sessions" menu item in the "Edit" menu.

All of these methods try to extract some form of host name from the data that is passed to it, and create a session (or a whole bunch of sessions) to such hosts. However, it is often easier to select a bunch of hosts than it is to set the proper user name to use when logging in to those hosts. When no special action is taken, the user name for such sessions will be empt and the login system of IVT will select the default user (which can come from the address book, or using the default account for the specific host). When that ends up using the wrong name, the global URLUSER variable can be se has not resulted in a name. For example: ivt -u "ivt://somehost someuser/" ivt -u "ivt://somehost/USER=someuser" These are two valid ways to explicitly pass a specific user name, so URLUSER would not be used. But when the someuser part is omitted, URLUSER will be use to provide the user name. It should be set in one of your general setup files in a startup script. Note: The value is used after the last PRECONNECT script has been executed fo the session. This allows you to write your own logic to determine the user name to use. The URLUSER value is used only when all other means of getting a value have been tried. See also $USER.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.54: Variable USER: User name to use for login 13.8.54: Variable USER: User name to use for login $USER

Page: 17

The $USER variable is set at the same time as the $HOSTNAME variable (when a session is about to be created). Its value is the word typed on the "User:" line of the create session dialog. When you use a CREATE statement, you can also use a CREATE "HOSTNAME USER" format. Lastly, when you invoke IVT from the command line, you can use: IVT [options] hostname user IVT itself does not reference this variable. It is up to the PRECONNECT and ONCONNECT scripts to use (or alter) this variable. Its purpose is to allow the user to specify a username on the host and to perform automatic login as that user. See automatic login example. Note: When a TABSBAR is in use, the tab for the session can (optionally, but by default) contain the contents of the $USER variable. When the value is altered, the tab is automatically updated (see here for options). See also $URLUSER. 13.8.55: Variable WAIT_IN: Matched character after a WAIT IN $WAIT_IN When you use a WAIT IN "string", and a received character matched any of character in this LOCAL variable (see CSET). Example: WAIT IN "#>:\$%"# Possible prompt characters ECHO "Seen a prompt character: $WAIT_IN\n" See also $ANYCHAR. See alse the IN_UNIQUE clause of the WAIT statement. 13.8.56: Variable WAITPID: PID of terminated thread $WAITPID When you use a WAITTHREAD function to wait for the termination of a thread, that function returns the exit status of the process (thread) that terminated The $WAITPID variable will hold the PID of the terminated process (since WAITTHREAD can wait on several threads simultaneously). Example: Script ThreadExa para1 echo "I am thread $PID, parameter is $para1\n" RETURN 5 END Script Example LOCAL a, b; a = THREAD ThreadExa("Parameter one") b = THREAD ThreadExa("Parameter two") ECHO "Started threads $a and $b\n" FOREVER x = WaitThread() IF $x == -1 THEN BREAK echo "Thread $WAITPID returned $x\n" NEXT END This starts 2 threads (2 instances of the ThreadExa script). These threads run in parallel. Each thread prints its single parameter and exits. The main program prints the PIDs of both threads (a and b), then waits for al threads to exit (WAITTHREAD returns -1 in that case). A syntax like "WHILE (x = WAITTHREAD()) >= 0)" would have been nicer here, bu IVT does not allow a blocking statement (the WAITTHREAD function) to be used in a complex expression, hence the FOREVER and a test with a BREAK. See also this example for a use of these functions and variables.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.8: List of all IVT defined SCRIPT variables 13.8.57: Variable WAIT_VARIABLE: Name of assigned variable in WAIT

Page: 17

13.8.57: Variable WAIT_VARIABLE: Name of assigned variable in WAIT $WAIT_VARIABLE When you use the ASSIGN_VARIABLE clause in a WAIT statement, the WAIT will terminate when some script or thread assigns a value to the given variable. to this special variable, so your script can easily determine why the wait ended. Of course, you can also use a separate label for each ASSIGN_VARIABLE wait clause, so the WAIT will jump to different spots depending on which variable was assigned. 13.8.58: Variable ZMODEM_AUTO: Current state of ZMODEM_AUTO flag $ZMODEM_AUTO This flag is 0 when automatic ZMODEM recognition is off and 1 otherwise. It is automatically updated by the ZMODEM_AUTO statement. It is meant to be used by scripts using the FILE_RECEIVE and FILE_SEND commands to do file transfer. 13.9: SCRIPT statements 13.9.1: BATCHMODE (non-interactive session indicator) BATCHMODE on|off When a session is created under script control, interacts with a host, and disconnects automatically, the session is non-interactive (batch mode). Normally, IVT will issue an error when a session dies within 8 seconds withou any user input (to allow you to read any error messages before the session disappears). When you use BATCHMODE on, this error is suppressed. Also, interactive popups (from various error conditions) will not appear, because they require user interaction and the assumption is that no human operator will be present. Various other popups are suppressed and a default action is taken instead. See IVT See See See See See also from also also also also also command line variable-assigns to pass information into other programs. WIN_MINIMIZE, to make such runs of IVT less obtrusive. GUI_ONTOP , to make such runs of IVT more obtrusive. NO_EXPLICIT_EXIT, to exit from IVT automatically. GUI_CLOSE to prevent users from terminating sessions. ENDSESSION and EXIT.

In the future, other subtle differences may be governed by this statement. See also ONERROR, which allows you to trap any kind of error. 13.9.2: BEEP (Perform the BELL function) BEEP This performs the 'bell' function. When called by a script running in the background, this will cause a muffled beep to sound and the activity indicato to light up with a red background. For a foreground session it will cause a normal BELL. However, the BELL configuration option can be used to reprogram the action taken by IVT when a bell-character is received. In that case, the BEEP statement will perform whatever is configured. Beeps produced by a script are subject to the BELL_ABUSE setting. See also FLASH. 13.9.3: BREAK (Break from a loop) BREAK [n] This can be used to break from a FOR, FORALL, FOREVER or WHILE loop. The optional number n can be used to specify the number of nested loops that should be broken out of (defaults to 1). The n HAS TO BE a fixed number, not an expression! It is a syntactical error to use BREAK outside of a loop, and it is also an error to specify an n that is too high. See also CONTINUE and NEXT. Example: FOR (i = 0; $i < 10; i = $i + 1)

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.3: BREAK (Break from a loop) FOR (j = 0; $j < 10; j = $j + 1) IF $i == 5 && $j == 5 THEN BREAK 2 NEXT NEXT ECHO "i is $i and j is $j\n"

Page: 17

This rather silly example breaks out of BOTH loops when the work is half-way done. It will print: "i is 5 and j is 5". This is an important feature, others are prev/next 13.9.4: CALL Script [params] (Function call to a script) CALL Script [params] Invokes a script. Script must be the name of a defined SCRIPT, and CAN BE a string expression, which allows calling functions indirectly! The params are optional. Usually you have to pass an actual value for every defined parameter, but you may specify too few (will be empty strings) or too many (will be ignored). MIND: There are two different ways to pass parameters, new and old. The new syntax is like any other programming language: Call ScriptNm(expr1, expr2, ...) So parentheses, any number of complex expressions separated by commas. The old syntax is: Call ScriptNm arg1 arg2 ... So, NO parentheses, and every argument is a simple word, like a string or number, and arguments separated by spaces or tabs. These arguments cannot use functions and calculations, often requiring many intermediate variables. Needless to say, the new syntax is the preferred one. The invoked script will execute, which in its turn may CALL other scripts (or even itself, recursion is allowed in IVT scripting). The function call will eventually RETURN, either with a value or without. In a normal CALL, any returned value is lost. When you use a CALL from an assign statement, the returned value can be assigned to a variable. If you do not RETURN a value from such an invocation, the result will be an empty string. If you return a value, but the call is not from an assign statement, the returned value is discarded. See also HIDDEN, DESCRIBE and LOCAL. This is, of course, a very powerful feature of IVT. There are several example in this manual that allow you to study how scripts are written, see: Script to log on to a host automatically. Script to dial out through modems. Script to read line from keyboard. Waiting for any sort of prompt. Special case: indirect calls. A CALL can also be written as: indiri = "myproc \"arg 1\" arg2" retval = Call($indir,"arg3") This will cause a call to "myproc" with 3 parameters: - arg 1 - arg2 - arg3 What happens is that the name of the function being called is always evaluate as a string expression. The first word is interpreted as the name of the function, any remaining words are passed as parameters (use quotes to protect spaces as usual). Any parameters in the normal place (arg3 in the example) ar of parameters. See also THREAD, for asynchronous execution of scripts. See also CANCEL, KILL, TRAP, DETACH and HIDE.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.5: CANCEL (Allow script to be cancelled yes/no) 13.9.5: CANCEL (Allow script to be cancelled yes/no) CANCEL on|off

Page: 17

The F3-R or F3-C sequences can be used to reset an entire session to a known state. One effect of this is that all running scripts and threads are cancelled. As the power of the IVT script language grew and scripts like ESCESC came into being, it became necessary to have a mechanism that allows a script to protect itself against such an event. CANCEL specifies OFF or ON. When OFF, the script itself and its descendants (scripts CALLed by this script) will not be terminated by F3-R. When ON (default), the script can be cancelled at any time. KILL will always work though. See also DETACH, which allows a script to disassociate itself from the session it is started from. See also CALL and THREAD. 13.9.6: CAPTURE (capture received characters into variable) CAPTURE variable [maxbytes label] CAPTURE off [variable] This is one of the more powerful commands in the IVT script language. All data that is received on the session is also stored in the given variable until a CAPTURE off command is given. All data, including ESCape sequences, is stored. The only exception is NULL bytes, which are silently discarded, see the discussion at WAIT ANYCHAR for a way to catch NULL bytes. An optional maxbytes expression and a label can be specified. Whenever the captured number of bytes exceeds the specified maxbytes, the CAPTURE is cancelled and the script performs a GOTO to the specified label. When the OFF option is used, capturing to the named variable is stopped. When no name is given with OFF, ALL captures for the current session are stopped (use with care). Multiple scripts and threads can capture data to multiple variables if they so desire, even on the same session. The resulting string can be manipulated with (for example) STRSTR, MATCH and SUBSTR. As an example, consider this part of a login script: CAPTURE LogInStuff CALL IvtWaitLoggedIn CAPTURE off LogInStuff IF MATCH("[Yy]ou have mail",$LogInStuff) THEN SEND "elm\r" This will capture the login-sequence into an IVT variable. If the resulting string contains, somewhere, the string "You have mail" or "you have mail" it starts up the ELM (electronic mail) program of Unix. The buffer used for the variable is automatically extended when the received characters do not fit in the allocated buffer. If there is no maxbytes given, there IS no maximum size for the resulting buffer, so make sure a CAPTURE statement is not in effect for too long, or all available memory will be used and IVT will exit with a fatal message (modern machines may have a huge amoun of virtual memory, so you might not even notice this error). The maxbytes option should be used to guard against this problem. Please note that some hosts insert explicit cursor-positioning commands into the datastream in unexpected places, and other formatting (like colors and video modes) which can cause a match to fail because what you see on-screen does not match the actual contents of the buffer. If you have problems, write the contents of the variable to a file (use OPEN/WRITE/CLOSE) for an easier way to inspect the current contents of the variable. If you want to capture data to a file, an easier way might be to use the AUTOLOG command. If you want to examine the current contents of the screen, see SCREENTXT. NOTE: A variable that is used in an active CAPTURE statement must not be modified by other statements. Any attempt to do so will result in an error message on-screen and will cancel the CAPTURE. If an existing variable is used in a CAPTURE statement, any existing contents is cleared and the variable is re-used (so you can use a LOCAL variable). Any existing active CAPTURE on the same variable is also silently terminated. When the variable does NOT exist, it is created as a session variable (global to all scripts that run on behalf of the session but invisible to other

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.6: CAPTURE (capture received characters into variable)

Page: 17

sessions). If you use a LOCAL variable and the procedure ends (or RETURNs), the CAPTURE is silently aborted and the variable deleted. When a scripts starts a CAPTURE with a maximum, and ends without stopping the capture, the jump to the label is silently ignored when the maximum amount of data is captured, and the capture ends. 13.9.7: CLS (Clear the screen) CLS Clears the screen and homes the cursor for the current session. See also VTECHO, ECHO and SETPOS. 13.9.8: COMMENTIGNORE (Ignore N attempts to set comment) COMMENTIGNORE n The status line comment is used to identify the purpose of a session. It can be set by STATUSTXT and STATUSTXTFIX, by the host and manually (by clicking on it). It can also be specified as part of CREATE statement. When some of these methods are combined, it can be that the comment sent by a host or set by your own login scripts overrule the one you used in a CREATE statement. When you don't want this, you can use COMMENTIGNORE to specify the number of attempts to set a session comment that must be ignored. This includes all forms of attempts. Use COMMENTIGNORE 0 to make sure the next attempt to set a comment is accepted. See also STATUSHOST. NOTE: This is a fairly ugly hack. If you want to make sure a comments ends up a certain way, it is best to have your scripts in order so they always work predictable, or use global variables to communicate between various scripts and threads so they know what to do. 13.9.9: CONTINUE (Start a new iteration of a loop) CONTINUE [n] This can be used to start the next iteration of an enclosing FOR, FORALL, FOREVER or WHILE loop. The optional number n can be used to specify the number of nested loops that should be CONTINUEd (defaults to 1). The n has to be a fixed number, not an expression. For an example, see BREAK. It is a syntactical error to use CONTINUE outside of a loop, and it is also an error to specify an n that is too high (or low). See also BREAK and NEXT. 13.9.10: CSET (Create LOCAL variable dynamically) CSET name = expr [;] Where expr can be any complex combination of numbers, strings, operators and built-in functions. See "variables explained" for a discussion of the various types of variables. CSET is used rarely, its purpose is to dynamically create LOCAL variables. Normally, you would use a LOCAL statement to declare variables as local befor you use them. However, in some cases, you create indirect variables with name expressions). So, to create a local array of 100 variables: FOR (i = 0; i < 100; i++) CSET MyVar_$i = SomeExpression...; NEXT Would create MyVar_0 to MyVar_99 as local variables, so they are automaticall deleted as soon as the script that created them returns.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.11: DELSCRIPT (Delete a script from memory) 13.9.11: DELSCRIPT (Delete a script from memory) DELSCRIPT ScriptnameExpr

Page: 17

ScriptnameExpr is a string expression that should result in the name of an This is like UNSET for variables. This can be used, for example, by a script that generates a (new version of) another script, which has to be read (by READRC). To prevent a duplicate script definition warning, you have to use DELSCRIPT. A newer (and better) way is to use SCRIPT_REDEFINE to redefine a script. IVT does not keep track of objects created by a script, so if a script has created lots of variables (local or global), these are left intact by DELSCRIPT. This can create surprises if the script keeps track of state in such variables. Use UNSET in combination with DELSCRIPT to prevent this. 13.9.12: DESCRIBE (Describe purpose of the script) DESCRIPTION string DESCRIBE string DESCR string Describes purpose of script. This string will be shown on the F4-X screen (script execution) for all scripts that are not HIDDEN. Use it to describe what the script is for. The F4-X screen allows you to manually execute scripts, and the user should know what to expect from this string. The different spellings of the keyword are just there because I could never quite remember the right spelling :-) They all do the same. 13.9.13: DETACH (Detach a process from a terminal session) DETACH [RUN_ALWAYS|OFF] This statement detaches an instance of a script from the session. This means that this script, and any scripts it might CALL, will not be terminated when the session that started them terminates. Instead, they will be inherited by another session. Thus, a detached script will die only when IVT terminates. This is useful for THREADs that perform some (endless) task not related to a particular session. For technical reasons, a script MUST have the context of a session to run in, since very many statements query or alter "the session". When RUN_ALWAYS is specified, the script will run even when other types of script are prevented from running (such as when the history pager is in use, the session is in an error state, etc.). The OFF directive turns the detachment off. All pretections no longer apply. A detached script still needs to protect itself from a RESET (F3-R) or a cancel (F3-C). Also, it needs to think about a KILL (TRAP). See the CANCEL statement for this. See also SECRET and HIDE. 13.9.14: DIALOG (GUI dialogs in scripts) This is a powerful feature, new in IVT version 21.1, december 2007. It allows IVT scripts to create and manage GUI dialogs, which improve the loo and feel of those scripts tremendously. The password learning and autologin system now uses these new features. Also, the installation wizard of IVT uses many GUI dialogs. Since the source of the wizard is part of the IVT package, if you want to program dialogs, you are encouraged very much to carefully study config.ivt! You can find it in folder "ivt" in the main IVT installation directory. If you have previousely used the WINDOW statement to create interactive scripts, you are encouraged to upgrade to DIALOGs. See the topic on dialog alignment to make attractive displays. An IVT script dialog can create the following controls: - Buttons; - Checkboxes (single or radiobutton style); - Text boxes (numeric, alphanumeric or password style); - Drop down boxes (also known as comboboxes); - Listboxes; - Horizontal lines;

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.14: DIALOG (GUI dialogs in scripts) -

Page: 18

Fixed text, optionally with colors; Bits of free text and empty lines; Groups of all of the above. A group can be centered, boxed and/or nested; Associate help with all of these items.

Each control is identified by a TAG. The control can be manipulated after initial creation using the tag, and events generated by the control (for example a user clicking a button) use the tag to identify the control. Once a dialog is created, it is displayed using DIALOG SHOW. Actions performed by the user are inspected using DialogEvent. The current state of the controls can be inspected using DialogQuery. Dialogs can be temporarily hidden using HIDE/UNHIDE. A DIALOG is created by using a single statement with just a name. This create a handle that is used in subsequent statements and functions to manipulate th dialog. A dialog is destroyed using the DESTROY comand. For example: DIALOG CFG DESTROY DIALOG CFG makes sure that any old instance of a dialog is destroyed before creating a new one. All options and commands can be expressed as string-expressions. See the examples for various useful combinations. Irrespective of the current setting of IdentifierAs, plain strings are seen as strings and not as variable references (saves a lot of quotes in DIALOG statements). Below you find the full list of commands, controls and their options: - DIALOG name Creates the dialog with the given name. This is required before any other command can be given for that dialog. - DIALOG name TITLE title Sets the title bar of the given dialog to the given title expression. Example: DIALOG CFG TITLE "Password learning & configuration system" - DIALOG name POSITION row column The given row and column expressions specify the top-left position of the dialog, relative to the top-left position of the main IVT window. Using a value of zero for either position means IVT will centre it (which i also the default). Using a value of -1 for either position means IVT will determine a "logical value for it. This will be slightly to the right and down from other dialog that may be on screen. DIALOG CFG POSITION 0 0 # Center on screen - DIALOG name DEFAULTACTION TAG When the user hits ENTER when the named dialog is active, this will generat a CLICK event on the given TAG. This can be used to program a default actio that must be taken when the user hits ENTER. DIALOG CFG DEFAULTACTION OK # Pretend click on OK when ENTER is hit - DIALOG name HIDE Makes the entire dialog temporarily invisible. A hidden dialog cannot receive any input from the user but retains all values, controls, configuration and position. For example, when a script action causes a sub-dialog to appear, you may want to hide the current dialog to prevent screen clutter. - DIALOG name UNHIDE Makes a dialog visible again that has been hidden using HIDE. - DIALOG name END Has the same effect as clicking on the close-window icon. It ends the dialo and causes it to disappear. It is NOT automatically destroyed, so after an END command, you can still use DialogQuery to retrieve values from the current dialog. - DIALOG name DESTROY Ends a dialog, destroys all controls and windows and releases all resources involved in maintaining it. The "name" becomes invalid. If the dialog is active, this also causes an END event to be generated, which the script will receive through DialogEvent. - DIALOG name TEXT "text string" Adds fixed text to the dialog. You can use the ColorAttribute function to get different colored text. Note that the text does not have a tag, if the user clicks on text this is not reported by the DialogEvent function. The text can contain newlines. Usually you'll want to use TEXT_NL to add a newline automatically. Example:

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.14: DIALOG (GUI dialogs in scripts)

Page: 18

DIALOG CFG TEXT_NL "Welcome to IVT!" DIALOG CFG TEXT "Dialogs are " DIALOG CFG TEXT_NL Concat(ColorAttribute("BrightRed BrightWhite"),"cool!") Adds two lines of text. The word "cool!" appears in bright red foreground o a bright white background after the text "Dialogs are ". - DIALOG name BUTTON tag text This creates a button, identified by "tag" and button text "text". When the button already exists, the button text is changed. An "&" characte in the text can be used to indicate a shortcut character for the button. Example: DIALOG CFG BUTTON " &Ok " Creates a button with a centered text "Ok" where the O is underlined and so the button can be "clicked" using the keyboard shortcut ALT-O. - DIALOG name CHECKBOX tag text [options] This creates a two-state checkbox. The text is a label for the checkbox. Valid options are: - STYLE=LEFT The "text" label is to the left of the checkbox. This is the default. - STYLE=RIGHT The "text" label is to the right of the checkbox. - ON The initial state of the checkbox is ON (checked). This can also be achieved by passing any numeric expression that returns TRUE. - OFF The initial state of the checkbox is OFF (unchecked). This can also be achieved by passing any numeric expression that returns FALSE. It is also the default. Example: DIALOG CFG CHECKBOX_NL "&Some option: " "STYLE=LEFT" $SomeVar != 0 This creates a checkbox, shortcut ALT-s, which is initialised to the result of the expression $SomeVar != 0. Note the quotes around the "STYLE=LEFT", without these, the expression is seen as an assignment to the variable STYLE! - DIALOG name RADIOBUTTON TAG1 TAG2 [TAG3...] This modifies previously defined checkboxes (you must specify a number of tags, at least 2). The checkboxes named in the list now behave as radio buttons - only ONE can be selected at any one time. This can be used to program mutually exclusive options. Note the different behaviour of DialogQuery when used to query the state of a checkbox that is part of a radiobutton set. - DIALOG name TEXTBOX tag text [options] This creates a textbox, a field where the user can enter data. The text is a label for the textbox, the tag is a unique identifier. Valid options are: - LENGTH=N Set the length of the text field to N characters. By default, this is the maximum length of the data that can be typed into the control. It defaults to "LENGTH=10". - ANSWERLENGTH=N Specifies a maximum length of the text that can be typed. This can be longer than the specified LENGTH, in which case the data will scroll as required. The default is equal to LENGTH. - NUMERIC Only numeric data can be typed into the control. - ALPHANUMERIC Any data can be typed (numeric and alphanumeric). This is the default. - UPPERCASE Only uppercase data can be typed (is automatically converted upon entry). - LOWERCASE Upper and lowercase text is accepted. This is the default. - NOECHO Data typed into the control is not shown (only a dot for every character typed). Intended for passwords. - ECHO Data typed into the control is displayed normally. This is the default. - Anything else is interpreted as the initial text for the control. Example: DIALOG CFG TEXTBOX_NL METSYS "Meta-&system hostname :"\ "LENGTH=20" "ANSWERLENGTH=100" $IvtPwdMetaSystem This is used in the password learning configuration system. It creates a textbox of 20 characters that can accept an answer of up to 100 characters. The tag is METSYS, and the default value of the control is the contents of the IvtPwdMetaSystem variable. Note that the LENGTH=20 option must be in quotes, or it will be seen as an assignment to the variable LENGTH (which is a reserved word!).

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.14: DIALOG (GUI dialogs in scripts)

Page: 18

- DIALOG name COMBOBOX tag text [options] A combobox allows the user to choose one option out of a list. The text of open and the user can select a different choice from the list. An alias for COMBOBOX is DROPDOWN. Valid options are: - HEIGHT=N The length of the list when clicked open can be set to N. The default is equal to the number of entries in the list. When a smaller number is chosen, a scrollbar will be added to the drop down list. - SELECT=N Set the number of the currently selected item in the list (the one that i displayed to the user). Set to 0 for the first item in the list. The default value is zero. Invalid values are silently adjusted to last or first entry, respectively - SELECT_TEXT=text Selects the entry that matches (case insensitive) the specified text. - CLEAR All values are cleared from the list (emptying it). - All other data is seen as an item to add to the list of valid values. Example: DIALOG CFG COMBOBOX_NL ALGN "&Auto-login :" "Off" "On" "Disabled" IF $IvtPwdCfgAutoLogin >= 0 \ THEN DIALOG CFG COMBOBOX ALGN "SELECT=$IvtPwdCfgAutoLogin" \ ELSE DIALOG CFG COMBOBOX ALGN "SELECT_TEXT=Disabled" This creates a combobox called ALGN (for auto-login) with the values On, Of and Disabled. The variable $IvtPwdCfgAutoLogin is either 0 or 1 for off or on, or -1 when entirely disabled. The first DIALOG creates the combobox, the IF statement is used to modify it (SELECT the appropriate entry). Note that this could also be written as: DIALOG CFG COMBOBOX_NL ALGN "&Auto-login :" "Off" "On" "Disabled" \ Concat("SELECT=",$IvtPwdCfgAutoLogin >= 0 ? $IvtPwdCfgAutoLogin : 2) to have it as ONE statement... But try and keep it understandable. - DIALOG name LISTVIEW tag text [options] A listview show a list of entries to the user, multiple entries are shown simultaneously. When the list is long, a vertical scrollbar will appear. When the entries in the list are wide, a horizontal scrollbar will appear. It can have multiple columns, every column can be resized individually. The listview can have an optional header for every column. Tabs are used to separate columns in the listview. The listview is the most complex control IVT has. Valid options are: - TITLE=text Sets an optional text for the control, which will appear at the top of th actual listview window. - MINHEIGHT=N The minimum height in lines the listview will occupy. When the list contains fewer items, the remaining lines are empty. The default is just one line (when the list is empty). - REQHEIGHT=N The maximum height in lines the listview will occupy. When the list contains more items, a scrollbar is used to display the rest. The default is determined by the size of the physical monitor. - MINWIDTH=M The minimum width in characters (a line will never be narrower than this) The default is one character. - MAXWIDTH=M The maxium width in characters the control will occupy. When the list contains items longer than this, a horizontal scrollbar is used. The default is determined by the size of the physical monitor. - SELECT=N Selects which entry in the listview is selected (made active). The first item is selected using SELECT=0. Invalid values for N are silently adjusted (to the last or first item respectively). - SELECT_TEXT=text Selects based on text instead of a sequence number. The text must match (case insensitive) one of the entries in the list. - DOUBLECLICK=name Specifies the name of the control that is "clicked" when the user double-clicks a line in the listview. This must be a valid TAG by the tim the dialog gets a SHOW command. - COLUMN=N Sets the width of every column in the view. By default, there is only one column,spanning the width of the entire view. By using repeated COLUMN clauses, the number and relative width of the columns can be specified. - HEADER=Text[\tText...] Sets a column header for the listview. Each column can have a separate heading by using a TAB (\t) character to separate the columns. - CLEAR - Any other data is interpreted as data for the list. Column data must be

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.14: DIALOG (GUI dialogs in scripts)

Page: 18

separated using a TAB (\t) character. Example: DIALOG X LISTVIEW LV "MINHEIGHT=10" "COLUMN=3" "COLUMN=30" DIALOG X LISTVIEW LV "TITLE=Popular companies" DIALOG X LISTVIEW LV "HEADER=Seq\tName" DIALOG X LISTVIEW LV "1\tBearStar Software" DIALOG X LISTVIEW LV "2\tMicrosoft Corporation" DIALOG X LISTVIEW LV "SELECT=0" DIALOG X NEWLINE This will show a box 10 lines high, with 2 columns labelled "Seq" and "Name and two rows which list popular companies. The remaining 8 lines will be empty. Instead of using LISTVIEW_NL, an explicit newline command is used. - DIALOG name GROUPSTART - DIALOG name GROUPEND [options] These two commands can be used to make dialogs more visually attractive. The GROUPSTART command simply serves as a starter (no options are required) All controls between the START and END are considered to be part of the group. When the GROUPEND command is given IVT will place the group of controls according to these valid options: - BOXED A box is drawn around the group of controls, showing the user that these controls are indeed a logical group. - CENTER The group is drawn in the center of the dialog, taking all other elements into account. - TITLE=Text The text is placed centered just above the first control in the group. When BOXED is used, the text is part of the box. Note: Mindthe quotes: TITLE="Some title" is wrong (it assigns the string "Some title" to the variable $TITLE), but "TITLE=Some title" passes a string identifying a title to GROUPEND. - NEWLINE When this option is omitted the group is considered to be zero lines high This can be used to place a group somewhere in a dialog on the same level as other controls. Use with care, extra NEWLINE and ROOM directives are usually required or controls will actually be displayed on top of each other. Groups can be nested (up to 4 levels deep). An example of this is the main "Setup" panel of IVT, which has 4 groups (Protocol, Terminal setup, Miscellaneous and a row of buttons). setup" group is placed on the same hight and to the right, as a group. is displayed below. A nested group is made of these 3 groups, with only the CENTER attribute turned on, so the 3 boxes with rows of buttons are neatly aligned. This only looks good when all the buttons have the same size (by padding names of the buttons with spaces to the same length). To finish it up, a line is drawn, followed by the last group of buttons which again has the CENTER attribute. - DIALOG name NEWLINE Terminates the current line, or adds an empty line to the dialog. Note that all control-creating commands such as BUTTON and CHECKBOX have a second form with _NL appended to it, this implies an automatic NEWLINE command. For example, the following two are equivalent: DIALOG X CHECKBOX Box "Turn me on or off: " OFF DIALOG X NEWLINE or: DIALOG X CHECKBOX_NL Box "Turn me on or off: " OFF See also the discussion on alignment below. - DIALOG name LINE Adds a horizontal line to the dialog (takes up one entire line). Used in many standard IVT dialogs to separate the OK/Cancel buttons at the bottom of the dialog from the rest. - DIALOG name ROOM string Adds extra room to the dialog (horizontally). Normally, "string" will be a number of spaces, but it can contain literal text as well, which is simply displayed "as is". The ROOM command is used to align controls relative to each other to make the resulting dialog more visually attractive. - DIALOG name DISABLE TAG ... The control(s) identified by TAG (a list of tags can be spacified) are disabled (greyed out). See also IVT_DIALOGSTATE which does this for standard IVT items. - DIALOG name ENABLE TAG ... The control(s) identified by TAGs are enabled (usable by the user). All controls are created enabled by default. See also IVT_DIALOGSTATE which does this for standard IVT items.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.14: DIALOG (GUI dialogs in scripts)

Page: 18

- DIALOG name SKIP TAG ... The control(s) identified by TAGs are made invisible - they disappear from the dialog but still exist, and retain all their settings. They can be made visible again by using ENABLE or DISABLE on them. See also IVT_DIALOGSTATE which does this for standard IVT items. - DIALOG name SETACTIVE TAG Sets the input focus to the control identified by TAG. Especially useful for TEXTBOX or LISTVIEW controls, but works for any control. - DIALOG name SHOW A constructed dialog is not actually displayed until this command is used. Only when it is in the SHOW state can you use the DialogEvent function to get notifications of user actions on the controls. The command only has effect when the dialog is not currently in the SHOW state (giving this command for a dialog that is already shown does nothing) - DIALOG name HELP TAG "Topic" This associates a search string in the IVT manual with a control. When the user uses F1, right-click or the question-mark feature of a dialog to request help on any item, IVT will automatically invoke the proper manual page for that search string. This is used extensively in the configuration wizard. When a dialog or dialog item has no help associated with it, the DialogEvent routine returns "HELP" and an indication of the item help was requested for, and leaves it to the script that created the dialog to provide help information to the user. Help can be set for the entire dialog by setting TAG to the name of the dialog. This will provide a default help for all items (only used when no item-specific help is set). Alignment of controls in a dialog. All standard dialogs of IVT itself use a few basic tricks to align items in dialogs: - The first and most important is derived from the time when IVT used to display only text-mode dialogs. The labels of all comboboxes and textboxes and so on are lined up using a colon, like so: Screen size : ... Allow resize : ... Middle of the status line: ... These are a few random lines from the VT220 main setup screen. When the colons are lined up, IVT will line up the texts and the controls that follow the text. This basic trick is used everywhere. - The ROOM directive is used to insert spaces between items. So, if you want row of buttons at the bottom of a dialog, you use a centered group with bits of spaces between, like so: DIALOG CFG GROUPSTART DIALOG CFG BUTTON BUTOK " OK " DIALOG CFG ROOM " " DIALOG CFG BUTTON BUTCNC "Cancel" DIALOG CFG ROOM " " DIALOG CFG BUTTON BUTHLP "Help" DIALOG CFG GROUPEND CENTER NEWLINE This centers a group of 3 buttons with bits of spaces in between. Studying this example may help... - When IVT is about to SHOW a dialog, it calculates sizes and resulting layou of the entire dialog. It deletes multiple empty lines resulting in the (combined) use of NEWLINE and SKIP, and re-arranges items to make things "pretty". That is a pretty complicated algorithm which usually works well. 13.9.15: DISPLAY (Enable display of receive characters yes/no) DISPLAY ON|OFF Display received characters yes (ON) or no (OFF). When you use DISPLAY OFF, characters received on the session from the host are not displayed on the screen, and escape-sequences are not interpreted. All input is, however, processed by WAIT statements (if you have those), so you can use this to hide a noisy or lengthy interaction with a host from the user. A SCRIPT will have to execute a DISPLAY ON at some time to enable display of characters again. An F3-R (User initiated RESET) will also turn display on again. There is one 'but': Since escape-sequences are not interpreted, queries from the host (using escape-sequences) are not answered either. This can frustrate login-sequences (where the host tries to determine the connected terminal typ by sending an enquiry), which is unanswered when DISPLAY OFF is active.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.15: DISPLAY (Enable display of receive characters yes/no)

Page: 18

In this case, you will have to set up a THREAD that WAITs for such sequences and answers them (with SEND). See also IGNORE_ESCAPE. 13.9.16: DO/UNTIL loop. DO ... statements ... UNTIL expression Like the WHILE, FOR and FOREVER, the DO/UNTIL is a loop. In this case, the statements will always be executed at least ONCE. The loop continues to run until the expression evaluates to TRUE. Note: there is NO do/while in the IVT script language. CONTINUE and BREAK work normally inside a DO/UNTIL. 13.9.17: DRAWBOX (Draw a box on the screen) DRAWBOX x1 y1 x2 y2

Draws box, x1:y1 specify the coordinates of the upper left corner of the box, x2:y2 specify the coordinates of the lower right corner of the box. This function draws a double-lined box on the screen, to prettify interaction from complex scripts (such as the dialer example). This command is very old: complex interactions are much better dealt with using a DIALOG instead of the old way of abusing the session screen with ECHO statements and reading the keyboard using ONKEY. 13.9.18: ECHO (Display a string on the session screen). ECHO expression ECHO_LIT expression Display the expression result on the screen of the current session. ECHO gives access to the internal routine of IVT that is used to display thes manual pages and all other IVT-internal screens. Because I did not want to use the VT220 escape-sequences to do highlight, underlines and so forth (too complex and verbose), I have created my own very simple system of codes to manage these display attributes. The 'Escape Character' for these is a ~ (tilde). The following combinations are valid: ~1 - Turn on reverse video. ~2 - Turn on highlighted video. ~3 - Turn on blinking video. ~4 - Turn on underlined video. ~u - Ends underline, leaves other modes untouched. ~0 - Return to normal video. ~AXX - Color code as created by ColorAttribute. ~- Solid horizontal line ( ). ~_ - Solid double horizontal line ( ). ~~ - Display a single ~. With this, it is very simple to build nice screens with attractive formatting If, however, you need the full power of VT220 escape sequences you can always use the VTECHO command, which treats its arguments as if it were data received from a host. Expression can be a complex expression, like in ECHO 2 * 2. The ECHO_LIT can be used to do a literal echo. Use that to inspect the contents of a string that may contain tilde characters. ECHO_LIT does not interpret the string at all. However, when you write: ECHO_LIT "This string contains a tilde (~) character\n" This will NOT display \n on screen, but will do a newline action! This is because the \n in the string constant is translated into a new line character when the source of script is read, so ECHO_LIT does not see the backslash, it sees a single new line character... Similar things hold for \r, \t and so on. Use a double backslash to display a backslash: ECHO_LIT "This displays a backslash-n: \\n" See also SPRINTF and VTECHO.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.19: ENDSESSION (Abort current session) 13.9.19: ENDSESSION (Abort current session) ENDSESSION Aborts the current session (same as ALT+F4) and closes the session (window, running scripts, variables etc).

Page: 18

However, see also GUI_CLOSE, which can disallow the user from forcing session closed, leaving only this ENDSESSION statement as a means to kill a single session. This statement never returns - when the session is ended, the currently executing script is destroyed together with all other attributes of that session. Use it when you know for sure that the session serves no further purpose. Also see (NO)RECONNECT, since this setting will determine whether IVT will try to re-establish a new session when the current one is lost. If you want to make sure, then NO_RECONNECT ENDSESSION will instantly close the current session without reconnect. When this was the last session, IVT will exit and either return you to the operating system or display the initial Create-Session dialog depending on th setting of EXPLICIT_EXIT. See also the IVT special ESC<space>P escape sequence, which can be used by the host to tell IVT to disconnect. 13.9.20: EXIT (Ends IVT) EXIT number This simply causes an immediate exit of the IVT program, returning the (numeric) argument as the exit status to the operating system. The number can be a complex expression. No checks or warnings are performed - if you have many sessions open and one script in one session somewhere calls EXIT, all sessions die immediately. Needless to say: use with care. Example use is in a startup script where you detect some fatal error, or in a batch run of IVT (see BATCHMODE) where you KNOW that there will only be one session anyway. See ENDSESSION to abort a single session. 13.9.21: FOR/NEXT (For loop BASIC style) New syntax: FOR (startexpr; testexpr; increxpr) Statements NEXT Old syntax: FOR Variable Start End [Increment] Statements NEXT In the new syntax, you can use the new style expressions to make the FOR more readable and powerful than the old syntax, for example; FOR (i = 0; $i < 100; i = $i + 1) Instead of: FOR i 0 100 1 New syntax: The startexpr is executed once, then the testexpr is evaluated once for every is executed. The FOR terminates when testexpr evaluates to FALSE. Statements will be executed zero times when testexpr evaluates to FALSE the first time. Statements will be executed infinitely many times if testexpr never evaluates to FALSE. If that is intentional, see FOREVER. Old syntax: The Variable, Start, End and Increment are all string expressions. The Variable is initialised to the value of Start, and the Statements are executed as long as the value of Variable does not exceed the value of End. After every iteration, Variable is incremented by the value of the optional Increment expression (defaults to 1). Statements can be executed 0 times if Start is greater than End. Statements will be executed infinitely many times if Increment is zero.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.21: FOR/NEXT (For loop BASIC style)

Page: 18

Loops (FOR, FORALL, WHILE and FOREVER) can be nested up to 10 deep. Use BREAK to break out of a loop prematurely. Use CONTINUE to start a new iteration of the loop before the NEXT is reached. Example: FOR (i = 1; $i < 10; i = $i + 1) echo "i=$i\n" NEXT This is your basic kind of FOR loop (prints out i=1 to i=10). Make sure you do not write "i = i + 1" as increment expression, since the second "i" is seen as a string, which evaluates to TRUE (1) since it is not empty, so the new value of "i" becomes 2 every time... The same goes for "i < 10" which is always TRUE and has nothing to do with th value of the variable i (which is $i). 13.9.22: FOREVER/NEXT (Infinite loop) FOREVER Statements NEXT This is an infinite loop, that should be broken by a GOTO, RETURN or BREAK or some such forced means. The Statements are executed indefinitely. See also WHILE, UNTIL, FOR and FORALL. 13.9.23: FORALL (Loop through array of variables) FORALL Name {Prefix | ANY} Statements NEXT This is a powerful statement that allows you to manipulate arrays of variables in IVT scripts. IVT will inspect all existing variables and execute Statements once for every match found with Name set to the full name of the variable. The $FORALLTYPE variable indicates the current type of variable. This is perhaps demonstrated best by an example: Script Test xxx1 = "I am xxx1"; xxx2 = "I am xxx2"; xxx3 = "I am xxx3"; FORALL Nm "xxx" IF $FORALLTYPE != "LOCAL" THEN CONTINUE x = Expand("\$$Nm") ECHO_LIT "Variable $Nm = $x\n" NEXT END When script "Test" is started, it creates 3 variables whose names start with "xxx". The FORALL loop will be executed 3 times (assuming there are no other (session local or global) variables that start with the "xxx" prefix). Nm will be set to xxx1, xxx2 and xxx3 respectively. The Expand function can be used to get the contents of a variable. The rules are as follows: - Variables are resolved in "normal" order (local, parameters, session local, and global variables), see Variables Explained. The current type of match is found in the $FORALLTYPE variable. This will contain LOCAL, SESSION or GLOBAL, respectively. Use this to prevent accidental processing of variables belonging to other scripts or sessions. - Statements can be executed zero times when nothing matches. - When the ANY keyword is used rather than a prefix string, Statements are executed for EVERY existing variable. Handy for debug purposes. - The list of existing variables is determined when the The resulting table is sorted on name. When all names suffixes, the ordering will be on numeric order (so 1 10). When the suffixes are not numeric, an alphabetic loop is started. have numeric will be lower than ordering is used.

- Since the names are determined when the loop is started, the Statements may delete (UNSET) names, but the loop will still be executed. Similarly, newly created variables will NOT be processed by the loop, even if it matches the prefix.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.24: GLOBAL (Change a global IVT.RC setting) See also FOR, WHILE, FOREVER, UNTIL and NEXT. 13.9.24: GLOBAL (Change a global IVT.RC setting) GLOBAL <.rc statement>

Page: 18

Sets global configuration options. When the GLOBAL keyword is omitted, this will set options LOCAL to the session. See also VOLATILE and COLORVOLATILE. ATTENTION: The GLOBAL keywords has nothing keyword (appearances not withstanding :-) The LOCAL keyword is used to indicate that scope (current SCRIPT only), and variables statement are global variables (visible in to do with the LOCAL one or more variables are of local that are set with the GSET all current and future sessions).

The GLOBAL keyword changes an IVT.RC setting! When the GLOBAL keyword is used this will change the setting for all future sessions, but NOT for the current one (unless the particular setting is global only, see the documentation for that particular setting). When the GLOBAL is omitted, only the current session is changed, and NOT all other current and future settings. Almost all IVT.RC settings can be changed from a script, except for a few tha are impossible to change afterwards (they cause errors when you try). Note that when an IVT.RC setting is used OUTSIDE a script, it is automaticall considered global - since it defines the settings IVT starts up with. The GLOBAL command is a script statement, hence syntactically wrong anywhere else. 13.9.25: GOTO (Jump to a label unconditionally) GOTO labelexpr Jumps to the mentioned label. When the label does not exist, this will print an error message in reverse video on the session screen. See also GOTO_OPT (optional GOTO). See also ONERROR, which allows you to trap any kind of error. The labelexpr can also be a string-expression, which should result in an existing label. For example: x = CALL MenuChoice GOTO "Menu_Item_$x" LABEL Menu_Item_1 ... LABEL Menu_Item_2 etc... This uses an indirect GOTO. One might also write: GOTO Concat("Menu_Item_",$x) To make the concatenation and indirection more explicit. 13.9.26: GOTO_OPT (Optional GOTO) GOTO_OPT labelexpr This is like GOTO, only the statement does nothing when the resulting label does not exist (the standard GOTO generates a run time error). This can be very convenient when you use indirect GOTO statements that can evaluate to invalid targets. A little example: Choice = Prompt("Enter your choice (1-5):",1,1) GOTO_OPT MENU_$Choice ECHO "Sorry - invalid choice: $Choice\n" RETURN LABEL MENU_1 # User typed a "1" as choice... ... RETURN LABEL MENU_2 # User typed a "2" as choice... ... ... etc ...

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.26: GOTO_OPT (Optional GOTO)

Page: 18

This will attempt to branch to "MENU_9" when the user types 9, which does not exist, so the GOTO_OPT does nothing which means the error handler can be code just after the GOTO_OPT. In other words, this is the multi-branch IF statemen of the IVT scripting language. For more advanced error handling, see ONERROR. 13.9.27: GSET (Set global variable) GSET name [=] expr Sets global variable name to expr. The equal sign is optional, THE SPACES BETWEEN PARTS ARE NOT! See variables explained for further details on variables. See the LSET statement for examples. "Global" means that the variable will be visible in all (parallel) sessions. Normal variables are local to the session that creates them. LOCAL variables are visible only to the current level of script (see LOCAL and CSET). Global variables are rarely used, but vital for some applications. Example: Script STARTUP IF $IvtPasswdFile == "" \ THEN GSET IvtPasswdFile "$IVTTMPDIR/PASSWORD.IVT" ... END INCLUDE_OPT "$IvtPasswdFile" This startup script runs while IVT is starting. It sets a global variable wit the name of file, which is the included into the configuration using an INCLUDE_OPT statement which uses the global variable. This makes for very flexible configurations. See also LSET and CSET. 13.9.28: HELP (Provide help from within a Script) HELP "Subject" When you use the HELP statement in a script, IVT will pretend you did a searc in the manual pages with the given Subject. This will display the help screen for this subject when it exists. IVT will first search for a topic that exactly matches the subject (the name of a hyperlink). If it cannot find that, it will search for a string that matches the subject. If it cannot find that, it will display an error. The Subject can be a complex string expression. Example: HELP "IF" Will show the help on the IF statement. Note that searching the help FIRST does a search on a topic with the given name. Only when that fails, will it d an ordinary search on the text. So "IF" finds the "if" statement, not the ver first occurrence of the word "if" in the manual. This works for manual searches, too. See also DIALOG HELP to associate internal IVT help with items in dialogs created by a script. 13.9.29: HIDE (Hide a script from the F4-X screen) HIDE HIDDEN Script does NOT appear in F4-X screen. Most scripts should have this attribute. Public scripts (non-HIDDEN) can be executed manually from the F4-X screen. In practice, most scripts are only CALLed by other scripts, and the chain is started by an ONCONNECT or PRECONNECT trigger. Also, you can BIND scripts to (function) keys, or use KEYMACRO. However, some scripts are meant to be started manually. See also DESCRIBE, which allows you to identify a scripts purpose. See also MENU, which allows you to invoke your own scripts from the menu bar.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.30: IF (Conditional statement) 13.9.30: IF (Conditional statement)

Page: 19

This is (of course) one of the most powerful statements in the script languag because it allows conditional scripts. Like BASIC, there are two forms of IF: IF expression Label IF expression THEN Statement [: Statement]... ELSE Statement [: Statement] Older versions of IVT had a very limited expression syntax. Version 21 of January 2007 introduces a much more powerful syntax for expressions. The simple first version simply jumps to the given Label when expression evaluates to TRUE, like: IF $x > 9 TooBig ... LABEL TooBig # $x is over 9 When the THEN keyword is used, it can be followed by one or more statements, separated by colons, like so: IF $x > 9 \ THEN x = 1 : echo "All done\n" : RETURN \ ELSE x = $x + 1 There are still some important limitations: - IF statements CANNOT be nested. - You cannot call IVT scripts from within expressions. - An IF must be on a single line. You must use line-continuation as in the example above if you want to use multiple physical lines. - The separating colons must be surrounded by white space. See also GOTO, WAIT and LABEL. See also the various examples, which contain numerous IF statements. 13.9.31: IGNCHILDREN (Ignore exit of child processes) IGNCHILDREN "on"|"off" Normally, children created by the THREAD or FORK statement execute independently until they RETURN. The return value of such a process must be collected by a WAITTHREAD statement (analogous to FORK/WAIT in Unix). Also analogous to Unix is that sometimes you want to forget the fact that you have created child processes, and their demise is of no interest to you. When an IGNCHILDREN ON is in effect at the time the thread is created, a child process that exits simply disappears immediately, its exit status is lost. When IGNCHILDREN OFF is in effect (the default), a 'zombie' is left that occupies resources, which are not freed until a WAITTHREAD is done by the parent to collect the exit status. A lone IGNCHILDREN is equivalent to IGNCHILDREN ON. 13.9.32: IGNOREESCAPE (Ignore the next ESCAPE sequence) IGNORE_ESCAPE IGNOREESCAPE This command causes the next escape sequence transmitted by the host on the current session to be ignored. In rare cases, hosts will send things that are simply wrong, and which cannot (easily) be fixed. For example, if you tell your HP-UX machine that you are a VT220 terminal (IVT's default), the darned thing will send you an initialisation string during logon that assumes that the screen is 25 lines long (the initialisation sets a 25-line scrolling region explicitly). When the window is bigger, this results in a messy screen, especially if the cursor happened to be below line 25 when the command was issued. This ought to be fixed in the terminfo entry for the vt220 on the HP, but I was not the administrator, there were a lot of machines involved, so I invented the IGNORE_ESCAPE command. With this, you can use a WAIT statement to wait for stuff that offends you. Every received character on the session is FIRST processed by these WAITs, so you can write a bit of script like: WAIT "\1B[1;25r" IGNORE_ESCAPE

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.32: IGNOREESCAPE (Ignore the next ESCAPE sequence)

Page: 19

The main IVT engine will look at an internal flag set by the IGNORE_ESCAPE statement before executing any escape sequence. Since the actual "r" command character is first seen by the WAIT, the actual command will be ignored this way. This is perhaps not the most elegant command in IVT, but it works... Both spellings of the command have the same effect. 13.9.33: KEYBOARD (Enable/disable keyboard) KEYBOARD ON|OFF Enable (ON) or disable (OFF) keyboard during execution of a script. This is useful during automatic login-scripts that you do not want to be disturbed by keyboard input from the user. Normally, during execution of a script, all keyboard input is processed normally by IVT. Data-generating keys will result in data being transmitted t the host, possibly intermingling with the data generated by SEND statements. Other keys are internal to IVT and cause (for example) switching to another session, creation of new sessions or setup/help. With KEYBOARD OFF only this last class of keys is still active. All data generating keys are disabled. Make sure that the script ends in a KEYBOARD ON or it will be impossible to use the session. In that case, the user must issu an F3-R command (which will reset the entire session, including termination of any script for that session and re-enabling the keyboard). If the user types data while a KEYBOARD OFF is in effect, the data is buffered (for that particular session) and will be transmitted when a KEYBOARD ON is issued sometime later. This means type-ahead by the user will still be transmitted to the host, only a bit later. IVT counts the number of KEYBOARD OFF statements, and the same number of KEYBOARD ON statemens is required to actually turn the keyboard on again. Therefore it is important to balance the number of OFF and ON statements, so multiple parallel THREAD scripts can all manipulate the keyboard as they see fit and it will only be actually enabled when all scripts allow it. are keys to manipulate menus, start setup (F3) and so on. There is also an escape sequence from the host that can disable the keyboard. This is handled separately - as long as the host keeps the keyboard disabled, KEYBOARD ON won't do any good (and v.v.). See also DISPLAY. 13.9.34: KILL (Kill an IVT script process) KILL pid signal When a process is created with THREAD or FORK, a PID (process ID)is returned to the caller. statement can be used to signal an event to the process. The PID must be valid, or the statement is silently ignored. The destination process must have used a TRAP statement to handle the incomin signal (otherwise the signal is silently lost). So really, KILL is a misnomer as it does not actually kill anything - it sends signals only. When a TRAP is in effect, execution of any script in the destination process is aborted and control is transferred to the label mentioned in the TRAP. The signal is a number between 1 and 10 inclusive. No special meaning is attached to these numbers by IVT itself. See also F3-R and F3-C, two ways a user can terminate scripts. See also the CANCEL statement. 13.9.35: LABEL (Define a target for IF/GOTO/WAIT etc) LABEL name Target for IF, WAIT, GOTO, TIMEOUT etc. statements. The label must be a valid string; there are no restrictions on lengths or valid characters otherwise. Every time a script attempts to jump to a non-existing label, an error-messag will be printed on the screen in reverse video (but see GOTO_OPT). See also ONERROR, which allows you to trap any kind of error.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.35: LABEL (Define a target for IF/GOTO/WAIT etc)

Page: 19

Labels are local identifiers - they may be duplicated in various scripts. Do NOT make the mistake of using a colon after the name, like in: LABEL Loop: ... GOTO Loop since in this example the label is named "Loop:", not "Loop"! 13.9.36: LOCAL (Declare a variable to be LOCAL) LOCAL var [...] Makes all mentioned vars LOCAL for the current invocation of a script. The names can be separated by either spaces (old syntax) or commas (new). This is a DECLARATION, the only one required anywhere in IVT script language. See variables explained for an explanation of how variables are created and referenced. See also GSET for global variables. See also CSET to create local variables dynamically. Procedures can be called recursively. Example: LOCAL a, b, c; This will declare variables a, b and c to be local. They can be used as norma variables, values are assigned using LSET (old) or '=' (new). The difference between a normal variable set by = and a variable declared LOCAL is only important for sessions that have multiple THREADs running or scripts that use recursion. Also notice that it is common to have multiple ONCONNECT scripts, that handle verious details for the session (like logging in and starting commands once logged in). All these scripts run in parallel o on the same session. A plain session variable like "x" is visible in ALL thes parallel scripts, so it is easy to introduce bugs that way. A neat script is script that keeps everything private to prevent such bugs. A LOCAL variable is instantiated when the script starts (the LOCAL statement should be the first statement in the script, but this is not required). Multiple simultaneous instances of such a script (either caused by THREADs or recursion) will have their own separate variable. Example: Script Fact x LOCAL Min1; IF $x == 1 THEN RETURN 1 Min1 = Call Fact($x - 1) RETURN $x * $Min1 END Shows a recursive function with a local variable "Res". not allow you to write: Script Fact x RETURN ($x == 1) ? 1 : ($x * Fact($x - 1)) Note that IVT does

Since a call to the function Fact must be preceded by the CALL keyword, and that can only by a simple statement like (Min1 = Call Fact($x - 1)). This is a limitation of the script language of IVT. 13.9.37: LSET (Set a local variable) New syntax: name = expr [;] And expr can be any complex combination of numbers, strings, operators and built-in functions. Old syntax: LSET name expr And expr must be a single number or string. Sets a non-global variable name to the value of expr. Variables set this way are local to the session (and thus, visible to all scripts and threads that run for the current session). Variables can also be global (set by GSET), in which case they are visible by all scripts in all sessions.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.37: LSET (Set a local variable)

Page: 19

Variables can also be local (either declared LOCAL or created using CSET), in which case they are only visible in the current script. LSET can also be used to set a parameter or a LOCAL variable. The equal sign can be used (optionally) for better readability. The following statements are equivalent: x = ($x + $y) * 2 LSET x = ($x + $y) * 2 LSET x ($x + $y) * 2 The first form is preferred. See variables explained for a discussion of the various variable types. 13.9.38: MENU (configure a menu in the menu bar) MENU MENU MENU MENU MENU MENU MENU MENU MENU MENU MENU RESET TITLE "Text string" CALL "Text string" Scriptname [arguments]... IVTFUNCTION "Text string" "function description" STRING "Text string" "string data" HELP "topic" LINE ENABLE DISABLE KEEPENABLED NOKEEPENABLED

These statements can be used to configure one entry in the session menu bar. The normal session menu bar has items like "Session", "Edit", etc. The custom menu entry will appear to the right of the "Session" entry. Make sure the title is not so long it causes trouble on narrow (80 character) screens. RESET TITLE CALL IVTFUNCTION HELP STRING LINE ENABLE DISABLE KEEPENABLED NOKEEPENABLED Clears and disables any previous menu. Sets the name of the menu entry on the menu bar. Appends an item that will call a script, return new text. Calls one of the internal IVTFUNCTION codes. Sets a help topic for the last-added entry. Appends an item that will send a string of data. Appends a horizontal line in the menu. Causes the menu to appear on the session bar. Causes the menu to disappear from the menu bar. Menu will remain usable during create-session dialog. Menu will not remain usable during create-session dialog.

The "Text string" is the literal text that appears in the menu. When a character in the string is preceded by an &, that character is highlighted and becomes the shortcut character. If you want an & character in the text, double it. There can be only ONE '&' character per menu item. It is your responsibility to prevent duplicate shortcuts. TAB characters are expanded, you should avoid other special characters. When you use a CALL, the specified function is called with the specified parameters when the user chooses the menu item. The function can return an optional string. When it does, and the string is not empty, it becomes the new text for that specific menu item. That way you can implement ON/OFF type of menu items that show the current setting. When you use IVTFUNCTION, the specified internal function is called. The "function description" is a string that is evaluated twice (once during definition and once more when the item is clicked). The evaluation must yield a valid IVTFUNCTION or it will produce an error message. When you use the "HELP" command, the string must specify a searchable topic i the IVT manual. When the user uses F1 or right-clicks the item, that topic in the manual will be displayed. Usually, you want to use a keyword here (since every keyword in IVT has its own manual page) but any searchable string will do. Normally, the custom menu is disabled while a create-session dialog is in progress (since most entries in your custom menu will require a session). When KEEPENABLED is specified, the entry will remain active. The default distribution of IVT configures a "Script" menu using this feature It does it like this: MENU RESET MENU TITLE "Scripts" MENU CALL "Key-broadcast on/off" DoBroadcast MENU HELP "Ex-Broadc" MENU CALL "Load project files" ProjectsAdd MENU HELP "PROJECTS"

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.38: MENU (configure a menu in the menu bar) MENU MENU MENU MENU MENU MENU CALL "Manage addressbook" ManageAddressbook HELP "HOSTLIST" CALL "Add your own here, click for info" ShowMenuHelp HELP "SCRIPTSMENU"# Click and right-click do same... ENABLE KEEPENABLED

Page: 19

Script ShowMenuHelp HIDE HELP "SCRIPTSMENU" END Careful study of this will tell you how to use this powerful feature. See menu bar for more details. 13.9.39: NEXT (End of a FOR/FORALL/FOREVER/WHILE) NEXT The NEXT statement ends a loop started by FOR, FORALL, WHILE or FOREVER, and starts the next iteration of that loop. There MUST be a matching NEXT for every loop (or you get a syntax error). See the examples. This is an important feature, others are prev/next 13.9.40: ONKEY (Jump to label when key is pressed) ONKEY label [UNIQUE] ONKEY off ONKEY PASSKEY When a key is pressed, jump to label. Identification of the actual key is in variables $ONKEYS1, $ONKEYS2, $ONKEYN1 and $ONKEYN2. Label must be off to cancel any outstanding ONKEY directive. This major feature of scripts gives you a way to take over the keyboard for a particular session. Once an ONKEY label directive is given, every time you press a key, IVT will give control to the code following label (for as long as the script does not return or issues an ONKEY off). When KEYBOARD OFF is used, keystrokes are NOT passed to ONKEY routines! The password learning system uses this feature to snoop the user name and the password as the users types them. The key that was pressed can be identified using the $ONKEYS1 and $ONKEYS2 variables, which contain the string-representations of the characters that were typed. For a plain data-key (say the letter 'a'), S1 will contain an 'a' and S2 will be empty. the key. For a function key, ONKEYN1 will be zero and ONKEYN2 will identify the function key. You can use this setup screen to turn on keyboard debugging which will display the scan-codes for the keys you press. Note, this does not tell you the data that the keys would send to the host. For that, have a look at ONSEND. When you use IME (International Method Editor) to type complex languages like Arabic or Chinese, the $ONKEYS1 will contain the UTF-8 representation of the complex data key. When IVT passes control to the script, it executes until a blocking statement is executed (such as WAIT or PAUSE), or an endless loop is encountered. When an ONKEY PASSKEY is NOT executed, the keystroke is ignored by the main body of IVT, which implies that the key is not processed. Thus, this can be used to filter keystrokes - PASSKEY says that the key shoul be passed to IVT, which will interpret them (send to host, enter setup mode in the case of an F3, etc). Not doing a PASSKEY allows processing of the keystroke by the script only. The numeric ONKEY variables are handy for function keys, the string variables are handy to process plain data. See also special variables for a list of other IVT built-in variables. See also TOASCII and FROMASCII. Also note that by using THREADs, there can be more than one script that 'wakes up' due to a single keystroke. They will all get a chance to process the key and execute an ONKEY PASSKEY. When the UNIQUE qualifier is used, only the thread that has used this will receive the keystrokes. If multiple threads are (foolishly) using this, only the first one found by IVT will receive the key.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.40: ONKEY (Jump to label when key is pressed)

Page: 19

The UNIQUE is important when the script knows for sure that the keys are meant for a specific purpose and nothing else could want them. Also note that this statement may result in pre-empting a WAIT statement. Control is passed to the label specified in the ONKEY statement and the WAIT is discarded and not restarted automatically in any way. This can be used to interrupt a WAIT that takes too long, but see also TIMEOUT, which is another way to interrupt a WAIT. See See See See See the KbdLine example for a script that makes use of ONKEY. also KEYBOARDMOD and BIND for other ways of programming the keyboard. also "Learn mode" and KEYMACRO. also ONSEND and PROMPT. also KEYBOARD and QUERYSETTING. 13.9.41: ONSEND (jump to label when data is about to be sent) ONSEND label ONSEND PASS_SEND ONSEND OFF $ONSEND_DATA This statement is very much like ONKEY, and is a late addition to IVT (17.0). The ONKEY statement allows you to monitor what keys are pressed by the user, and can determine whether that key is going to be processed normally or not. During development of a script to copy all keystrokes to all sessions (so you can type commands which are simultaneously executed on any number of hosts) a important shortcoming of ONKEY came to light - it does not know what data is generated by a key. For simple keys, that is not a problem, but ALT-keys, cursor keys, function keys, redefined keys, keyboard macro's and so on all together make it hard to predict what data actually is going to be sent to th host when a certain key is pressed. The ONSEND statement causes control to jump to the specified label every time IVT wants to send keyboard-generated data to the host. Before it does so, the actual data string is stored in $ONSEND_DATA. The script must decide whether the data is going to be transmitted or not. If the scripts terminates or blocks before it does an ONSEND PASS_SEND, IVT will throw the data away. If it executes a PASS_SEND, the data is transmitted normally. See also ONKEY. Example: ONSEND snddata FOREVER PAUSE LABEL snddata # Do something with $ONSEND_DATA ONSEND PASS_SEND NEXT The statements after the snddata label are executed every time IVT wants to send something, the data to send is $ONSEND_DATA. Check out the BROADC.IVT script in the IVT distribution kit, this broadcasts keystrokes to all sessions upon request (easy to start and stop). 13.9.42: PAUSE (Block, wait for interrupt) PAUSE This statement is an elegant way of making an IVT script block (to do nothing efficiently). Execution of the script is suspended. A PAUSE can be broken by various events: A TIMEOUT that expires; An ONKEY is active and a key is typed; And ONSEND is active and data is transmitted; A TRAP is active and another THREAD issues a KILL; The script is cancelled by the user (F3-C);

See the KbdLine example for a script that makes use of PAUSE. See also YIELD.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.43: POPUP (Display popup, get result) 13.9.43: POPUP (Display popup, get result) POPUP string [varname1 varname2 [timeout]]

Page: 19

Put "string" in a popup. The user has to acknowledge the popup before the script can continue. When the session executing the POPUP is in the background, IVT will sound the (background) BELL and wait for the user to switch to that session. Only then will the popup appear. Notice that the background of the status indicator will be red because of the bell. NOTE: varname1 and 2 are NAMES of variables, not CONTENTS of variables, so they must NOT be preceded by a '$'! The named variables are created (or reset by POPUP! When varname1 and varname2 have been specified, they are used to store the scan codes of the key that is pressed by the user to acknowledge the popup (they have the same values as $ONKEYN1 and $ONKEYN2). When the user clicks OK, $varname1 will be set to 13 (\r) and $varname2 to 0. When the user cancels the popup, $varname1 will be set to 27 (ESC) and $varname2 to 0. When the optional timeout is specified, the popup will remain on-screen for no more than the specified number of milliseconds. When the timer expires before a key is pressed, both $varname1 and $varname2 will be set to "0". The popup dialog will not normally show a CANCEL button, unless the variable named by varname1 already exists and contains the word "CANCEL" when you use the POPUP statement (this interface leaves something to be desired :-). Of course, IVT will continue to process all other sessions, scripts and threads while waiting for the user to acknowledge the popup. See also WINDOW, which allows much finer control over (text) popup windows. See also DIALOG, which allows full-fledged GUI dialogs created by an IVT script. Example: FOREVER one = "CANCEL"; POPUP "Enter a digit" "one" "two" 10000 # After popup, $one and $two contain result! IF $one == 27 THEN BREAK # Cancel, or ESC IF $one == 0 && $two == 0 HadTimeout x = TOASCII($one) IF $x < "0" || $x > "9" THEN CONTINUE BREAK NEXT This gives a popup (with a CANCEL button) that waits for the user to type a digit. When a wrong key is typed, the question is asked again. When nothing is typed for 10 seconds (10000 milliseconds) IVT branches to the HadTimeout label. 13.9.44: RETURN (Return from a CALL statement) RETURN [expr] Ends invocation of a script, returns an optional value of expr. When the script was started from a CALL, execution will continue after that CALL (recursion is allowed). The return value of the script will be the optional string value (or the empty string if no value is supplied). A script can also end by simply reaching the END line. In this case, no value is returned. When the script was started because of a BIND, CREATE, F4-X and so on, any returned value is simply discarded. The expr can actually be a complex expression, like: RETURN ($x + 1) * 2 See also THREAD, FORK, CALL and WAITTHREAD. 13.9.45: PUSHBACK (Push back data for a WAIT) PUSHBACK string When you push back data, that data will be seen by the next WAIT statement as that realises it is looking at unexpected data. The data is NOT seen by anything else but the script WAIT statements. See VTECHO for a way to create data that seems to come from the host and is

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.45: PUSHBACK (Push back data for a WAIT) "seen" by the rest of IVT.

Page: 19

There is no limit to the amount of data that can be pushed back, nor is there a rule that pushed back data should matched really received data (so you can use this to generate fake data to wake up a WAIT) It is also not an error to PUSHBACK an empty strnig (is ignored silently). 13.9.46: SCREEN (Change screen size) SCREEN rows columns SCREEN row% columns% This command was removed from IVT in version 19.0. The new WINDOW_SIZE command can be used in a script instead. 13.9.47: SCRIPTDEBUG (Print script debugging into a file) SCRIPTDEBUG file SCRIPTDEBUG off When writing scripts in the IVT script language, this statement can aid in debugging such scripts. When a file is specified, every executed statement is traced into that file with many details (time, parameters, etc). When off is specified, tracing is turned off, the file is closed. When the file does not exist, it is created (the complete pathname is created automatically, missing directories are created). When the file exists, it is appended to, not overwritten. All scripts for the session are debugged into one file! So once debugging is turned on, it is on for ALL currently running scripts and future scripts for the current session. Different sessions can have different (or no) debugging. Scripts read from encrypted files cannot be debugged, this is a There are no debug levels: all relevent details are logged, always.

13.9.48: SECRET (Run script without status indicator) SECRET When a script is active for a particular session, IVT will normally show a red S icon in the status line to show this (so the user knows that a script is active which might interfere with normal operation of keyboard or screen). When all active scripts have the SECRET attribute, the status line will NOT show this indicator. However, if your script marked SECRET uses a CALL to another script that is not marked this way, the status line may show the indicator again (but the status line is only updated when a blocking statement is executed, so you may get away with CALLing non-secret scripts that RETURN quickly). See also crypting files and the CRYPTFL function. See also HIDE, DETACH, CANCEL and SHAREMODE, which are all attributes of scripts. 13.9.49: SEND (Send data on a session) SEND string Sends the string on the session. This is an important statement, often used in chat-scripts to allow all sorts of interaction with a host. The string can be a complex string expression. The WAIT statement allows you to monitor incoming data from the host and act accordingly. Like all strings, you can make use of \ characters to send special characters For example, if you want to send a ^C character (an ASCII chaarcter with the hexadecimal value 3), you could use SEND "\03". Here is another example: Script LogIn HIDDEN WAIT CASE_INSENSITIVE "login:" Send "johnb\r" WAIT CASE_INSENSITIVE "password:" SEND "Secret\r"

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.49: SEND (Send data on a session) END

Page: 19

You cannot send NULL characters with SEND, since IVT uses C-style strings internally (which are terminated by a NULL character). Use SENDNULL for this purpose. See also SEND_KEYB. 13.9.50: SEND_KEYB (Send simulated keyboard data) SEND_KEYB string This does exactly what SEND does, only IVT treats the data to be sent to the host as if it was generated by the keyboard. The upshot is that if you have one thread using SEND_KEYB, and another thread implies that the ONKEY can stop the data from actually being transmitted. A normal SEND does NOT wake up an ONKEY in another thread. For example, the ESCESC.IVT script when combined with the BROADC.IVT needs this to function properly. See also SEND and ONKEY. 13.9.51: SENDNULL (Send 1 or more NULL characters) SENDNULL number The SEND statement can be used to send any sort of data to the host, except for NULL characters. A NULL will terminate any sort of string used by IVT, so it can never be part of any string (constant or variable). Since IVT should be able to send any sort of data to the host, the SENDNULL statement is required to fill the gap. It takes one argument, which should evaluate into a number between 1 and 1024 IVT will send that number of NULL bytes on the session. The number-expr can be a complex numerical expression. See also SEND and WAIT ANYCHAR. 13.9.52: SETDTR (Toggle serial DTR line (forces hang-up)) SETDTR on|off Serial sessions only. Raises (ON) or lowers (OFF) the serial line DTR (Data terminal Ready) signal. For non-serial sessions, this statement is ignored. When a modem is connected to the session, lowering the DTR signal will normally result in an immediate disconnect (hang-up) by the modem. Thus, this is a HARDWARE method of disconnecting, which is to be preferred over software since it is more reliable. However, proper operation depends on the configuration of the modem (which can be made to ignore the DTR setting) and the cable between modem and PC (if you have an external modem). Be sure to allow some time to pass between a SETDTR OFF and SETDTR ON. If the interval between these events is too short, most modems will ignore it. For example: SETDTR OFF USLEEP 250 SETDTR ON This is a sequence that will lower DTR for a quarter of a second, which shoul work reliably. See also WAITCARRIER. 13.9.53: SETPOS (Position cursor) SETPOS row column Position the cursor to the specified row and column. The top-left corner of the screen is on row 1, column 1. When the specified position is outside the current screen size, IVT will position the cursor a close as possible. The current cursor position can be obtained using CURSOR_COL() and CURSOR_ROW(). The dimensions of the screen are given by $ROWSand $COLS.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.53: SETPOS (Position cursor) Example: SETPOS ($ROWS / 2) ($COLS / 2); Positions the cursor in the middle of the screen. See also VTECHO, ECHO and CLS. See also WINDOW_SIZE.

Page: 19

13.9.54: SHAREMODE (Allow multiple script invocations yes/no) SHAREMODE "ALL" SHAREMODE "SESSION" SHAREMODE "NONE" The default for this is SHAREMODE ALL. This statement is not really a statement, but like DESCR and HIDE attaches a specific attribute for the script it is found in. A script with attribute SHAREMODE NONE can only have ONE instance at any time within IVT (remember that scripts normally run in the context of a session an IVT can run multiple sessions). When you attempt to start a second instance of this script (using CALL or THREAD or IVTFUNCTION or BIND etc), any such attempt will fail when the previous instance of the script is still active. When you use SHAREMODE SESSION, other instances of the script can exist at th same time, but only when they are part of ANOTHER session (so this limits the script to one instance per session). The default (SHAREMODE ALL) imposes no restrictions. This statement is useful when you use KEYMACRO with an ASYNCFUNCTION option. Every time you press the key, IVT creates a new instance of the script, which CAN cause multiple simultaneously running copies of the script if you are not careful. A SHAREMODE SESSION will, in such cases, quietly refuse to start new copies as long as one is still running. SHAREMODE NONE is useful for scripts manipulating files or doing user interaction. Only one per IVT instance is allowed. No error message is given, but a debugging diagnostic is printed when IVT refuses to start a script due to a SHAREMODE violation. using session-local (LSET) variables for a SHAREMODE SESSION and global (GSET variables for SHAREMODE NONE to administrate the fact that a script is runnin and test for that when the script is started. However, it can be tricky to administrate termination of a script reliably (because a script can be killed, aborted by the user, the session it is part

13.9.55: SLEEP (Suspend current script N seconds) SLEEP seconds Suspends current thread for seconds seconds. Incoming data from the host will still be processed, and other threads for that session are not blocked. The seconds parameter can be a complex, numerical expression. Other sessions and scripts continue to execute at full speed, of course. See also TIMEOUT, which allows finer control (milliseconds). See also USLEEP, which allows millisecond sleeps. 13.9.56: STATUSHOST (Show string in status line) STATUSHOST string Shows string as host in the status line. Use this when you have complex scripts that log you in from one host to another (using Unix telnet or SSH, for example) which results in the host that IVT is connected to no longer being the one the user is actually talking to. The string parameter can be a complex string expression. The string will be displayed in the status line. See also F4-S, where this data can be edited manually. Clicking on the text is another way to modify it. See also STATUSTXT and STATUSTXTFIX to manipulate other parts of the status line.

function. IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.57: STATUSTXT (Show temporary comment in status line)

Page: 20

13.9.57: STATUSTXT (Show temporary comment in status line) STATUSTXT string STATUSTXT "" Temporarily shows string in the comment part of the status line. An empty string cancels this, which will result in the original comment being restored. This command is intended to be used to display progress during a script that takes a while to complete. This dialer is an example of such a script. See also the $STATUSTXT variable. IVT maintains two comments for each session: - The permanent comment, which is set when the session is created, either by a CREATE statement or by the host using an ESC<space>C. A script can overrule any comment by using STATUSTXTFIX. - The temporary comment, which can be set only with the STATUSTXT command and is meant to display some sort of progress to the user. By cancelling the temporary comment, IVT will restore the permanent one. See also F4-S, where this comment can be <Edit>ed manually. When COMMENTIGNORE is used, a number of these commands to set the status text will be ignored (this is to make sure the proper text ends up in the status). In some circumstances, it may be required to issue a COMMENTIGNORE 0 before using the STATUSTXT command to force it to be accepted. 13.9.58: STATUSTXTFIX (Show fixed comment in status line) STATUSTXTFIX string Shows string in the comment part of the status line. See also STATUSTXT, which alters the comment part of the status line temporarily (and a discussion on permanent vs. temporary comments). See also F4-S, where this comment can be <Edit>ed manually. See also the $STATUSTXT variable. When COMMENTIGNORE is used, a number of these commands to set the status text will be ignored (this is to make sure the proper text ends up in the status). In some circumstances, it may be required to issue a COMMENTIGNORE 0 before using the STATUSTXT command to force it to be accepted. 13.9.59: SWITCHTO (Make a session the foreground one) SWITCHTO number IVT will switch the session with the specified number into the foreground. The number of a specific session can be communicated between sessions by means of GLOBAL variables (see GSET) and the MYSESSNR The number that identifies a session is normally the same you would see in the status line. However, when you have more than 10 sessions, or sessions in several groups, the internal number used by IVT is different from the perception the user has. You can use this when you have a complex series of scripts that manage a single logical task by means of several sessions. If the session number is invalid, the statement is ignored. See also FORK, CREATEGRP, IGNCHILDREN and so on. 13.9.60: TIMEOUT (Jump to label after N milliseconds) TIMEOUT ms label TIMEOUT 0 After ms milliseconds, jump to label. The ms expression must be a simple, non-complex expression. This can be used to set a timeout on a WAIT statement, infinite loop and so on. Use a TIMEOUT 0 to cancel any outstanding timer. Several timers can be active for a single session by using THREADs, but normally speaking there is only one per session (a new timeout statement will cancel any running timeout and set a new one). If a SCRIPT has set a TIMEOUT before CALLing another script, and the timer fires before the called script has RETURNed, all called functions are terminated prematurely and control is passed to the specified label regardless (like a SIGNAL and a LONGJMP would do in C).

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.60: TIMEOUT (Jump to label after N milliseconds)

Page: 20

When a SCRIPT terminates (RETURNs) before a timer it has set expires, the timer is cancelled. You can use QuerySetting("TIMEOUT") to find out how much time is left before the timeout expires. See the WaitPrompt script for an example use of timeouts. See also SLEEP and USLEEP, which can block a script without doing something else in the meantime. See also PAUSE. 13.9.61: TRAP (Catch signals from KILL) TRAP sig label TRAP sig off Branch to label when signal sig is received (or turn catching off for signal sig when label is off). The signal number must evaluate to a number between 1 and 10 inclusive. The signal can be sent from another session or another thread using the kill function. Unix shell programmers will recognize these constructions. Within IVT this can be used to synchronise sessions. or to synchronise threads running on behalf of a single session. The key broadcast script shows examples of using TRAP and KILL. 13.9.62: UNSET (Delete variables) UNSET Variable ... This deletes the named Variables. It will free the memory used by those variables and make them undefined. When you UNSET a LOCAL variable, it will lose its LOCAL status. Please do not UNSET internal IVT variables (you might crash IVT that way, these variables are not protected from such abuse). You can unset variables indirectly, like so: somename = "Special" UNSET $somename x This will delete the variables Special and x. You cannot unset ENV_ (environment) variables. NOTE: UNSET always interprets plain names (unprotected by quotes) as names, irrespective of the current setting of IdentifierAs. 13.9.63: USLEEP (Wait for a specified number of milliseconds) USLEEP MilliSecs This statement blocks the current thread of execution for the specified number of milliseconds. Other threads continue to execute normally. How many milliseconds actually elapse before the next statement is executed depends on the speed of your machine and the number of other tasks that IVT is working on. The MilliSecs expression can be a complex, numerical expression. See also SLEEP, TIMEOUT, TRAP, KILL and PAUSE. 13.9.64: VOLATILE (Mark IVT.RC changes as temporary) VOLATILE <.rc statement> NOTE: Read carefully! This statement is used in rare cases. Consider a script that connects the use Pageant authentication agent. Normally, the SSH_SHOWAGENT will issue a warnin for every time the agent is used, but in this case so many of them are issued that the users consider them a hindrance, since they also mess up the screens built by the application. So the script, knowing this, issues a: NO_SSH_SHOWAGENT to turn the warning off. This is a setting local to the current session, so the warnings are only turned off for this particular session, and all seems well. But now the user enters setup, changes some entirely different attribut (for example, the screen colors) and then uses "Save as" to save these new

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.64: VOLATILE (Mark IVT.RC changes as temporary)

Page: 20

color settings as the startup defaults. IVT compares all the current settings of the session to the current defaults, and saves all the modified values. Now, unexpectedly and unintentionally, the SSH_SHOWAGENT gets turned off permanently because the save-to-registry function cannot distinguish between a value modified by the user and a value modified by a script! In this particular example, this has serious security implications. see the proxy script for a script that could leave a proxy intended for a single session enabled the same way. The VOLATILE statement is invented for these rare cases. When it is used to qualify an IVT.RC statement, it tells IVT that this particular change must NO be saved into the registry. The rules are as follows: - The VOLATILE qualifier can only be used in a script. - When used, the particular change (or changes!) the statement causes to the current setup of the session are recorded in a list for the session. There is a separate list for GLOBAL settings. It is supported to have a VOLATILE on a global setting, but this is not recommended. - When the SAME setting is changed for the SAME session WITHOUT the VOLATILE qualifier, the matching entries from any recorded list are REMOVED. This means all "normal" changes made by a script CAN be made permanent by saving the current setup to the registry. - Some terminal settings can be changed by the host, too (by sending escape sequences). Such changes are always considered VOLATILE, too. These are items like smooth scrolling, line wrapping, nouse mode, etc, - The list is used in two places: When saving to the registry and in setup. - When saving to the registry, all items in the recorded list are skipped, so when IVT loads the registry profile, these particular values will have their startup default values (remember IVT only records changed items in the registry). - When the users enters interactive setup, all items marked as volatile are shown in a different color to make them stand out. When you right-click on such an item to obtain help, a popup will tell you the item is marked as volatile and point you to this manual page to explain it. Also, when the user MODIFIES an item marked as VOLATILE and applies the change, the VOLATILE indicator is deleted and the change WILL become permanent when the user saves the setup. In other words, any change made by a user is always considered to be intentional, and saved. - If changes in setup are abandoned (cancelled), then changes to the volatile lists are abandoned, too. - If the terminal is reset, all volatile items for the session are cleared. For example, if a script does a VOLATILE NO_SSH_SHOWAGENT and the user enters setup and opens the SSH panel, he will see the "Hijack protection" checkbox DISABLED (because that is the (volatile) setting for the current session). Also, the decription of the item will be in COLORVOLATILE colors to indicate the special status of the field. If the setting is not touched, and the setup is saved, the SSH_SHOWAGENT setting is NOT saved (the VOLATILE applies). If the setting is toggled ON, the VOLATILE indicator is removed for that particular setting (the colour changes). If the user saves setup now, the indicator is STILL not saved, since the current value (ON) is equal to the startup value, thus not considered changed, and not saved. If the user would have toggled the setting on and back off immediately, THEN saving setup WOULD save the new (OFF) value, since there is no VOLATILE in effect anymore and the current value is different from the default. So, use with care, since a user can be confused by this... The visual (color) indication helps, but is no guarantee. See also GLOBAL and COLORVOLATILE. 13.9.65: VTECHO (Send strings through VT220 engine) VTECHO string Treats string as if sent from the host. All ESCape sequences are interpreted and acted upon. This differs from ECHO, which can only display data. When an inquiry command is passed to VTECHO, IVT will respond to the host.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.65: VTECHO (Send strings through VT220 engine)

Page: 20

Use this when you want to use colors and complicated screen formatting commands. There is no limit to the length of the string you want processed. See also ESC<space>R, which allows running local commands, which can be initiated from a script this way. The string expression can be a complex expression. VTECHO data is processed BEFORE any "normal" session data. This means that if you use WAIT statements followed by a VTECHO when something is found that you were WAITing for, IVT will process the VTECHO data immediately. Pending data for the session is, of course, processed afterwards. Also, VTECHO data is processed asynchronously from the execution of your script. This means that if, for example, you use VTECHO to position the cursor, then use ECHO to display data at that position, it may well be that the data is displayed in the wrong position because the VTECHO is not actuall processed yet. To force this, use WAITIDLE, which blocks execution of your script until all buffered data is processed. See also CLS, SETPOS and SPRINTF. This is an important feature, others are prev/next 13.9.66: WAIT (Wait for several things simultaneously) WAIT WAIT WAIT WAIT WAIT WAIT WAIT WAIT WAIT WAIT string[,label]... IN string[,label]... IN_UNIQUE string[,label]... ANYCHAR[,label] VARIABLE_ASSIGN varname[,label] ... CASE_INSENSITIVE ... ... CASE_SENSITIVE ... ... EAT_MATCH ... ... EAT_NOMATCH ... ... EAT_NONE ...

This is one of the more powerful statements in the IVT language. Together with the SEND statement is allows you to write chat scripts that perform a variety of automatic functions on a host. The power comes from the fact that the WAIT can wait on an unlimited number of strings simultaneously and branch to different labels depending on the first matching string actually received on the session. Example: WAIT CASE_INSENSITIVE\ "connect" \ CASE_SENSITIVE\ "BUSY",busy \ "VOICE",voice\ "NO DIALTONE",notone\ "NO ANSWER",noans\ "NO CARRIER",noans This is taken from a real Hayes modem dialing script. NOTE: Strings and their labels are separated by a comma and there must NOT be any spaces between them! If your string contains spaces, it must be quoted The rules are: - A missing label (no label name after the string) will simply cause the next statement to be executed (fall through) when the string is matched. The connect in the above example uses this; - The entire WAIT statement can be prematurely cancelled by a TIMEOUT expiring. This allows you to set a maximum time on a response from a host before giving up. - The string must be enclosed in quotes when it contains spaces or commas (if you want to, you can also enclose other strings, of course). Empty strings are ignored. This allows you to use variables in strings that can be undefined or empty, so you can wait for optional strings. - When string is exactly ANYCHAR, it will match any single character. The specific character is stored in the variable $ANYCHAR. The hexadecimal value of the received character is stored in $ANYCHAR_HEX This is the only way that NULL characters can be detected by WAIT. - When string is exactly CASE_INSENSITIVE, all subsequent matches will be cas insensitive. A CASE_SENSITIVE can be used to turn sensitivity back on. The default is to be case sensitive. So, in the example above, the "connect is matched with sensitivity turned off, the rest is case-sensitive. - When you use IN "string"[,label], you get a sort of ANYCHAR that waits for specific characters only (any received character that is present in string will cause the WAIT to terminate. The specific character is stored in the

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.66: WAIT (Wait for several things simultaneously)

Page: 20

variable $WAIT_IN). This character comparison is NOT influenced by the CASE_INSENSITIVE setting! - When you use IN_UNIQUE "string", a character only matches when it is NOT part of one of the other strings in the WAIT statement. E.g: WAIT "SSH: Access granted!",SshOK \ IN_UNIQUE ">:#%",Prompt This attempts to scan for a string and a number of common prompt characters However, the ":" is also part of the first string! Therefore, an IN_UNIQUE will only branch to the Prompt label when the current WAIT is NOT currently busy recognizing a "SSH: ...". For this to work, the IN_UNIQUE must be LAST in the WAIT list. For an example, see this part of the auto-login system. - When you use ASSIGN_VARIABLE, the next argument must evaluate to the name of a variable. The WAIT will terminate when the named variable is assigned The name of the assigned variable is stored in $WAIT_VARIABLE. This is most useful with special variables assigned by IVT, or for variable used by the auto-login process. For an example, see this part of the auto-login system. It can also be used for global variables, and as such it can be used to do inter-session communication. See the key-broadcast script for an example. Note: Multiple sessions can have multiple threads that wait for an assign t a single global variable. When an assign is done, all those threads wil wak up simultaneously. This is a key principle in the key-broadcast script. - The EAT_MATCH, EAT_NOMATCH and EAT_NONE are like the CASE_SENSITIVE words. They influence the type of string matches that follow. Normally, when WAIT matches characters received on the session, the characters themselves get default treatment (will be displayed on the session screen). But, sometimes you want the characters to be recognized by the script only, so the receive data is "eaten" by the WAIT statement. The EAT_MATCH will cause characters matched by a string to be eaten. The EAT_NOMATCH will cause characters NOT matched to be eaten. The EAT_NONE restores normality - nothing gets eaten. This can be used to extend the command set of IVT. For an example, see here. Note that when you do WAIT EAT_MATCH "ABC" and the data received is "ABD", this causes "back tracking": The "A" and "B" are initially eaten, but when the "D" is seen instead of the expected "C", the WAIT realises its mistake and replays (backtracks) the "AB". IVT can handle multiple threads that use multiple wait statements, where optionally each wait statement can have multiple wait clauses. Each clause can cause a character to be eaten due to an EAT_MATCH or an EAT_NOMATCH, and some clauses can wait on (partially) overlapping substrings of other clauses. IVT sorts out the whole mess and eats and backtracks characters as appropriate. See also PUSHBACK. The example at the top will continue on the next line when the string "CONNECT" is received, and branch to different places when various errors are returned by the modem when attempting to establish a connection to a remote computer. This allows the script to give appropriate error messages in each case. Note that NULL characters can be matched only by a WAIT ANYCHAR, since they cannot be part of one of the normal strings or IN arguments. NULL characters are ignored by a normal WAIT statement, so VAX machines that sometimes send NULL characters in random places can be accommodated. Also note that some (serial) hosts have an annoying tendency to sprinkle the conversation with NULL bytes, meant for delay (timing) purposes. For examples, see the password learning system. 13.9.67: WAITCARRIER (Wait for serial carrier state) WAITCARRIER ON|OFF Waits until the carrier-detect signal of a serial line takes the state specified (on or off). This statement is ignored for non-serial sessions. See also SETDTR, which can manipulate the Data terminal Ready line. This command can be used to monitor incoming modem connections. Normally, a modem will raise the CARRIER signal of the serial line when an incoming call is established. IVT will monitor this signal and show the state in the status line. It depends, however, on the configuration of the modem and the cable between modem and PC for this to work properly. See also this setup screen to change the status line indicator.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.68: WAITIDLE (wait for receive/transmit buffers to empty)

Page: 20

13.9.68: WAITIDLE (wait for receive/transmit buffers to empty) WAITIDLE Sometimes, complex scripts such as the modem dialer use a combination of commands like SETPOS and ECHO (which have an immediate effect) and commands like VTECHO (which are handled asynchronously by IVT). This can result in strange effects where the results of ECHO statements and VTECHO statements are not processed in the expected order. To keep VTECHO fast, I do not want to make it synchronous, so I've added this WAITIDLE statement, which briefly halts the script to give IVT the opportunity to process stuff in incoming and outgoing buffers. The script resumes as soon as all these buffers are empty. It is also possible to use this to wait until all received data has been processed and the session is quiescent. See this example. Example: WAIT "blah\n" WAITIDLE Receiving "blah\n" will cause the WAIT to end. But the "\n" is FIRST matched by the WAIT and only processed AFTER that. The WAITIDLE will wait until the receive buffers are entirey processed. 13.9.69: WHILE/NEXT (Basic style loop) WHILE expr Statements NEXT This is a basic WHILE loop. The Statements between WHILE and NEXT are executed as long as expr evaluates to TRUE. The rules for the expr are the same as for the IF statement. This example reads a file line by line: fd = OPEN("InputFile.txt",0) Cnt = 1 WHILE (Ln = READLN($fd)) != "" echo "Line nr $Cnt: $Ln\n" Cnt = $Cnt + 1 NEXT CLOSE($fd); See also FOR, FORALL, FOREVER, NEXT, BREAK and CONTINUE. 13.9.70: WINDOW (Create and manipulate text windows) The WINDOW statement allows you to create text-windows that float on top of the session screen. This single powerful statement allows control over the appearance (TITLE, COLOR, BOX, SIZE, TIGHT) of the window, the contents (TEXT, MORE) and relative order of the windows. A WINDOW can be active while data is being received. The WINDOW statement is much more versatile than POPUP. For interactive GUI dialogs, see DIALOG. Execution of a script continues while the window is being displayed, where a POPUP must first pop down before execution of the script continues. The Autologin & Password Learning system uses these windows extensively. See this example, which is an extract of the password learning system. A few simple rules: - Windows CAN overlap each other; - The window that is created LAST will be on top; - IVT will allow activity on the session while the windows are visible. Text on the session will scroll 'underneath' all windows. - A WINDOW should be manipulated with the NOSHOW command in effect. After all necessary commands have been given, issue a SHOW command, this will make the actual window appear. When SHOW is in effect, IVT will show all intermediate results on-screen, causing a lot of flicker (screen-redraws). - The existence of a window handle can be tested with the WINEXISTS function. The following parameters are allowed: - WINDOW Name This creates a new window named "Name". The Name must not exist yet. All other WINDOW commands refer to this handle. Creating a WINDOW handle makes (as yet) nothing happen on the screen.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.70: WINDOW (Create and manipulate text windows)

Page: 20

- WINDOW Name TEXT "String" - WINDOW Name MORE "String" This sets the contents of an actual window to the string "String". The TEXT command replaces any previous text, the MORE command appends the text to any existing text. There is no check for windows larger than the screen. Strange and unpleasant things will happen if you try. - WINDOW Name ROW n - WINDOW Name COL n This determines the position on the screen of the upper-left corner of the window. The default is to display a window centered in the screen. For your convenience, a few handy shortcuts are: - A position of -1 means rightmost (COL) or bottommost (ROW). Thus, if you specify -1 for both ROW and COL, the window will appear in the right-hand lower corner of the screen. - A position of 0 means 'centered'. Thus, if you specify 0 for both ROW and COL, the window will appear in the center of the screen. - Absolute numbers will be interpreted as screen coordinates. Insane values will be silently adjusted. The upper-left corner of the screen is 1, 1. - WINDOW Name TIGHT - WINDOW Name NOTIGHT Normally, the optional box has a little room between the text inside the box and the lines that make up the box. When TIGHT is specified, that room is omitted. - WINDOW Name SHOW - WINDOW Name NOSHOW The SHOW command will make the window appear. The NOSHOW will make it disappear. Manipulations of windows would be done with a NOSHOW, to prevent irritating flicker on the screen caused by multiple redraws. - WINDOW Name KILL - WINDOW Name TIMEOUT n This is the way to get rid of a WINDOW. The KILL command immediately removes the window and destroys the named handle. Subsequent commands with that name handle will be invalid (except a new create with the same name). The TIMEOUT command will destroy the window in n milliseconds. This allows you to leave a last message on the screen for a while, after which it will self-destruct. All windows are killed automatically when the session dies or when the user uses F3-C or F3-R. - WINDOW Name NOBOX - WINDOW Name BOX - WINDOW Name THINBOX When you specify BOX, the window will have a border. NOBOX will remove any border. The default for a window is to have a border drawn with double lines. Specifying THINBOX will use single lines to draw the border. - WINDOW Name TITLE "String" This sets the title of the window to string. This is displayed in the top row of the BOX. A title will be invisible if you specify NOBOX. - WINDOW Name COLOR "String" This determines the foreground and background colors of the window. The String must have the format of the COLORS statement (for examples see below). As an example, this would display an error message in the center of the scree for a few seconds. The extra new lines make it more attractive. WINDOW WINDOW WINDOW WINDOW WINDOW WINDOW ERR ERR ERR ERR ERR ERR NOBOX COLOR "WHITE RED BRIGHT BRIGHT" TEXT "\n Try again \n\n" SHOW TIMEOUT 2500

See here for another example. See the WINEXISTS function, too.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.9: SCRIPT statements 13.9.71: WIN_MINIMIZE/MAXIMIZE/SHOW (Min-/maximize/show window)

Page: 20

13.9.71: WIN_MINIMIZE/MAXIMIZE/SHOW (Min-/maximize/show window) WIN_MINIMIZE WIN_MAXIMIZE WIN_SHOW These functions manipulate the window the IVT runs in (it calls the Windows API call ShowWindow). WIN_MINIMIZE - Minimizes the window (shows only on taskbar) WIN_SHOW - Calls SHOWNORMAL, restores previous size and position WIN_MAXIMIZE - Calls SHOWMAXIMIZED, maximizes the window. These statements can be used to make a batch-like IVT application where the user starts IVT from a shortcut, which creates sessions, executes scripts etc which the user does not have to see (at least not all of it). When a MINIMIZE is used, the IVT application minimises itself. Note that the user can always explicitly restore the window by clicking on the taskbar. WIN_SHOW restores normality, WIN_MAXIMIZE explicitly maximises the window. See also -B command line option and WINDOW_SIZE. See also the FULLSCREEN statement. 13.9.72: YIELD (Voluntarily give up the CPU) YIELD This statement will make IVT stop executing the current thread and pursue other business. Normally not needed, since the scheduler of IVT is capable of scheduling all sessions, scripts, threads, timers and such and still give good response, but included for sake of completeness. See also PAUSE. 13.10.1: ABS (Absolute numerical value) ABS(Numeric-expression) This function simply returns the absolute value of its argument. The expression can be any numeric-value yielding expression. Example: ECHO ABS(5 - 7) "\n" Will display "2". 13.10.2: BROWSEFILE (Use Windows file selection dialog) variable = BrowseFile(ShouldExist,AskOverwrite,FilterName,FilterPat) This function call makes the standard Windows functions GetOpenFileName and GetSaveFileName available to IVT scripts. It pops up the familiar file selection dialog and allows the user to select an object on the file system to be used or created, The rules are: - ShouldExist If this evaluates to FALSE (0), the GetSaveFileName function is called to select an object that does not exist yet. existing object. - AskOverwrite When TRUE, a popup will be displayed asking an overwrite confirmation when the user selects an existing object (if your script is going to overwrite a file it is wise to pass TRUE here). - FilterName and FilterPat FilterName is a display string that describes a filter (for example, "Text Files"), and the FilterPat string specifies the filter pattern (for example "*.TXT"). To specify multiple filter patterns for a single display string, use a semicolon to separate the patterns (for example, "*.TXT;*.DOC;*.BAK") A pattern string can be a combination of valid file name characters and the asterisk (*) wildcard character. Do not include spaces in the pattern string. The system does not change the order of the filters. It displays them in th File Types combo box in the order specified in FilterName. The function returns the selected object when succesful as a Windows path (so

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.2: BROWSEFILE (Use Windows file selection dialog) with backslashes instead of slashes). The empty string is returned when the user cancels the operation.

Page: 20

For further details, see msdn.microsoft.com and search for the OPENFILENAME structure. See also PROMPT. 13.10.3: CALL (Call a function that returns a value) variable = CALL name[(expr[,expr...])] (new syntax) LSET variable CALL name [params]... (old syntax) This form of CALL invokes a script called name (possibly recursively). This script executes and eventually RETURNs. The value passed to that RETURN is assigned to the given variable. The name of the script does not have to be a constant, you can call scripts indirectly. For example: Proc = "SomeScript" x = CALL $Proc("a",$b) will call the script "SomeScript" with parameters string "a" and the current contents of variable $b. All parameters are passed by value. There can be any number of actual values for parameters, which can all be complex expressions, use IVT internal functions and so on. The declared script is supposed to have a parameter declaration for every parameter passed. When too many actual values are passed, they are ignored. When too few are passed, the called script will receive empty strings. A CALL without an assignment to a variable will also work, any RETURNed value is discarded. This is, of course, a very powerful feature of IVT. There are several example in this manual that allow you to study how scripts are written, see: Script to log on to a host automatically Script to dial out through modems Script to read line from keyboard Waiting for any sort of prompt 13.10.4: CLOSE (Close a file) CLOSE($fd) This simply executes an operating system CLOSE call on the given file descriptor and returns whatever value is returned by the operating system. It is the responsibility of the script programmer to make sure that the file descriptor is valid (i.e. obtained from a previous OPEN or CREAT call. If you close files that belong to IVT (script files, IVT.RC files, etc.) then you should expect the unexpected. See also OPEN, WRITE, CREAT and READLN. See the modem dialer for an example of using these statements. 13.10.5: CHDIR (Change directory) CHDIR(directory) The function returns 0 when successful. A return value of -1 indicates an error, and $ERRNO is set to indicate the error. See also GETCURDIR. 13.10.6: COMPUTE (Perform simple calculations) LSET Variable COMPUTE expr The COMPUTE function is a relic of the past. Versions 21 and later of IVT support complex expressions that can be used in LSET and IF statements, and The assignment statement in IVT can now do things like: x = $x + $y * ($z + 20) See expr for details.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.6: COMPUTE (Perform simple calculations)

Page: 20

The manual entry for the original COMPUTE statement is retained for historica reference. Old syntax: LSET Variable COMPUTE expr1 operator expr2 NOTE: COMPUTE has been superseded by normal, nested expressions... IVT can perform calculations upon the numerical representations of variables (and constants). The expr1 and expr2 cannot be complex expressions. To keep IVT small and fast, I have not attempted to implement a full expression evaluator with parentheses, precedence and all the rest when the average script only needs things like a = a + 1 anyway. So there. The operator can be: + Addition -Subtraction *Multiplication /Integer division %Modulo Examples: LSET a COMPUTE $a + 1 LSET b COMPUTE $a * $a Don't forget the word COMPUTE! 13.10.7: COLORATTRIBUTE (Color code in a DIALOG) COLORATTRIBUTE(String) The new DIALOG statement of IVT allows you to create GUI dialogs. setup dialogs. The ColorAttribute function uses the internal IVT function to get colors into texts that you can add to a dialog. The String must be a valid color definition string (see COLORS). The function returns a small string that encodes the given colors. The code begins with a "~A", followed by two character (one for the backgroun and one for the foreground colors). Other such "~codes" are described at the ECHO statement. Example: DIALOG CFG TEXT_NL \ Concat(ColorAttribute("BrightRed BrightWhite"),\ "I am a ~1warning~0!\n") The ~1 turns on reverse video, swapping foreground and background colors, so the "I am a" text will be red-on-white, the "warning" will be white-on-red. The ~0 turns all video modes off (back to normal text). 13.10.8: CONCAT (Concatenate expressions into a string) CONCAT(expr1,expr2[,expr...]) This function takes a minimum of 2 arguments, there is no maximum. It takes the string representation of all arguments (each of which can be a complex expression) and returns a string which is the concatenation of all those strings. There is no practical limit to the size of the resulting string, other than available memory. So, you can do stuff like: ECHO Concat(Sprintf("%-30.30s",$Host), Sprintf("%-15.15s",$LoginNm), \ Sprintf("%-9.9s",$Indicator), \ "\n") \

Which is IVT's way to print a formatted line to the screen. Simple strings can also be concatenated like so: x = "$str1$str2" y = "${str1}and${str2}" The braces are necessary in this case becuse "and" will be seen as part of th variable name otherwise. See also SUBSTR, MATCH, LENGTH and STRSTR.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.9: COPYFILE (Copy a file) 13.10.9: COPYFILE (Copy a file) COPYFILE(SourceFile,DestinationFile)

Page: 21

This function simply copies a file. The first argument should yield an existing file. The second argument should yield a valid file name. If the destination file already exists, it is overwritten. The copy is done in binary mode (works for any file). The 0 1 2 3 result code is: Copy succeeded. Could not read SourceFile. Could not create DestinationFile. Could not write (all of the) data to DestinationFile.

When a problem occurred, the variable $ERRNO is set to indicate the reason of the failure. See also EXISTS, CREATE, OPEN, READLN, WRITE and CLOSE. 13.10.10: CREAT (Create a file) CREAT(file,mode) CREATE(file,mode) This function will use the creat() function of the operating system to create the specified file. It will return the value returned by this system call, IVT accepts both the "creat" and "create" spelling of this function call. The second parameter of the creat() system call must be the creation-mask. This specifies if the file will be read-only or read-write. Specify 0 for read-only and 0666 for read-write (this is the Unix way to specify access modes for an object such as a file). A return value of -1 indicates an error. Example: fd = CREAT("C:/TMP/JUNK",0666) IF $fd < 0 THEN Popup "Error $ERRNO during CREAT" See also OPEN, WRITE, CLOSE, EXISTS and READLN. Note that OPEN also allows you to create files by specifying the O_CREAT flag and that SOPEN can be used to share open files between processes. 13.10.11: CRYPTFL (Crypt a file) CRYPTFL(Filename,"PASSWORD",word,[1way]) CRYPTFL(Filename,"DEFAULT",[1way]) CRYPTFL(Filename,"REUSE",[1way]) This function allows you to encrypt files from within an IVT script. The first form will encrypt the mentioned file with the password you specify. The second form will encrypt the file with the built-in IVT default password. When IVT has to read this file later, it will always try the default password first. If none of the passwords IVT knows are usable, IVT will prompt for a without delay, files encrypted with other passwords can result in a prompt. IVT will remember any password you type (or specify with CRYPTPWD) and only prompt if none of them work. When you specify a REUSE, IVT will encrypt the file with whatever password is known for that file. If no password is known, you'll get an error (see below). The optional 1way will prevent decrypting the file ever again. IVT WILL be able to read it, but you cannot use the setup screen or the DECRYPTFL functio to decrypt the file. The password learning system uses this to further protec file, this still does not mean that all passwords in that file can be read by a human. The 0 1 2 3 4 5 6 CRYPT/DECRYPT functions can return the following values: Success File could not be opened File exists and is not encrypted Failure. Could not (re)create the file. Cannot decrypt, bad password. Cannot decrypt, file is 1-way encrypted REUSE specified and no password known.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.12: CRYPTFLPWD (Set the password to encrypt a specific file) See also DECRYPTFL and CRYPTFLPWD. See encrypting files for further help.

Page: 21

13.10.12: CRYPTFLPWD (Set the password to encrypt a specific file) CRYPTFLPWD(Filename,"DEFAULT") CRYPTFLPWD(Filename,"PASSWORD",word) CRYPTFLPWD(Filename,"TEST","DEFAULT") CRYPTFLPWD(Filename,"TEST",word) CRYPTFLPWD(Filename,"INHERIT",FileOrg) This function manipulates the password to be used by the REUSE options of the CRYPTFL function. The password learning system uses this when you change the master password of the password database. The first two forms above actually set the password associated with the file. No check is made for the actual existence of the file, IVT just stores the information and will use it when the file needs to be read or written in the future. the file can be read without the need to type a password. The TEST DEFAULT form returns 0 when the file exists and is encrypted with th default password. It returns an error code otherwise (see here). The TEST word form returns 0 when the file exists and is encrypted with the given password. It returns an error code otherwise (see here). When the INHERIT is used it means the Filename inherits the current password FROM the file FileOrg (whatever that password is). This can be used to create a copy of a password file, encrypt it with the sam password as the original, then use COPYFILE to replace the original file. This prevents an unencrypted copy ever existing on a network drive, even for short while. See also DECRYPTFL and CRYPTFL. See crypting files for further help. 13.10.13: CURSOR_COL/CURSOR_ROW (Current cursor position) CURSOR_ROW() CURSOR_COL() Returns the coordinates of the cursor position of the current session. The top-left position of the screen is designated coordinates 1,1. The cursor can be positioned using the SETPOS statement. See also $ROWS and $COLS. See also SCREENTXT and SCREENATTR. See also CLS, ECHO and VTECHO. If you want to interact with the user in a complex fashion, use DIALOG. 13.10.14: DECRYPTFL (Decrypt a file) DECRYPTFL(Filename,Password) This function decrypts an encrypted file. This first operand specifies the file to be decrypted; the second must specify the correct password (key) with which the file is encrypted. See here for a list of return values. You can, of course, not decrypt files that were encrypted with the default password, nor can you decrypt files that were 1-way encrypted. See also CRYPTFL and CRYPTFLPWD. See encrypting files for further help. 13.10.15: DEFINED (Check for existence of a SCRIPT by name) DEFINED(name) This function is passed the name of a SCRIPT. It returns TRUE (1) when a script with that name exists, and FALSE (0) if it does not. This can be used to prevent error-messages about non-existing scripts when you use an indirect CALL such as: Script LogIn ... StartUp ... ... IF !DEFINED($StartUp) THEN CALL $StartUp

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.15: DEFINED (Check for existence of a SCRIPT by name) ... END

Page: 21

This way, the script name specified in $StartUp is called only when it exists See also VARDEF, which does the same for variables. See also ONERROR, which allows you to trap any kind of error. See also DELSCRIPT, to delete script definitions from memory. 13.10.16: DIALOGADDEVENT (Generate a GUI dialog event) DialogAddEvent(Dialog,Code,Key1,Key2,Id) This (seldom used) function can be used to generate an event as seen by into a GUI dialog using this function. This can be used to translate certain keys being typed into certain actions (like clicking buttons). The Dialog must specify the name of an existing DIALOG. The Code must be one of: - KEY Pretend a key is typed. The key is identified by Key1 and Key2. - CLICK Pretends an item is clicked. Key1 and Key2 are ignored. - Id The tag of the item in the Dialog that is clicked or typed into. After using this function, the next DialogEvent will return the event just added. Example: WHILE (Ev = DialogEvent("DIALOG","ITEM","KEY1","KEY2")) != "END" IF $Ev == "KEY" && $KEY1 == 13 \ THEN DialogAddEvent("CMNT","CLICK",0,0,"OK"); ... This translates a RETURN key being typed into a click on the OK button. See also DIALOG and DialogQuery. 13.10.17: DIALOGEND (End a GUI dialog) DialogEnd("NAME") This function aborts the dialog identified by NAME. It has the same effect as the user clicking on the CLOSE button of the dialog It does not generate an END event (as returned by DialogEvent). See also DIALOG and DIALOGQUERY. See also DIALOG NAME DESTROY. 13.10.18: DIALOGEVENT (Query user actions on GUI dialogs) DialogEvent(VAR_DIALOG,VAR_ITEM,VAR_KEY1,VAR_KEY2) This function is used to find out which actions are performed by a user on a DIALOG. Clicking on buttons, entering data into text boxes, using function keys and so on is all reported through DialogEvents. The function takes 4 parameters, all of which are names of IVT variables. The function fills these parameters with details about an event. If the empty string is passed for any item, that item is not returned. The VAR_DIALOG variable is filled with the NAME of a dialog that has an event The VAR_ITEM is filled with the tag name of the item in the dialog. The VAR_KEY1 and VAR_KEY2 are filled with te codes of keys typed on the keyboard (see ONKEY). When one of these variables already exists (be it as a parameter, a local variable in a function, a session local variable or a global variable), they get assigned the new value. When the variable does NOT exist yet, it is created as a session-local variable. The type of the event is returned as the return value of the function. There can be the following events: - CLICK The user has clicked on a control. The name of the control is stored in VAR_ITEM. A CLICK event is generated by actually clicking on a button, row of data in a LISTVIEW, selecting an item from a COMBOBOX, or typing data into a TEXTBOX and finishing the entry (by selecting another field, using a TAB, ending the dialog, etc).

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.18: DIALOGEVENT (Query user actions on GUI dialogs)

Page: 21

- KEY The user has typed data into the dialog. This can be data in a text box, function keys in general, etc. Any item name is stored in VAR_ITEM and the identification of the key in VAR_KEY1 and VAR_KEY2. - NOTHING Nothing happened. Calling DialogEvent in a loop (see below) will generate can be used to time things, update data in the dialog, timeouts and so on. There is no need to worry about CPU utilisation or starvation of other sessions, IVT will handle that internally. - HELP The user used the F1 (help) key or the question-mark feature of the dialog to request help. The name of the item the user wants help for is stored in VAR_ITEM. If you want to refer the user to an internal IVT manual page, use the DIALOG HELP feature. IVT will automatically display the help when the user uses F1, right-clicks, or uses the question mark of a dialog. - END The user has ended the dialog (click on the CLOSE button in the titlebar). Normally, a script should use the following approach to handling GUI dialogs: DIALOG DIALOG DIALOG DIALOG DIALOG DIALOG DIALOG DIALOG X DESTROY X X BUTTON_NL XBUT "Button text" X TEXTBOX_NL XTXT "Amount:" NUMERIC "LENGTH=6" X COMBOBOX_NL XCHC "Add" "Subtract" "Multiply" "Divide" ... # Create the rest of the dialog X BUTTON XCANCEL "Cancel" X SHOW

WHILE (Ev = DialogEvent("DIALOG","ITEM","KEY1","KEY2")) != "END" IF $Ev == "NOTHING" THEN CONTINUE IF $Ev == "ERROR" THEN BREAK GOTO_OPT "${Ev}_${DIALOG}_${ITEM}" CONTINUE LABEL CLICK_X_XBUT ...Button XBUT is clicked... CONTINUE LABEL CLICK_X_XTXT DialogQuery("X","XTXT","Amnt") ... Value entered into XTXT textbox is in $Amnt ... CONTINUE LABEL CLICK_X_XCHC Res = DialogQuery("X","XCHC","Line") ... Res is now 0 - 3 (choice from dropdown list) ... ... Line is now "Add", "Subtract" etc (text from dropdown list) ... CONTINUE LABEL CLICK_X_XCANCEL# User clicked Cancel. End dialog BREAK NEXT DIALOG X END This creates a dialog, displays it and handles all the events. When the loop ends the dialog is destroyed using DIALOG END. Note the use of GOTO_OPT in the handler. By using the DIALOG, Ev and ITEM variables, an indirect, optional GOTO is performed to a destination that uniquely identifies the dialog, event and control that had an event. For example, when the user clicks on the button identified by "XBUT" in the "X" dialog, $Ev will be CLICK, $DIALOG will be "X" and $ITEM will be "XBUT". This will do a GOTO to "CLICK_X_XBUT". When that label exists, the code there will be executed. When it does NOT exist, the goto does nothing, the event is ignored and the CONTINUE fetches the next event. This way, you only have to write code for the interesting events. and $DIALOG will be "X" again. Since there is no label HELP_X_XBUT the event will be ignored. Note: Help can be handled automatically using DIALOG HELP. The example shows a typical handler for a textbox (the CLICK event signifies that data has been entered, the DialogQuery retrieves the actual value. The CLICK_X_CHC shows a typical handler for a combobox. The CLICK event signifies that the user chose an entry, the DialogQuery identifies WHICH entr

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.18: DIALOGEVENT (Query user actions on GUI dialogs)

Page: 21

The handler for the CANCEL button breaks from the loop (using BREAK), causing the DIALOG X END to be executed, and the dialog to disappear. See also DIALOG, DialogEnd and DialogQuery. See also DialogAddEvent. 13.10.19: DIALOGQUERY (Query state of GUI controls) DialogQuery(Dialog,Tag[,DetailVar]) This routine can be used to query the present state of an item in a DIALOG. The dialog you want to query is specified by the first parameter. The item tag (option, combobox, listview, etc) is speccified in Tag. The optional third argument specifies the name of a variable that will receiv additional information. The function returns a number. Exactly WHAT the function returns depends on the type of item being queried: - BUTTON A value of zero is returned, and nothing is assigned to DetailVar (a button has no state, only CLICK events). - OPTION (plain) The return value is 0 (unchecked) or 1 (checked). If a DetailsVar is passed this gets assigned the same value (0 or 1). - OPTION (part of a RADIOBUTTON) When the option is part of a series of RADIOBUTTONs, the result is the sequence number of the radiobutton that is checked (1-based). A DetailsVar is assigned the TAG of the option that is checked (remember,a radiobutton always has exactly ONE option checked). So for example: DIALOG X OPTION OPTA "First option" DIALOG X OPTION OPTB "Second option" DIALOG X RADIOBUTTON OPTA OPTB ... x = DialogQuery("X","OPTA","Details") ECHO "x=$s, Details=$Details\n" on the current state of the radiobutton. Note that it does not matter whether you query "OPTA" or "OPTB". - TEXTBOX This will return TRUE when the text box is not empty. The DetailsVar will b assigned the current contents of the text box. When the text box is empty, FALSE is returned (and DetailsVar will be set t the empty string). - LISTVIEW - COMBOBOX The return value will be the (zero-based) sequence-number of the currently selected entry. When a DetailsVar is specified, that will be assigned the text of the currently selected entry. Example: DialogQuery("CFG","METSYS","IvtPwdMetaSystem") Retrieves the current value of the password metasystem into $IvtPwdMetaSystem For more examples of handling complex GUI dialogs, see: password maintenance. 13.10.20: EXISTS (Test if a file or directory exists) EXISTS(path) This function returns TRUE (1) if the specified path exists and FALSE (0) if it does not. It is implemented using the access() system call. The path can be a file or a directory. You can use STAT to find out what the attributes of a certain path are, but see also ISDIR. IF !Exists(x = "C:/tmp/junk") THEN Popup "$x is missing" Note the way an assignment is used as an expression, and the way the name of the missing file is displayed in the popup. See also STAT, OPEN, WRITE, CLOSE, CREAT and READLN. See also UNLINK, MKDIR, ISDIR and RMDIR.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.21: ERROR (Invoke the standard error function) 13.10.21: ERROR (Invoke the standard error function) ERROR(Number,Level,string)

Page: 21

This function invokes the built-in, standard error handling function of IVT. This will set $IVT_ERR_NR to the specified error Number, and treat String as an error of the indicated Level. If you set an ONERROR handler, it will be invoked when you use the ERROR function. Valid values for Level are: 0 - Warning. 1 - Error. 2 - Fatal error. Invalid values for Level are silently adjusted. Normally, warnings and errors will be displayed. Level 2 errors will terminat the session. See ONERROR for a further description of the possiblities. 13.10.22: EXPAND (Reference variables indirectly) EXPAND(string) This function takes a given string and expands all references to variables into their contents. Consider, for example, the following statements: Var_1 = "This is var one" Var_2 = "This is var two" Index = 2 x = EXPAND("\$Var_$Index") that the variable x will contain: This is var two. As you can see from the example, this can be used to indirectly reference variables, which can be used to implement arrays. For a nice example of this, see the LogMeIn script. Not also that the indirection is not limited to single dimensions: ANY valid identifier can be dynamically generated this way. Also, it is not required to use numbers, any naming or numbering scheme can be implemented this way. Assigning variables indirectly is done by (for example): Index = 2; Var_$Index = "Another value for member two"; I.e., when you assign values, the receiving variable can be a simple string EXPRESSION, rather than a constant. It must yield a valid identifier, so no spaces or special characters. To loop through all members of such an indirect array, use FORALL. 13.10.23: ISDIR (Determine if something is a directory) IsDir(stringexpr) This function returns TRUE (1) when stringexpr is an existing directory, FALSE (0) when not. It returns -1 on error, in which case $ERRNO set to indicate the cause of the problem. See also STAT, MKDIR, RMDIR, EXISTS and FindFiles. See also this example script for dropping files onto IVT. 13.10.24: FILE_SEND/RECEIVE (X/Y/Zmodem/ASCII File transfer) FILE_SEND(Protocol,Pattern) FILE_RECEIVE(Protocol[,Pattern]) These two function calls allow file transfer under script control. The Protocol must evaluate to a string, of which the first character must be one of: X: Y: Z: A: Xmodem; Ymodem; Zmodem. ASCII (no protocol, send only)

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.24: FILE_SEND/RECEIVE (X/Y/Zmodem/ASCII File transfer)

Page: 21

Any other value will result in a return value of -2 (invalid call). Both upper and lower case are acceptable to specify a protocol. When file transfer is disabled (secure mode) the result of the function will be -1. IVT will start the transfer. The host should be ready to receive or transmit a file as well, use SEND and WAIT commands for this (see example below). When using ZMODEM, make sure you use NO_ZMODEM_AUTO to prevent IVT from starting a normal file transfer automatically, which would conflict with another one started on the same session by your script. Don't forget to enable it afterwards (ZMODEM_AUTO). Only XMODEM requires a filename when a file is received - the other protocols transmit the filename as part of the transfer. The ASCII protocol can only be used for transmitting, not receiving. Once the transfer is started, the function waits for it to end. The success or failure is indicated by the return value. A positive integer indicates the number of bytes in the last successfully transmitted file. A negative number indicates a failure (aborted due to communications failure or a human abortin the transfer). When the user should not interfere with the transfer, use a KEYBOARD OFF prior to starting the transfer (and KEYBOARD ON afterwards). Perhaps a little example is required: Script DoReceive LOCAL x, fd, line, auto; auto = $ZMODEM_AUTO NO_ZMODEM_AUTO KEYBOARD "OFF" UNLINK("$IVTDOWNLOAD/mydata") SEND "sz /tmp/mydata\r" WAIT "\r" x = FILE_RECEIVE("Z") WAIT "finished" WAIT "\r" IF $auto != 0 THEN ZMODEM_AUTO KEYBOARD "ON" IF $x <= 0 THEN \ ECHO "File transfer FAILED code=$x\n" : \ RETURN ECHO "\nReceived $x bytes OK\n" if (fd = OPEN("$IVTDOWNLOAD/mydata",0)) < 0 THEN RETURN x = 1 WHILE (line = READLN($fd)) != "" ECHO "$x: $line" x = $x + 1 NEXT CLOSE($fd) End The example above receives a file, when that is successful, it is displayed on the screen with line numbers. Currently, there is no feedback to the script on the filename of received files, only the number of bytes. As in the example above, the script will usually know the name of the file to transfer. Another example for sending a file: Script DoSendFile dir file LOCAL x NO_Zmodem_Auto Send "rm -f $file; rz\n" Wait "\r" x = FILE_SEND("z","$dir/$file") Echo "\nFile $dir/$file sent, result is $x\n" End Note the subtle WAIT "\r" in both examples. This makes the script wait for the echo of the RZ and SZ commands. If that is not done, the file transfer will see that echo, reject it as invalid protocol stuff, wait for several seconds, and try again. Your file will be transferred, but not as fast as you'd want it to. To insure fast start-up, follow the example. A last example, if you want to transfer a number of files to a Unix host and it does not have any X, Y or Zmodem software, but your connection is through a reliable connection (telnet, SSH or an error-correcting serial link), then the following works:

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.24: FILE_SEND/RECEIVE (X/Y/Zmodem/ASCII File transfer) Script SendFiles names Remote SEND "SavedTty=`stty -g`; "# Save current TTY mode SEND "stty -echo tabs -opost -icrnl; "# Set binary connection SEND "cat - > $Remote; "# Redirect to file SEND "stty \$SavedTty; "# restore settings SEND "\r"# End command USLEEP 500# Wait for CAT to receive FILE_SEND("A","$names")# Send in ASCII mode SEND "\r\04"# Send ^D, EOF END KEYMACRO "F8" SendFiles "test*" testfiles

Page: 21

When you press F8, this will transmit all files that match the pattern test* to a (single) file testfiles on the remote system. The 'stty -g' output is saved in a shell variable, then the connection is set to not echo, not expand tabs to spaces, and not the change received CR chars into new lines. Then a CAT is started to redirect received data to a file. The FILE_SEND actually transmits all the data, and sends an EOF afterwards to terminate the CAT. Finally, a last STTY command is use to reset the connection to the saved settings. 13.10.25: FINDFILES (search for Windows files and directories) FindFiles(Base,Scope,Directory,Pattern[,Options]) This function allows you to retrieve a list of file names and directories int IVT variables. This is a powerful function that can run for a long time. The Base specifies a name used as a basename for IVT variables to store the results in. The variables are created with a sequence number (see below). The Scope specifies the type of the scope of the variables created by this function: - GLOBAL. Create global variables. These variables are deleted when IVT exits (or by an explicit UNSET). - SESSION. Create variables local to the session (visible in all scripts that run for the current session, but not others). The variables are deleted when the session terminates (or by an explicit UNSET). - LOCAL. in the current invocation of the current script. The variables are deleted when the script RETURNs (or by an explicit UNSET). The Directory specifies the name of a directory to start the search in. The Pattern specifies the wildcard pattern to search for. Options is an optional string expression that can contain one or more of the following words: - RECURSIVE The search will descend into subdirectories to find objects that match the given pattern. WARNING: When you do a recursive search that finds MANY names, IVT will create thousands of variables. This will make the script very slow, as variables are stored in simple lists, and these lists must be searched sequentially for a name to be found. Do not use the IVT scripting language to process massive numbers of files using this FINDFILES function. - COUNT_ONLY Does not actually store the names of the files and directories, but only the number of such objects and returns this. The values for Base end Scope are ignored in this case. NO_SORT, ALPHA_SORT. By default, FINDFILES sorts the result in natural order, where files likes rfc1.txt rfc2086.txt rfc822.txt are sorted as: rfc1.txt rfc822.txt rfc2086.txt The algorithm was taken from http://sourcefrog.net/projects/natsort. Using NO_SORT will prevent sorting, so FINDFILES will return the result in the order the operating system returns them. ALPHA_SORT will use a simple string compare.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.25: FINDFILES (search for Windows files and directories) - BLOCK TIMEOUT statements, keystrokes, session switching and so on work.

Page: 21

finished, to the exclusion of everything else. Remember that a RECURSIVE search on a large network drive may take a long while to complete. In the meantime, IVT will be deaf and dumb to everythin else. - SHOWDIRECTORIES Directories are stored as part of the result set. When not specified, only files that match the pattern are returned. - HIDDEN Include hidden files and directories in the result. Normally, these are skipped. - SYSTEM Include system files and directories in the result. Normally, these are skipped. - NOFILES Skip plain files, only process directories. - NO_SORT The results PER DIRECTORY are sorted before being added to the result set. The NO_SORT can be used to suppress the sort operation, results in that case will be in the order the Windows returns them. - SHORTNAME Also return the 8.3 name variant of the objects that are found. This is no done by default since it is relatively expensive to do and seldom required The function returns the number of objects found. The results are stored in variables with Base as a basename, according to the following rules and with a scope of the type specified: - BASE_<nr>_NAME Full name of the object. See also GETFULLNAME. - BASE_<nr>_ATTRIB Integer that encodes the attributes of the object. It is a bitmask that ca contain zero or more of the following codes: - Ox00: Normal. File has no other attributes set and can be read or writte to without restriction. - 0x01: Read-only. File cannot be opened for writing and a file with the same name cannot be created. - 0x02: Hidden file. Not normally seen with the DIR command, unless the /A option is used. - 0x04: System file. Not normally seen with the DIR command, unless the /A or /A:S option is used. - 0x10: Subdirectory. - Ox20: Archive. Set whenever the file is changed and cleared by the BACKU command. For example: ($NAME_1_ATTRIB & 0x04) evaluates to TRUE when a file with th SYSTEM attribute has been detected. - BASE_<nr>_CREATE Time of file creation (-1L for FAT file systems). This is a 64-bit number. See the TIME function to convert this to human-readble format. - BASE_<nr>_ACCESS Time of the last file access (-1L for FAT file systems). This is a 64-bit number. - BASE_<nr>_WRITE Time of the last write to the file. This is a 64-bit number. - BASE_<nr>_SIZE Size of the file in bytes. This is a 64-bit number. - BASE_<nr>_SHORTNAME The short name of the file (8.3 notation, see GETSHORTNAME). This is only returned when requested with the SHORTNAME option. To retrieve the name of the first object returned when NAMES is specified as

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.25: FINDFILES (search for Windows files and directories) the basename, you could use: Index = 0; Nm = Expand("\$$NAMES_${Index}_NAME")

Page: 21

Since $NAMES_0_NAME is the name of the variable that holds the name of the first object returned. Perhaps an example can serve to clarify all of this: Cnt = FindFiles("NAMES","LOCAL","C:/Program Files","*.pdf",\ "RECURSIVE BLOCK SHORTNAME") ECHO "Found $Cnt objects\n" FOR (i = 0; $i < $Cnt; i = $i + 1) ECHO_LIT "$i: " Expand("\$NAMES_${i}_NAME") "\n" \ " " Expand("\$NAMES_${i}_SHORTNAME") "\n" NEXT Produces output similar to: Found 20 objects 0: C:/Program Files/Adobe/Acrobat 7.0/Help/ENU/Reader.pdf C:/PROGRA~1/Adobe/ACROBA~1.0/Help/ENU/Reader.pdf 1: C:/Program Files/Adobe/Acrobat 7.0/Help/NLD/Reader.pdf C:/PROGRA~1/Adobe/ACROBA~1.0/Help/NLD/Reader.pdf ... 19: .... .... This finds all PDF files below the "Program Files" directory, returning all attributes of all files, including the SHORTNAME. While the function runs, IVT is deaf and blind to everything else (BLOCK option). 20 objects are found numbered 0 - 19, and the FOR loop displays both the long name and the short name. The ECHO_LIT is required to make sure that ~ characters do not cause problems. The variables that are created (NAMES_0_NAME, etc) are of scope LOCAL, which means they are automatically deleted when the script ends. See also IsDir and STAT. See also the ONDROPFILES example script,which uses all options of the FINDFILES function extensively when a directory is dropped on the IVT window (it transfers all files in the directory tree to the host). 13.10.26: FINDWINDOW (Find Windows window) FINDWINDOW(Classname,WindowName) This implements the Windows function by the same name. See MSDN for details. Meant for internal use only. 13.10.27: FLASHWINDOW (Flash the IVT window or button) FLASHWINDOW(Options, Count, Timeout) This function uses the FlashWindowEx function of Windows. It flashes the window caption, task button, or both. Options is a string that can contain a list of the following options (space separated): - TRAY Flash the taskbar button. - CAPTION Flash the window caption. - ALL Flash both the window caption and taskbar button. This is equivalent to setting the CAPTION and TRAY options. - STOP Stop flashing. The system restores the window to its original state. - TIMER Flash continuously, until the STOP flag is set. - TIMERNOFG Flash continuously until the window comes to the foreground. Count The number of times to flash the window.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.27: FLASHWINDOW (Flash the IVT window or button)

Page: 22

Timeout The rate at which the window is to be flashed, in milliseconds. If Timeout is zero, the function uses the default cursor blink rate. Typically, you flash a attention but does not flashes, it appears to caption bar changes to to an inactive caption Example: FLASHWINDOW("TRAY TIMERNOFG",0,0) When IVT is minimized, this will flash the tray button endlessly with default speed until the user brings IVT in the foreground. FLASHWINDOW("ALL",5,400) Flashes both the window title and the tray button 5 times, every 400 Ms. 13.10.28: FULLSCR (full screen control) FULLSCR("on"|"off"|"status") Full screen mode will be either turned ON or OFF, and the result will be TRUE (1) when the status changed, and FALSE (0) when the mode was already correct. The current status can be obtained by using the STATUS parameter, the result will be TRUE when IVT is currently in full screen mode, FALSE (0) when not. The FULLSCREEN keyword is used to describe what the screen will look like in full screen mode, if you want IVT to start in full screen mode you will have to either click on <Save> in setup while IVT is in that mode, or write a STARTUP script that calls FULLSCR to make the switch, or to use a: NOTE: This is a blocking function, which cannot be used in a PRECONNECT script (the script will be killed if it tries). This is because switching full screen mode on or off is a complex, time-consuming operation. WINDOW_SIZE FULLSCREEN DEFAULT In your IVT.RC file. 13.10.29: FORK (Create a session from a SCRIPT) FORK(host[,group]) Create a new session to the specified host and optional session group group. Result is the new PID in parent, 0 in child. This allows creation of sessions from scripts. If you know Unix, you also know how FORK works. It creates a new session, in which everything is identical to the original session except for a few important things: - The $PID variable has a new value; - The $PPID variable reflects the actual parent; - The return code of the FORK is different in parent and child. The child creates copies of all other variables. Both sessions can continue to execute scripts in an independent fashion. For synchronisation mechanisms between sessions you can use TRAP and KILL, combined with GLOBAL variables. See also THREAD. The forked session is established to the given host in the normal way, which implies, for example, that PRECONNECT scripts will run, etc. Also, the PROTOCOL statement can be used to give the forked session a different protocol than the parent has. This can for example be used to have a script that runs in a DUMMY type session, that manages a large number of parallel sessions by forking off TELNET or SSH sessions. When the sessions end, an ONDISCONNECT script can be used to signal the controlling master script, so it can immediately start the next one to maximize parallelism. 13.10.30: FROMASCII (Translate from ASCII to numeric) FromASCII(char) This function returns the (numeric) ASCII value of the first character of the char string expression. window to inform the user that the window requires currently have the keyboard focus. When a window change from inactive to active status. An inactive an active caption bar; an active caption bar changes bar.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.30: FROMASCII (Translate from ASCII to numeric) Example: FromASCII(" ")

Page: 22

Returns the number 32 (0x20), the code for a space character in ASCII. See also ToASCII. 13.10.31: GETCURDIR (Get current directory) GetCurDir() This function returns the current working directory of the IVT process as a string. See also CHDIR. When the function fails it sets $ERRNO to the reason of the failure and returns an empty string. 13.10.32: GETFULLNAME (Get full path name of a file) GetFullName(FileName) This function retrieves the full path and file name of a specified file. GetFullName merges the name of the current drive and directory with a specified file name to determine the full path and file name of a specified file. This function does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume. Share and volume names are valid input for FileName. For example, the following list identifies the returned path and file names if test-2 is a remote computer and U: is a network mapped drive: - If you specify "\\test-2\q$\lh" the path returned is "\\test-2\q$\lh" - If you specify "\\?\UNC\test-2\q$\lh" the path returned is "\\?\UNC\test-2\q$\lh" - If you specify "U:" the path returned is "U:\" GetFullName does not convert the specified file name. If the specified file name exists, you can use GetLongName and GetShortName to convert to long and short path names, respectively. Example: GetFullName("ivt.rc") Returns: "C:\Program Files\BearStar Software\IVT VT220 Telnet\ivt.rc" When IVT is installed and started from the default location. Note the default Windows notation (backslash instead of slash). See also GetShortName, GetLongName and FindFiles. 13.10.33: GETLONGNAME (Get long name from an 8.3 file name) GetLongName(Pathname_expression) This function takes a short 8.3 file name as input and returns the full, long pathname. See also GetShortName and FindFiles. 13.10.34: GETSHORTNAME (Get 8.3 name of a long file name) GetShortName(Pathname_expression) returns the short name representation of this object (in 8.3 format). Such names do not contain spaces, which can be convenient. For any halfway really descriptive name they return an unreadable, though unique name, which can be very inconvenient. See also GetLongName and FindFiles. Beware when you show these names on screen using ECHO, since they often contain ~ characters, and these are interpreted by ECHO. Use ECHO_LIT instead or do: ECHO Replace(GetShortName(Pathname_expression),"~","~~") "..." To double all ~ characters, or use VTECHO.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.35: GETUSERNAME (Get Windows login name) 13.10.35: GETUSERNAME (Get Windows login name) GetUserName()

Page: 22

This IVT function calls the Windows function with the same name and returns Example: echo "The current user is" GetUserName() "\n" Normally, the name can also be found through $ENV_USERNAME, but that depends on the current environment - the function always retrieves the actual value. 13.10.36: HOLDSESSION (block session) HOLDSESSION(0)# Release session HOLDSESSION(1)# Block session HOLDSESSION(2)# Query status Sometimes, a script wants to make sure nothing changes on screen while a certain script runs. Blocking the session with HOLDSESSION makes sure that no further data is read from the host. It is functionally equivalent to the user pressing F1 (Hold screen), but the HOLDSESSION is quiet (no indicator in the status line, and the user cannot unblock the session by using the F1 key). It is the responsibility of the script to unblock the session. When a scripts dies or forgets to unblock, the user can use F3-R to force a reset on the session. F3-C also unblocks the session. When a session is blocked, typed data IS transmitted to the host, but received data is NOT read. Use KEYBOARD OFF to block the keyboard, too. A parameter of 2 returns 0 (free) or 1 (blocked) and does not change the status. A parameter of 0 or 1 returns the PREVIOUS setting (0 or 1) and sets the requested status. Any other parameter results in an error-message and a return status of 3. It is a good idea to use WAITIDLE just before you issue a HOLDSESSION(1). Tha makes sure that all buffered data is processed and no unexpected effects occur. 13.10.37: IdentifierAs (How to interpret an identifier) IdentifierAS("STRING" | "VARIABLE" | "ERROR" | "STATUS") This function changes the way the new script parser and engine treat ambiguou identifiers in scripts. Consider code such as: x = thing This is ambigiuous, since you can see it as either: x = "thing" x = $thing I.e. a 5-character string with the value "thing", or a reference to the variable called "$thing". This goes for any identifier (a possible name of a variable). Traditionally, the old script language would treat such as case as if the identifier were surrounded by quotes, so it would treat everything as string. The new script syntax allows much more complex constructions, and consequently, it is easier to make mistakes. Since the more powerful script engine makes it easy to change the runtime behaviour, you can now choose how the ambiguity is resolved: - STRING. This is the default setting and treats identifiers as if they were strings. - VARIABLE. Treats identifiers as if they were preceded by a dollar sign, and thus a reference to a variable. - ERROR. Every ambiguity is treated as an error and generates an error message on screen. - STATUS Changes nothing, just returns the current setting. A nice feature is that every script can be written in an individual style. When a script calls IdentifierAs(), that script plus all the scripts that it CALLs will have the given setting. The GLOBAL default can be changed by a STARTUP script, like so:

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.37: IdentifierAs (How to interpret an identifier) Script STARTUP IdentifierAs("ERROR") END

Page: 22

This forces you to write all your scripts unambiguously, i.e. write quotes fo strings and dollars for variables, everywhere. This setting is preferred since it defines the scripts in a way that no matte what the current setting is, they always execute predictably. All the scripts that are supplied as part of the IVT distribution are written unambiguously, so you can call them from your own scripts in your own style without needing to worry about changing their behaviour. The function returns the previous setting (STRING, VARIABLE or ERROR). 13.10.38: INSTR (Find characters in a string) INSTR(s1,s2) Returns lowest offset in s1 of any s2-char. When no character from s2 is found in s1, the result is -1. The first character in the string has offset 0. The s2 string can contain multiple characters. The first occurence of any of those characters is returned. For example: WHILE (x = INSTR($s,"\n")) != -1 # Process a line, $s contains a newline at pos $x Line = SUBSTR($s,0,$x) s = SUBSTR($s,$x + 1,-1)# Rest of buffer, after newline NEXT See also STRSTR, MATCH and SUBSTR. 13.10.39: IVTFUNCTION (Execute internal IVT function) IVTFUNCTION("name"[,"WAIT"|"NOWAIT"][,param]) This powerful feature was added to IVT in January 2005 for IVT 19.0. One of the shortcomings of IVT was the inability to program keys to perform a built-in function of IVT. Say you reprogram the F2 (Print screen) key to something else, then you could not program some other key to perform the Print Screen function. You were left without the possibility to print screens Similar restrictions were true for all other built-in functions of IVT tied t keys. In version 19.0, all such functions were made available for both the macro recorder and IVT scripts. Internally, there is a big table in IVT which associates a "name" with a call to a particular internal function. When you program a key, it associates the key with the unique entry in the table. The IVTFUNCTION allows another way to use the table, namely by specifying the name of the function as parameter to the IVTFUNCTION call. You must specify the name exactly as shown below. The script call will cause the internal IVT function to be executed just as if the user has pressed the key normally associated with that function. Later, functions were added to the table that are NOT normally associated wit a key, but which allow you to assign keys to such functions yourself, or to have scripts that access these built-in functions. Examples are the setup panel functions, which can give users access to some setup-panels but not others. Some functions can only be reached by pressing lots of keys, such as sending serial breaks, special TELNET commands, etc. All of those internal functions can now be associated with keys AND activated from a script. The optional WAIT parameter can be used to make script synchronize with the functions that you start through IVTFUNCTION. If, for example, you use: x = IVTFUNCTION("Setup (F3)") then IVT will start the setup-panel but the IVTFUNCTION will return before that the setup-action has ended (actually, even before it started). This is fine if that script just wants to kick off that action and do nothing else, but suppose you would want the script to do something else afterwards. In that case you want to wait until the actual internal IVT function has ended, and this is what you get when you use the WAIT clause. Example: Script SetupAndPrint LOCAL x

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.39: IVTFUNCTION (Execute internal IVT function) x = IVTFUNCTION("Setup: Printers (only)","WAIT") IF $x != 0 THEN IVTFUNCTION("Print Screen (F2)") END KEYMACRO "P-Shift+Ctrl-Alt" ASYNCFUNCTION SetupAndPrint

Page: 22

This will program "P-Shift+Ctrl-Alt" (Ctrl-P) to call the script SetupAndPrin in asynchronous fashion. That script first allows the user to change printer setup (and ONLY the printer setup). When the user uses OK to leave that setup panel, the IVTFUNCTION returns TRUE (1). When the user aborts, it returns FALSE (0). This fact is used in the IF, when the user accepts the changes the a call is made to print the screen (presumably the user used setup to select a different printer or to change the settings of the current printer). Since this 2nd call to IVTFUNCTION (to print the screen) is the last action i the script, there is no point in using WAIT here, so the script ends while th print screen function is just starting... There is one problem with using KEYMACRO to execute an internal function of invoked by that macro is already active. For example, if you define Alt+s to be "Setup (F3)", pressing it twice would cause the internal "Setup" function to be called TWICE. This causes all sorts of problems, and will crash IVT. Elaborate checks have been built into IVT to prevent this. Every internal function listed below has up to 4 special characteristics. These are: - 1. No current dialogs allowed. The function will fail with an error when it is invoked while IVT is currently displaying a dialog (create session, setup screens, etc), because the function will cause a dialog to be displayed. - 2. Can be WAITed on. Synchronous functions (things that get started, do something, and end) can be used in an IVTFUNCTION("...",WAIT) construction, and the result code wil be an indication of the success or failure of the actions. Some other types of action (like "End session") lack this capability. When an attempt is made to WAIT on such an action, a dummy TRUE is returned and execution of the script resumes immediately (in the case of "End session", though, the invoking script is going to be killed as a result of the ending of the session). - 3. Background session OK. Not all actions can be invoked by a background session (i.e. a session that is not currently being displayed). All functions that ask a response from the user or cause a dialog to be displayed can only be used by the foreground session. - 4. Single instance. Only ONE script or thread is allowed to execute this function at any one time. Note that option 1 (dialogs) implies option 4. Some functions are so simple that multiple threads can execute them at the same time, but not many. See also SHAREMODE. - 5. Requires parameter. The function requires the 3rd paraneter to IVTFUNCTION to pass additional detail. Superfluous parameters are silently ignored. The complete list of valid strings for "name" follows below. This list can be extended in future versions of IVT. Should you find that a function is missing, please mail to ivtsupport@softwarevoordelig.nl. Make sure you spell them EXACTLY as shown (case insensitive). If you omit colons or spaces, the name won't match and you'll get an error. Every function lists the indicators that apply to it, as explained above. Address book 1,2 Alert toggle (Alt+a) 2,3 Any key (Alt+0) 1,2 Autolog Resume 2,3 Autolog Suspend 2,3 Buzzer 1,2,4 Cancel Scripts (F3-C) 2,3 Clear History Buffer 2,3 Clone session 2,3 Copy History to Clipboard 2,3 Copy Screen to Clipboard 2,3 Cut (Alt+c) 1,2 Dump data (F3-D) 2,3,4 Edit Session Description 1,2 Edit Session Group Code 1,2 Edit Session Hostname 1,2 Edit Session Tab text 1,2 End Session (Alt+F4) 1,3 File Transfer (Alt+F9) 1 Flash Screen 1,2,4 Session: 6 (Alt+6) 1,3 Session: 7 (Alt+7) 1,3 Session: 8 (Alt+8) 1,3 Session: 9 (Alt+9) 1,3 Session: Create (Ctrl+PgUp) 1,2 Session: Create groups (F4-G) 1,2 Session: Create+login (Ctrl+PgDn) 1,2 Session: Next (Ctrl-Curs-right) 1,3 Session: Next Group (Alt+g) 1,3 Session: Prev (Ctrl-Curs-left) 1,3 Session: Toggle (Alt+t) 1,3 Setup (F3) 1,2 Setup: Autolog (only) 1,2 Setup: Autolog 1,2 Setup: Colors (only) 1,2 Setup: Colors 1,2 Setup: Crypt files (only) 1,2 Setup: Crypt files 1,2 Setup: Font/Keyboard (only) 1,2 Setup: Font/Keyboard 1,2

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.39: IVTFUNCTION (Execute internal IVT function) Flush Printer (F3-F) 2 Groupfix 1,2,3,5 Help (F4) 1,2 History Cursor Down (auto-end) 2 History Cursor Down 2 History Cursor Up 2 History End 2 History Home 2 History PageDown (auto-end) 2 History PageDown 2 History PageUp 2 History Quit (ESC) 2 Hold Screen (F1) 2,3 Keypad: APPLICATION 2,3 Keypad: NUMERIC 2,3 Kill all sessions, exit IVT 4 Lock terminal (Alt+l) 1,2 Manage keymacros (F4-K) 1,2 Manage scripts (F4-X) 1,2 Manage sessions (F4-S) 1,2 Maximize on all monitors 2,4 Maximize window (Shift+Alt+m) 2,4 Paste default (Alt+p) 2,3,4 Paste named (Shift+Alt+p) 2,3,4 Print Screen (F2) 1,2 Propagate settings 1,2 Reset terminal (F3-R) 1,2,3 Save History (Alt+s in history) 1,2 Screen Saver (Sh+Alt+s) 1 Serial BREAK (Long) 2,3 Serial BREAK (Short) 2,3 Session: 1 (Alt+1) 1,3 Session: 2 (Alt+2) 1,3 Session: 3 (Alt+3) 1,3 Session: 4 (Alt+4) 1,3 Session: 5 (Alt+5) 1,3

Page: 22

Setup: Macros (only) 1,2 Setup: Macros 1,2 Setup: More settings (only) 1,2 Setup: More settings 1,2 Setup: Mouse (only) 1,2 Setup: Mouse 1,2 Setup: Printers (only) 1,2 Setup: Printers 1,2 Setup: Protocol (only) 1,2 Setup: Protocol 1,2 Setup: Rlogin (only) 1,2 Setup: Rlogin 1,2 Setup: Serial (only) 1,2 Setup: Serial 1,2 Setup: Telnet (only) 1,2 Setup: Telnet 1,2 Setup: VT220 settings (only) 1,2 Setup: VT220 settings 1,2 Setup: Windows (only) 1,2 Setup: Windows 1,2 Setup: ZMODEM (only) 1,2 Setup: ZMODEM 1,2 Show current cursor position 2 Slow Down (Alt+s) 2,3 Speed Up (Alt+q) 2,3 Splash screen 1,2 Subshell (Ctrl+F6) 1 Telnet: Force logoff 2,3 Telnet: Send Are You There 2,3 Telnet: Send BREAK 2,3 Telnet: Send Interrupt 2,3 Telnet: Show status 2,3 Telnet: Toggle Binary 2,3 Toggle FullScreen 2 Upgrade now 1,4

Note the special setup functions, which come in two tastes. When a function like "Setup: Printers" is used, the function does what would This allows the user to modify the printer settings, then click OK and that will return him to the main "Setup" panel. From there, other setup functions can be chosen, registry settings can be saved, deleted, etc. Total freedom. When the "Setup: Printers (only)" is chosen, IVT starts JUST that single setup panel to control printing. When the user uses the OK button to exit tha panel, IVT executes an "Apply" in the main setup (that panel never gets displayed itself). When the user uses the ESC key (or uses the CLOSE in the upper-right), IVT uses "Cancel" in the main panel, so all changes the user ha made in the printer-setup panel are discarded. By using KEYMACRO or IVTFUNCTION with one of these "only" functions, you can

"auto-end"). When you use an "auto-end", IVT will quit the history pager and resume normal operations when scrolling hits the end of the history buffer (like would happen when you use the mouse-wheel). Without "auto-end", IVT wil remain in history mode (like it would when you use the keyboard). This allows you to simulate both mouse-wheel and keyboard actions in a script The IVTFUNCTION return value depends on the function being called. When no WAIT is being used, there is no true result yet, so the result of the function is a simple TRUE (1). When WAIT is used, most functions return TRUE, but some (like the "Setup...") A few others also return a "logical" result (true when OK, false otherwise). When a function fails, $IVT_FUNC_ERRNO is set to indicate the reason for the failure. Also note that sometimes an IVTFUNCTION simply does not apply. An example is an attempt to invoke "Setup: Printers (only)" while the printer is currently active. Normally, the setup panel would show a greyed-out "Printer setup" button and an enabled "FLUSH/Close printer" button. When IVT is asked through an IVTFUNCTION to start printer setup, the request is ignored and marked as failed. This can be confusing to a user, since the result is that sometimes the printer setup works, sometimes not, and there is no visible reason. Be warned. See also IVT_DIALOGSTATE which allows you to make certain parts of the IVT dialogs inaccessible or invisible to the user. See also KEYMACRO and secure mode.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.40: LENGTH (Length of a string) 13.10.40: LENGTH (Length of a string) LENGTH(stringexpression)

Page: 22

The result of this function is the length of its argument string expression. For the empty string, 0 is returned. Example: x = LENGTH("123456789") will set the variable $x to 9. See also SUBSTR. 13.10.41: LOWER (Translate string to lower case) LOWER(stringexpression) This function returns the lower case version of the string expression. See also UPPER, SUBSTR, REPLACE and LENGTH. 13.10.42: LSEEK (Position in an open file) LSEEK(Fdexpr,Offset,Whence) This positions the current offset in the file identified by Fdexpr. The file descriptor must have been obtained from a successful call to OPEN or CREAT. The 0 1 2 Whence Offset Offset Offset parameter can take the following values: is interpreted as an absolute offset. is relative to the current position (positive or negative). is relative to the end of the file.

So "LSEEK($Fd,0,2)" will position the file pointer at the end of the file, and "LSEEK($Fd,0,1)" will return the current position. The lseek function returns the offset, in bytes, of the new position from the beginning of the file. A return value of -1 indicates an error, and $ERRNO is set to indicate the error. Note that IVT uses 64-bit numbers internally, so it can handle large files. See also EXISTS, RENAME, OPEN , WRITE and READLN. See also UNLINK, MKDIR and RMDIR. 13.10.43: LTRIM/LTRIM/TRIM (Trim whitespace on left, right or both) LTRIM(string) RTRIM(string) TRIM(string) These functions trim whitespace from the left, LTRIM removes leading spaces and tabs from the RTRIM removes leading spaces and tabs from the TRIM removes leading spaces and tabs from both They return the resulting string as a result. See also UPPER, LOWER, and REPLACE. 13.10.44: MATCH (Wildcard string matching) MATCH(pattern,string) This is wildcard pattern matching function of the IVT scripting language. Definition of pattern syntax: * matches any sequence of characters, including zero. ? matches exactly one character which can be anything. [abc] matches exactly one character which is a, b or c. [a-f] matches anything from a through f. [^a-f] matches anything except a through f. [-_] matches - or _; [^-_] matches anything else. (The - is non-special if it occurs immediately after the opening bracket or ^.) - [a^] matches an a or a ^. (The ^ is non-special if it does not occur immediately after the opening bracket). - \*, \?, \[, \], \\ match the single characters *, ?, [, ], \. - All other characters are non-special and match themselves. The function returns 1 for a successful match, 0 for an unsuccessful match, right or both ends of a string left of a string. right end of a string. ends.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.44: MATCH (Wildcard string matching) and < 0 for a syntax error in the pattern. For example: MATCH("a*b","XaYYb")

Page: 22

will NOT match, because the leading X in the string is not matched by the pattern. Every character in the string must be matched by part of the pattern for the MATCH to succeed! So: MATCH("*a*b","XaYYb") DOES match. See also SUBSTR, INSTR and STRSTR. 13.10.45: MKDIR (Create a directory) MKDIR(pathname) This function calls the operating system version of the MKDIR system call. It creates the directory specified by the pathname parameter. The pathname can be specified either with forward or backward slashes. Remember to double backslashes, since they are special. If the function succeeds, the return value is 0. When it fails, the return code is set to -1 and the $ERRNO variable will contain an operating system error code. See also RMDIR, UNLINK and CREAT. See also EXISTS, and STAT (to look at details). See also FindFiles. 13.10.46: MYERRORCOUNT (Return number of errors so far) MYERRORCOUNT(["GLOBAL"]) This function returns the number of error messages that have been issued for the current session (when no parameters are specified), or for IVT as a whole when the "GLOBAL" parameter is passed. It can be used, for example, before and after a READRC call to determine if, and if so, how many, errors were issued as a result of reading that file. In a startup script, it can be used to determine if there were any errors during startup. Artificial errors caused by the ERROR() function are not counted. See also ONERROR. 13.10.47: MYSESSID (Return unique ID for this session) MYSESSID() This function returns a unique number that identifies the current session. No two sessions in a running IVT instance will ever have the same number, and the numbers are not re-used. As long as the session exists, all calls to MYSESSID will return the same value. It is intended to be used by multiple THREADs and processes to make sure they work for different (or the same) session. See also MYSESSNR. 13.10.48: MYSESSNR (Return session number of current session) MYSESSNR() This function returns the sequence number of the current session. This number can be used as argument to a SWITCHTO statement to switch between specific sessions under script control. For example: SWITCHTO MYSESSNR() will force the session that executes this to the foreground. See also GUI_ONTOP, which will do this for the entire IVT program. The return value of MYSESSNR() can also be used to identify the session in

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.48: MYSESSNR (Return session number of current session)

Page: 22

of a running script can change when the user re-orders sessions or when sessions are created or closed. See also MYSESSID, for a session-id that is unique for a particular session. See also NRSESSIONS(). See also KILL and TRAP, and $PID and $PPID. 13.10.49: NRSESSIONS (Returns current number of sessions) NRSESSIONS([options]) Options is an optional string containing one or more of: - DEAD - GROUP This function returns the current number of IVT sessions. By default, it does NOT count sessions that are in an error state (Hit ESC to abort or enter to reconnect), so this number can differ from the number displayed in the status bar. The DEAD option can be used to force counting dead sessions, too. Also, by default, it counts ALL sessions in ALL application groups. The GROUP option can be used to force it to count only sessions in the SAME group as the session invoking this function. So, to summarize: - NrSessions() Returns number of live sessions in all groups. - NrSessions("DEAD") Returns total number of all sessions in all groups (dead or alive). - NrSessions("DEAD GROUP") Returns the total number of sessions that are dead or alive in the same group as the current session (the number normally shown in the status bar). - NrSessions("GROUP") Returns the number of live sessions in the same group as the caller. See also MYSESSNR() and MYSESSID(). 13.10.50: OPEN (Open a file) OPEN(file,omode[,createmode]) This function returns a file descriptor obtained from the operating system by opening the specified file for mode omode. which defaults to 0666. Valid omodes must be OR-ed together from the following values: O_RDONLY O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_EXCL 0x0000 0x0001 0x0002 0x0008 0x0100 0x0200 0x0400 Open for reading only Open for writing only Open for reading and writing Writes done at EOF Create and open file Open and truncate Open only if file doesn't already exist

Text files have <cr><lf> sequences translated to <lf> on read()'s, <lf> sequences translated to <cr><lf> on write()'s O_TEXT 0x4000 File mode is text (translated) O_BINARY 0x8000 File mode is binary (not translated) O_NOINHERIT O_TEMPORARY O_SHORT_LIVED O_SEQUENTIAL O_RANDOM 0x0080 0x0040 0x1000 0x0020 0x0010 Child process doesn't inherit file File is deleted when last handle is closed Temporary storage file, try not to flush File access is primarily sequential File access is primarily random

IVT does not supply constants or variables with these names, so if you need a specific mode you will have to supply the correct value by passing the resulting hexadecimal value. For example: flags = 0x4000 | 0x1000 | 0x100 | 0x0040 | 0x0002; fd = OPEN("somefile",$flags,0666) will set the flags O_TEXT, O_SHORT_LIVED, O_CREAT, O_TEMPORARY and O_RDWR, so this will open somefile in text mode, create it when it does not exist and mark it as a short lived, temporary file. If you want to open files for sharing between processes, see SOPEN.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.50: OPEN (Open a file)

Page: 22

The result is -1 when there are problems opening the file, the IVT variable $ERRNO is set to indicate the reason for failure. The descriptor can be used in subsequent READLN, WRITE and CLOSE statements to read/write data to and from the file. See also CREAT, SOPEN and EXISTS. See also MKDIR, RMDIR, UNLINK and FindFiles. See the modem dialer for an example of using these statements. 13.10.51: PLAYSOUND (Plays a sound file) PLAYSOUND(filename) This function will invoke the Windows PlaySound function with the given filename. First, any playing sound is aborted, then the playing is started in the background (the function returns immediately). When the filename does not exist, IVT will search the PATH for it. When still not found, it will try with MEDIA/ in front, and .WAV appended and combinations of those. The return value is 0 (FALSE) when the file does not exist, otherwise it is the return value of the actual PlaySound function (normally 1 on success). Media files like you can find in the MEDIA directory on windows systems can be played via this function (.WAV files, usually). It requires a soundcard, or Windows will make the "default sound" (ring the bell). See also BELL WAV, which plays a sound when a bell character is received. See also the ESC<space>n escape sequence to play sound files. 13.10.52: PROMPT (Ask a question on the bottom line) PROMPT("Prompt string",Length,Echo) This function asks a question on the bottom line of the screen. The first argument is the prompt string (a question). The second is the maximum length of the answer (shown as dots in a prompt). The third argument is a Boolean. When 1 (TRUE), echoing is turned on, when FALSE (0), typed characters are displayed as asterisks. The result is the response typed by the user, or the empty string when the user typed ESC (or just a return). During the PROMPT call, the user can still switch between sessions. The prompt call will be resumed when the user switches back. Example: User = PROMPT("User name",10,1) Pswd = PROMPT("Password: ",8,0) Asks for a user name and a password. The latter is not echoed. See also ONKEY and READLN. 13.10.53: QUERYSETTING (Obtain current configuration values) QUERYSETTING("feature name"[,"GLOBAL"]) This function allows a script to find the current setting of almost all IVT configurable items. Simply specify the name of the IVT.RC feature as a string, and the function returns the current setting for the current session. When you use the GLOBAL qualifier, the function returns the global default (used to initialise new sessions) rather than the value for the current session. For example: x = QUERYSETTING("TELNET_TTYPE") x = QUERYSETTING("CLICK") The first will return a string with the current setting for TELNET_TTYPE. The second will return TRUE (1) or FALSE (0) depending on the current setting of the key click feature. x = QUERYSETTING("BITMODE") will return an integer with a value of either 7 or 8 to indicate the mode the current session is operating in. As a last example: x = QUERYSETTING("BITMODE","GLOBAL") will return the DEFAULT setting for the BITMODE feature (the one used for new

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.53: QUERYSETTING (Obtain current configuration values)

Page: 23

current session, and that value can have been changed by the user, the host o a script. NOTE: The QUERYSETTING returns the internal representation of a feature! For all strings and on/off type settings this is straightforward (0 for OFF and 1 for ON). For some (like BITMODE) you get the logical decimal value of the feature. But the BACKSPACE setting will, for example, return 0 for the BACKSPACE setting and 1 for the DELETE setting because that happens to be the color settings. If you have used a statement like: COLORS Black BrightWhite color number 0) and a number used or the background (15, being bright white). The QUERYSETTING function does not understand "COLORS", you have to query the foreground or background colors explicitly: fg = QUERYSETTING("COLORS (fg)")# Foreground color bg = QUERYSETTING("COLORS (bg)")# Background color Similar things apply to the other color settings. Also, some settings cannot currently be queried (like MENU, which modifies th menu bar). Watch this place for future updates and a complete list of all valid feature names. The current list of all non-straightforward queries is: - APPGROUP Returns the current application group of the current session. There is no GLOBAL setting. Returns a single character when a group is set, and the empty string when the current session does not have a group code. - AUTOLOG TYPE Returns TYPE. Besides TYPE, you can also use STARTM, NAME, TIMESTAMP, HEADER, STATUS and FILETYPE to query the other options. - BELL_ABUSE (on/off) Returns TRUE when BELL_ABUSE protection is enabled, FALSE otherwise. - BELL_ABUSE (count) Returns the number of bells. - BELL_ABUSE (seconds) Returns the number of seconds before abuse is detected. - BELL_ABUSE (silence) Returns number os seconds bell stays off. - BELL WAV Returns the name of the WAVE file. - DISPLAY The current setting of the DISPLAY setting can be queried using "DISPLAY". There is no GLOBAL setting. - DOMAIN GLOBAL only. Returns the list of DNS domains (comma separated). - FULLSCREEN Returns a comma separated lists of all FULLSCREEN options. Individual options can be queried too (return 0 or 1). - FULLSCREEN VSCROLL Returns the status of the VSCROLL option. - FULLSCREEN MENUBAR Returns the status of the MENUBAR option. - FULLSCREEN TABSBAR Returns the status of the TABSBAR option. - FULLSCREEN STATUS Returns the status of the STATUS option. - GROUPSTATE groupname GLOBAL query only. Returns the "brokenness" of a session group (see group editor). The groupname must be the name of a CREATEGRP. Return values can be "NO GROUP" (no such group currently exists), "COMPLETE (group found and all sessions still exist) or "INCOMPLETE" (one or more of the sessions in the group are missing).

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.53: QUERYSETTING (Obtain current configuration values)

Page: 23

The "Fix" button in the session group maintenance can be used to fix the group in that case, or the IVTFUNCTION "GROUPFIX". - GUI_FONT Returns the description of the current session font. Using GLOBAL will return the default font for new sessions. - ICONTAB Returns the empty string for no icon, CLOSE for the default close-tab icon and the filename and index number passed to SetTabIcon otherwise. - IVT_DIALOGSTATE Returns the current setting of a dialog item, see IVT_DIALOGSTATE for details. Returns ENABLE, DISABLE, SKIP or UNKNOWN (for errors). Only valid for a GLOBAL query. Example: x = QuerySetting("IVT_DIALOGSTATE CR_OK","GLOBAL") So the name of the queried item must be separated by a space from the name of the query. The example returns the state of the "OK" button in the creat session dialog. - IVT_LANGUAGE Selected interface language, or "English" if none is selected. Only GLOBAL selection. - LOCAL_ECHO Returns the current state of the "Local echo" setting of a session. Returns 0 (FALSE) or 1 (TRUE). There is no GLOBAL setting. - OPTIONS Queries the setting of an individual OPTIONS setting. The call must be like x = QuerySetting("OPTIONS s","GLOBAL") This will query the current setting of the 's' (secure mode) setting. You can only query a SINGLE option letter at a time. Most options are supported. Some (like 'P') return a string (selected profile), most return "0" or "1". Invalid queries return "UNKNOWN". - PRINTER Returns a description of the default printer (GLOBAL) or a description of the currently selected printer for the session. Returns a list of options in the same format as the PRINTER directive. - PROFILE Returns the currently selected profile of the session. Using GLOBAL will return the name of the default profile. - RESOLVE The GLOBAL list of name resolvers, comma-separated. Can be file names, DNS servers and the word HOSTBYNAME. There is no LOCAL setting. - SCRIPTDEBUG LOCAL only, returns the name of the current debug file, or OFF when debugging is off. - STATUS BORDERS GLOBAL only. Returns TRUE when status bar has dividers, FALSE otherwise. - TABSBAR CLOSE_ICON GLOBAL only. Returns status of the CLOSE_ICON option. - TABSBAR CLOSE_CONFIRM GLOBAL only. Returns the status of the CLOSE_CONFIRM option. - TABSBAR SIZEADJUST GLOBAL only. Returns the value of the SIZEADJUST option. - TIMEOUT LOCAL only. Returns the number of milliseconds left until the current timeout ends. This checks timeout set in anywhere in the current process. Returns NONE when no timeout is active. Note that the value can be negative when the system is too busy to fire the timeout. - TITLEBAR (text) GLOBAL only. Returns the current fixed string of the window title. - TOOLTIPS (initial) GLOBAL only. Returns delay until tool tips appear (in ms). - TOOLTIPS (duration) GLOBAL only. Returns duration in ms that tool tips stay on screen. - WINDOWPOS (mode)

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.53: QUERYSETTING (Obtain current configuration values)

Page: 23

GLOBAL only. Returns TRUE when window is CENTERED, FALSE otherwise. - WINDOWPOS (x) and WINDOWPOS (y) GLOBAL only. Returns x and y value of the upper left corner of the current IVT window. - WINDOW_RECT LOCAL only. Returns 4 decimal numbers, representing the rectangle of the window of the current session: left, right, top, bottom. Can be used to calculate the dimensions of the window when SIZEFONT is in effect, since the window can be any size while $COLS and $ROWS stay the same. - WINDOW_SIZE Returns the size of the current session or, using GLOBAL, the default size of new sessions. Returns one of the following forms: - MAXIMIZED - FULLSCREEN - rows[%] cols[%] The last is the percentage of the screen (when a % sign is added) or the absolute number of rows or columns when no percent sign is present. See also IVTFUNCTION which allows you to call internal IVT functions. 13.10.54: RAND (Generate a random value) RAND() The RAND function generates a random integer value, range from 0 to 2^63. See also SRAND. As an example, consider a small script that sends data to a host with the timing characteristics of a human user (with random variations in typing speed, with a random delay from 0 to 300 Ms): Script SendAsHuman Str HIDE FOR (i = 0; $i < Length($Str); i = $i + 1) SEND SUBSTR($Str,$i,1) USLEEP (RAND() % 300) NEXT End Script DoATest DESCR "Test of SendAsHuman" Call SendAsHuman("This is simulated input from a user\n") End 13.10.55: READLN (Read a line from a file) READLN(fd) This function reads a line from the file referenced by the specified fd (as obtained from a previous OPEN call), reads a line from it and returns this string as its result. A carriage return is stripped from the resulting string, but a new line is returned as part of the string. When EOF is read, the resulting string will be empty. Exaple: read a file: fd = Open("somefile",0); WHILE (Ln = ReadLn($fd)) != "" echo "Line: $Ln" NEXT Close($fd) See also OPEN, WRITE, CLOSE, CREAT and EXISTS. See also UNLINK, MKDIR and RMDIR. See the modem dialer for an example of using these statements. 13.10.56: READRC (Read an IVT.RC file) READRC(fileexpr[,"STARTUP"]) This function reads the specified file as an IVT.RC file. This can be used to read a generated script into memory. For example, the password learning system generates a script that knows about user-id's and passwords. When a new combination is added, it generates a new file, uses DELSCRIPT to

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.56: READRC (Read an IVT.RC file)

Page: 23

delete the old definition of the script from memory, then uses READRC to read the new script. You can also use this to create very flexible IVT configurations. The function returns TRUE (1) when it was successful, FALSE (0) when not. The 2nd parameter can be the string "STARTUP". When passed, the specified fil is read in IVT startup mode, so, for example, scripts called "startup" will be executed during the READRC processing. When the 2nd parameter is omitted, the file is read normally. When the file contains syntax errors, this can be determined by looking at th value of MyErrorCount() before and after doing the ReadRC. See also OPEN and READLN. 13.10.57: REGCREATEKEY (Create a key in the Windows registry) RegCreateKey(Hive,Key) This is the IVT wrapper around the standard Windows function RegCreateKey. It creates a key in the Windows registry, a sort of directory that can hold other keys and values. The Hive must be one of the valid hive names, see here for a list. The key can be any valid name. The function returns 0 upon success, non-zero on errors. See also RegDeleteKey, RegSetValueStr and RegSetValueDword, See also $IVT_REGISTRY_BASE. 13.10.58: REGDELETEKEY (Delete a value from Windows registry) RegDeleteKey(Hive,Key)

For a list of valid Hive values, see here. The function returns 0 upon success, and a Windows error code when there is a problem. See also RegDeleteValue and RegQueryEnum. See also $IVT_REGISTRY_BASE. 13.10.59: REGDELETEVALUE (Delete a value from Windows registry) RegDeleteValue(Hive,Key,Name) This function is the IVT wrapper around the standard Windows call RegDeleteKeyValue. It deletes a registry subkey value. For a list of valid Hive values, see here. The Key must specify the value of an existing registry key, the Name must specify the name of an existing value within the given Key. The function returns 0 upon success, and a Windows error code when there is a problem. See also RegDeleteKey and RegQueryEnum. See also $IVT_REGISTRY_BASE. 13.10.60: REGQUERYENUM (Enumerate Windows registry keys) RegQueryEnum(Hive,Key,BaseName) This function is the IVT wrapper around the standard windows function RegEnumKeyEx and RegEnumValue. It searches the Windows registry and returns a list of subkeys and value name that it finds there. For every item found, it returns the name and the type o the object. The Hive must specify one of the valid Windows hives, see here fo a list. The Key specifies a base key to open and enumerate. The BaseName specifies the base name of IVT variables names. The function creates a set of LOCAL variables that hold the resulting set of values: - $BaseName_NM_x The name of the subkey or value.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.60: REGQUERYENUM (Enumerate Windows registry keys) - $BaseName_TP_x The type of the subkey or value. The RegQueryEnum function returns the number of items found. The _TP_ variables can have the following values: SZ (zero-terminated string, see RegQueryStr). DWORD (double word, see RegQueryDword). BINARY NONE (a subkey, that can be enumerated). EXPAND_SZ DWORD_BIG_ENDIAN LINK MULTI_SZ RESOURCE_LIST FULL_RESOURCE_DESCRIPTOR RESOURCE_REQUIREMENTS_LIST QWORD

Page: 23

Example: x = RegQueryEnum("HKEY_CURRENT_USER","Software\\BearStar\\IVT","List") ECHO "Number of items found: $x" FOR (i = 0; $i < $x; i = $i + 1) Key = expand("\$List_NM_$i") Typ = expand("\$List_TP_$i") ECHO "$Key $Typ\n" NEXT This lists all the subkeys and value names of the given key. The results are stored in LOCAL variables, see also CSET. See also RegQueryStr and RegQueryDword. See also RegDeleteKey and RegDeleteValue. See also $IVT_REGISTRY_BASE. 13.10.61: REGQUERYDWORD (Query Windows registry for an integer) RegQueryDword(Hive,Key,Name,VariableName) This function is the IVT wrapper around the standard windows function RegQueryValueEx. It retrieves a binary integer (DWORD) from the windows registry. The Hive must specify a valid windows hive, which is one of: HKEY_CLASSES_ROOT HKEY_CURRENT_USER HKEY_CURRENT_CONFIG HKEY_LOCAL_MACHINE HKEY_USERS

The "Key" must specify a valid key name in the given hive. The "Name" must specify the name of a valid subkey, or the empty string to retrieve the default value of the key. When the specified value can be retrieved successfully, the resulting value i When there is a problem, the Windows error code is returned and the variable is not assigned. Example: x = RegQueryDword("HKEY_LOCAL_MACHINE", \ "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", \ "EnableICMPRedirect","ReDir"); IF $x == 0 THEN Echo "Value of EnableICMPRedirect is $ReDir\n" The type (DWORD) must match the actual registry contents, or the function wil fail. See also RegQueryEnum to find the names and types. See also $IVT_REGISTRY_BASE. 13.10.62: REGQUERYSTR (Query Windows registry for a string) RegQueryStr(Hive,Key,Name,VariableName) See RegQueryDword for details. This function retrieves a string instead of a DWORD. IF (x = RegQueryStr("HKEY_CURRENT_USER", \ "Software\\BearStar\\IVT\\CurVersion","","IvtVer")) \ THEN ECHO "Current IVT version is $IvtVer\n" \ ELSE ECHO "Key for IVT is missing?\n"

IVT User Manual, Version 23.0 Page: 23 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.63: REGSETVALUEDWORD (Write an integer to the Windows registry) See also RegQueryEnum. See also $IVT_REGISTRY_BASE.

RegSetValueDword(Hive,Key,Name,Value) This function is the IVT wrapper around the standard windows function RegSetValueEx. It stores a binary integer (DWORD) into the windows registry. The Hive must specify a valid windows hive, see here. The "Key" must specify a valid key name in the given hive. The "Name" must specify the name of a valid subkey, or the empty string to set the default value of the key. When the key can be created successfully, the given Value is coverted to its integer values and stored. The return value of the function is 0 on success, negative for invalid See also RegQueryDword and RegSetValueStr. See also $IVT_REGISTRY_BASE. 13.10.64: REGSETVALUESTR (Write a string to the Windows registry) RegSetValueStr(Hive,Key,Name,Value) See RegSetValueDword for a description of parameters and return values. This function stores a string instead of an integer, so Value can be any vali string. See also RegQueryStr and RegSetValueDword. See also $IVT_REGISTRY_BASE. 13.10.65: RENAME (Rename a file or directory) RENAME(oldfilename,newfilename) This function simply calls the operating system RENAME function. It renames the file or directory specified by oldfilename into newfilename. The return value is 0 when the call is successful, and nonzero when a problem occurred. The $ERRNO variable is set to indicate the problem. 13.10.66: REMOVE (Remove a file) REMOVE(pathname) This removes a file, it is a synonym for UNLINK, see there for details. See also RMDIR and FindFiles. 13.10.67: RESOLVENAME (Translate name into an IP address) RESOLVENAME(name) This function translates the hostname given as name into an IP-address, using the same routine that IVT uses to be able to connect to a host. This can be configured using the RESOLVE statement. This function can take a fairly long time to complete, depending on the availability of the nameservers involved, and is therefore not allowed to be used in complex expressions (only a simple var = ResolveName($name)). When a name cannot be resolved because it does not exist, the function return the string UNKNOWN. When a name cannot be resolved because name servers did not respond within the given time it returns the string TIMEOUT. In other cases it returns the dotted-decimal IP-address for IPv4 hosts, or th numerical IPv6 address for v6 hosts. IPv6 addresses are enclosed in square brackets to make sure that they remain valid when you append a port number or service name to the result. Example: Address = ResolveName("www.linux.org") ECHO "Linux lives at $Address\n" Address = ResolveName("www.linux.bad") ECHO "www.linux.bad = $Address\n"

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.67: RESOLVENAME (Translate name into an IP address) Produces: Linux lives at 198.182.196.56 www.linux.bad = UNKNOWN

Page: 23

Note:: IVT uses a local cache to store previous results for a little while (15 seconds). This greatly reduces overhead when connecting a great man sessions to the same host but can give unexpected results if you are testing modifications to a name server. If you use RESOLVE_TRACE, IVT will display on-screen how the resolving process progresses. See also RESOLVE. See also the $IVT_NETW_DOMAIN variable. See also the DOMAIN statement. 13.10.68: RMDIR (Remove a directory) RMDIR(pathname) This function calls the operating system version of the RMDIR system call. It removes the directory specified by the pathname parameter. If it succeeds, the return value is 0. When it fails, the return code is set to -1 and the $ERRNO variable will contain an operating system error code. The directory must be empty and not in use for this to succeed. See also MKDIR and UNLINK. 13.10.69: REPLACE (Substitute occurrences of a string in a string) REPLACE(source,original,replacement[,count]) This call replaces occurrences of the string original in source by the string replacement. It returns the resulting string. When no count is specified, or the count is zero or negative, all occurrences are replaced. When count is a positive numer, at most that many replacements are made. This works properly even when replacement contains (part of) original. When replacement is the empty string, the original part is removed. Examples: Replace("10.10.10.1","10.","127",1) -> "127.10.10.1" Replace("aaaa","a","") -> "" Replace("aaaa","a","b",2) -> "bbaa" See also SUBSTR, LENGTH, MATCH, etc. 13.10.70: RIGHTSTR (Right-hand part of a string) RIGHTSTR(SourceString,Len) This function returns the rightmost Len characters of SourceString. It is equivalent to: Substr(SourceString,Length(SourceString) - Len,Len) But is more convenient to use for complex expressions for SourceString. 13.10.71: SCREENATTR/SCREENTXT (Contents of screen buffer) SCREENATTR(RowNumber,ColumnNumber[,length]) SCREENTXT (RowNumber,ColumnNumber[,length]) These functions return data from the current screen and scrollback history. A positive RowNumber (1 - $ROWS) references the screen. A negative RowNumber (-1 - ScrollBackLines()) references scrollback history. SCREENATTR returns the character attributes from the screen buffer of the current session. SCREENTXT returns the characters from the screen. Both functions take an optional length argument that defaults to 1. Attributes are returned as 3 hexadecimal numbers, text as plain characters (a UTF-8 string). NOTE: Regardless of the character set that is chosen for the current session, IVT will internally process everything as UTF-8. All possible characters can be represented using UTF-8, so this function will also return characters read from the screen in UTF-8. For "normal" English this is identical, but for lin drawing characters, foreign characters and complex scripts (like Chinese) each character can take many bytes to represent in UTF-8, because each base character can be combined with a number of overstrike characters. Attributes show the foreground and background colors, plus the special attributes soch as blinking and underline. These are returned as two 2-digit

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.71: SCREENATTR/SCREENTXT (Contents of screen buffer)

Page: 23

hex numbers separated by a space for every character cell. The first hex number has the first 4 bits for the background color, the 2nd 4 bits for the foreground color. The 3rd 2-digit number is a field with bit-flags: - 0x01: Character blinks. - 0x02: Character is underlined. - 0x04: Character is protected from VT220 erase operations. - 0x08: Character is a wide Unicode character (takes 2 positions to display). The left upper corner of the screen has row and column number 1. RowNumber zero is invalid (returns an empty string). The size of the screen is found using the $ROWS and $COLS variables. All this can be used by a script to inspect the current contents of the screen. For example: Line1 = SCREENTXT(1,1,$COLS) returns the text of the first line on the screen. To see if the string "FooBar" is anywhere on screen or in scrollback history, searching backward from the last line on screen into history: FOR (i = $ROWS; $i > -1 * ScrollBackLines(); i = $i - 1) Ln = ScreenTxt($i,1,$COLS) IF StrStr("FooBar",$Ln) >= 0 THEN PopUp "Found on line $i" NEXT When invalid parameters are passed (impossible row, colomn or length) an empty string is returned. See also $ROWS, $COLS, CURSOR_ROW() and CURSOR_COL(). See also CAPTURE and ScrollBackLines(). 13.10.72: SCROLLBACKLINES (Number of lines in scrollback buffer) SCROLLBACKLINES() This function returns the number of lines in the scrollback buffer of the current session. Returns zero when nothing is stored yet or when scrollback i disabled. The returned number can be used to access scrollback data using the SCREENTXT and SCREENATTR functions. 13.10.73: SNDMSG (Sends a datagram to an IP-address and port) SNDMSG(HOSTNM,PORTNR,Message-string) Sends Message-string to the host (or decimal dotted IP-address) and specified port number. This uses UDP/IP (datagram) messages. The function always returns success. 13.10.74: SETICON (Change icon for the session) Handle = SETICON(file,index) Handle = SETICON("DEFAULT",0) This function allows you to change the icon for the current session. When you switch between sessions with different icons, IVT will correctly update its icon so this can be used as an extra indication of the (type of) session. IVT normally assigns its default application icon to all new sessions. The first parameter is the name of a file containing icons (an executable, a DLL file, or an .ICO file, and so on). The index parameter specifies which icon to retrieve from the file. IVT uses the Windows function ExtractIcon to do the actual work, and I quote from the manual page: "Index specifies the zero-based index of the icon to retrieve. For example, if this value is 0, the function returns a handle to the first icon in the specified file. If this value is -1, the function returns the total number of icons in the specified file. If the file is an executable file or DLL, the return value is the number of RT_GROUP_ICON resources. If the file is an .ICO file, the return value is 1. Windows 95/98, Windows NT 4.0, and Windows 2000 or later: If this value is a negative number not equal to -1, the function returns a handle to the icon in the specified file whose resource identifier is equal to the absolute value of index. For example, use -3 to extract the icon whose resource identifier is 3." When a handle is retrieved successfully, that icon becomes associated with th current session. When a bad handle is retrieved, IVT falls back to its own

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.74: SETICON (Change icon for the session)

Page: 23

default icon. You can also specify the word DEFAULT instead of a file name, in which case you force a fallback to the default IVT icon. Both the small are set by the SETICON function. 13.10.75: SETTABTEXT (Set text in TAB for this session) SetTabText(string) it. The text in the tab can be set explicitly by a script using this function You can put whatever you want in there to identify the session. When this function is not used, the tab text defaults to $USER@$HOSTNAME, but other default settings are possible, see TABSBAR for details. By setting the empty string, a saved text is discarded and IVT resumes using the default. 13.10.76: SETTABICON (Set icon in TAB for this session) SetTabIcon(filename,index[,filename2,index2]) The TABSBAR command allows you to configure a TABs bar which shows a tab for every active session. Each tab can contain a text and an optional icon. Every session can have its own unique icon. IVT can supply a default CLOSE icon, which can be used to force a close on that session. A script can supply another icon using a filename and an index in that file to identify the icon, see SetIcon for details, The return value of this function is the same as described there. IVT highlights the CLOSE icon when the mouse hovers over it. This is done by alternating between 2 icons: the normal one and the highlighted one. Similarly, you can specify 2 icons uing SetTabIcon, the optional 2nd one is displayed when the mouse hovers over the icon position. If no 2nd icon is given, IVT simply always displays the single icon for that session. When a script sets an icon, it should also use ONTABICON to identify a script to start running when the user clicks the icon (or nothing will happen, since IVT does not know the meaning of your icon). When you use different icons for different sessions, you can use the QuerySetting function with an "ICONTAB" parameter to find the name(s) of the icon(s) set for the session. CLOSE icons are on by default, use TABSBAR with the NOCLOSE_ICON option to turn them off. See also SetTabText to set an script-supplied text in the tab. Some common type of strings can be set using TABSBAR. 13.10.77: SHELLEXECUTE (Run a Windows command) SHELLEXECUTE(Operation,File,Params,Dir,Options) The SHELLEXECUTE function performs a given operation on a given file, using the function of the same name in the Windows API. It has the following parameters: Operation: A string, referred to as a verb, which specifies the action to be performed. the actions available from an object's shortcut menu are available verbs. The following verbs are commonly used: edit explore find open print Launches an editor and opens the document for editing. If File is not a document file, the function will fail. Explores the folder specified by File. Initiates a search starting from the specified directory. Opens the file specified by the File parameter. The file can be an executable file, a document file, or a folder. Prints the document file specified by File. If File is not a document file, the function will fail.

If you set this parameter to the empty string, for systems prior to Microsoft Windows 2000, the default verb is used if it is valid and available in the the default verb is used if available. If not, the "open" verb is used. If neither verb is available, the system uses the first verb listed in the

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.77: SHELLEXECUTE (Run a Windows command) registry.

Page: 23

File: A string that specifies the file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully-qualified parse name (see GetFullName). Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. Params: If the File parameter specifies an executable file, Params is a string that specifies the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If File specifies a document file, Params should be an empty string. Dir: The name of the initial directory. Can be the empty string. Options: Flags that specify how an application is to be displayed when it is opened. I File specifies a document file, the flag is simply passed to the associated application. It is up to the application to decide how to handle it. Valid values are one or more of the following words: HIDE Hides the window and activates another window. MAXIMIZE Maximizes the specified window. MINIMIZE Minimizes the specified window and activates the next top-level window in the z-order. RESTORE Activates and displays the window. If the window is minimize or maximized, Windows restores it to its original size and position. SHOW Activates the window and displays it in its current size and position. SHOWDEFAULT System default. SHOWMAXIMIZED Activates the window and displays it as a maximized window. SHOWMINIMIZED Activates the window and displays it as a minimized window. SHOWMINNOACTIVE Displays the window as a minimized window. The active window remains active. SHOWNA Displays the window in its current state. The active window remains active. SHOWNOACTIVATE Displays a window in its most recent size and position. The active window remains active. SHOWNORMAL Activates and displays a window. SYNC Start the application and waits for it to finish. Normally, the program is started in the background. WAITINPUTIDLE Waits until the program is initialised. The function returns an instance handle (a value > 32) when the command is successful, a value less than 32 on errors. Usually, it seems to return "42" for success. IVT currently provides no means to decode the error code, so simply assume it failed when a value less or equal to 32 is returned. This function allows you to perform Windows defined actions on objects, i.e. the action performed on an object when you double-click it. Using the Operation keyword allows you to do other actions than the default. For example, to start the editor on a ".doc" file (usually Word): x = SHELLEXECUTE("open","Somefile.doc","","","SHOWNORMAL") When the "Somefile.doc" file exists, Windows will perform the "open" action on it (which is the double-click action). Normally, this starts MS-Word. To print the same file: x = SHELLEXECUTE("print","Somefile.doc","","","SHOWNORMAL") To start NOTEPAD on a simple file and wait for the user to close the application, use: x = SHELLEXECUTE("print","Somefile.txt","","","SHOWNORMAL SYNC") To run a simple executable: SHELLEXECUTE("open","$ENV_WINDIR\\system32\\ping.exe", \ "-n 1 rohan","","SHOWNORMAL") Note, that in this case, a successful return code does NOT imply that the pin was OK. It merely means the function successfully started the PING command. If you want the exit code of a started program, use the SYNC option, which waits for the command to finish and returns the exit code: SHELLEXECUTE("open","$ENV_WINDIR\\system32\\ping.exe", \ "-n 1 rohan","","SHOWNORMAL SYNC")

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.77: SHELLEXECUTE (Run a Windows command)

Page: 24

However, Windows does not always create a new process for all verbs. For example, using "open" on a ".doc" file while Word is already running will not start Word, but open a second document within the running instance. In such cases, no process is created and so there is nothing to synchronize with. SHELLEXECUTE will just return TRUE in such cases when the execution of the verb was successful, FALSE otherwise (with $ERRNO set to indicate the error). See also the SYSTEM function, which offers a more low-level function to start a process. 13.10.78: SOPEN (Shared open of a file) SOPEN(file,omode,shflag[,openmode]) SOPEN is a SHARED open of a file, with an extra parameter shflag that specifies the way the file is shared between multiple processes. The standard OPEN call (in Unix) manages this with a single call, for unknown reasons, Windows uses a separate function for this. See the OPEN function call for a list of valid omodes. The shflag must be one of: SH_DENYRW SH_DENYWR SH_DENYRD SH_DENYNO (0x10): (0x20): (0x30): (0x40): Denies read and write access to file Denies write access to file Denies read access to file Permits read and write access

IVT does not define the symbolic constants, so you must use the explicit hexadecimal values (see example below). Note that IVT supplies a default 0666 parameter when files are created, you optionally specify a fourth parameter to overrule this. Note that the standard OPEN call defaults to SH_DENYRW, so SOPEN is required if you want to share a file for I/O between processes. The result is -1 when there are problems opening the file, the IVT variable $ERRNO is set to indicate the reason for failure. The descriptor can be used in subsequent READLN, WRITE and CLOSE statements to read/write data to and from the file. See also CREAT, OPEN and EXISTS. See also UNLINK, MKDIR and RMDIR. Example: fd = SOPEN("somefile",2,0x40,0660) Opens the file "somefile" for update (mode 2) and permits read/write access b other processes. The default 0666 openmode is changed to 0660. 13.10.79: SPLIT (split a string using separator characters) SPLIT(SourceString,Separators,basename,type,[,SkipMultiple]) This function splits SourceString into multiple strings, based on separators (like tabs or spaces). Multiple new variables are created this way, based on basename and with an underscore and sequence number appended to them. The Separators expression must contain one or more characters that are used a field separators (for example a space and a TAB). The Type variable must either be the string GLOBAL, SESSION or LOCAL and determines the scope of the variables being created. The SkipMultiple parameter can be either TRUE or FALSE (when not specified it defaults to FALSE) and determines what happens when the fields in SourceStrin are separated by multiple occurrences of Separators. The function returns the number of fields it has found. The basename must specify the (start of) a valid identifier name. Example: x = "1 22 33 44" # 22 and 33 have a space and a tab in between n = Split($x," \t","Flds","LOCAL",1) ECHO "0 = $Flds_0\n" ECHO "1 = $Flds_1\n" ECHO "2 = $Flds_2\n" ECHO "3 = $Flds_3\n" ECHO "4 = $Flds_4\n" This will produce output like: 0 = 1 1 = 22

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.79: SPLIT (split a string using separator characters) 2 = 33 3 = 44 4 = Whereas: n = Split($x," \t","Flds","LOCAL") Produces: 0 = 1 1 = 22 2 = 3 = 4 = 33 In the first example, the multiple spaces and tabs are skipped. In the second example, they result in multiple (empty) fields. See also SUBSTR, INSTR, MATCH and STRSTR. 13.10.80: SPRINTF (Format a string) SPRINTF("Format expression",string-to-format)

Page: 24

This simply calls the C-runtime function "sprintf", which prints to a string. Note that the standard function allows you to format multiple strings in a single call BUT IVT DOES NOT SUPPORT THIS! Only ONE string argument is supported. If you pass the wrong type of format string, you will CRASH IVT an lose all current sessions! Having said that, you can use SPRINTF to format strings like so: SPRINTF("Value: %-20.20s: ",$SomeString) This will format "$SomeString" in a left-adjusted, space-filled field of 20 characters, followed by a colon, and preceded by "Value:". See the SPRINTF documentation of C for more details, for example by searching MSDN for "sprintf". As a simple example, the C function allows things like: printf("This %s two %s and number: %d\n","is","strings",100); And this would print: This is two strings and number: 100 IVT does not support the variable number of arguments that this requires! IVT will do a simple scan of the format string. When you are using a numeric format, the numeric value of the argument will be passed. When you use a string format, the string value will be passed. So, x = SPRINTF("%04d","10") Will produce "0010" (four long, zero-filled decimal value of the string, even though the argument is a quoted string). See also ECHO and ECHO_LIT and VTECHO.. 13.10.81: SQRT (Square root) SQRT(number) This function takes a numeric argument and returns the square root. Since IVT does not support floating point numbers, this gives the INTEGER result of the square root (64-bit arithmetic). 13.10.82: SUBSTR (Take part of a string) SUBSTR(inputstring,startoffset,length) This function can be used to extract part of a string. The inputstring specifies the source string to be operated upon. The startoffset is the starting place in inputstring. A value of 0 denotes the start of the string. The length parameter says how many characters are to be taken from inputstring. A negative length is taken to mean the maximum string length. The result of the function is the substring, which can be empty. Examples:

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.82: SUBSTR (Take part of a string) Part = SUBSTR("abcdefg",3,2) Part = SUBSTR("abcdefg",1,-1) Part = SUBSTR("abcdefg",10,1) # Part is "de" # Part is "bcdefg" # Part is ""

Page: 24

See also STRSTR, INSTR, UPPER, LOWER and LENGTH. See also MATCH. 13.10.83: SRAND (Seed the random number generator) SRAND(seed) The srand function sets the starting point for generating a series of pseudorandom integers. To re-initialise the generator, use 1 as the seed argument. Any other value for seed sets the generator to a random starting point. The rand function retrieves the pseudorandom numbers that are generated. A given seed results in a fixed sequence of generated "random" numbers. 13.10.84: STRICMP (Case insensitive string compare) STRICMP(arg1,arg2) This function does a case insensitive string compare of the 2 arguments. It returns 0 when both arguments compare as equal. A value less than zero is returned when arg2 < then arg2; A value greater than zero is returned when arg2 > then arg2; It is more efficient to use this than to use either LOWER or UPPER on both arguments of a normal compare. See also MATCH, SUBSTR, STRSTR and INSTR. 13.10.85: STRSTR (Find a string in another string) STRSTR(substring,targetstring) This function looks for substring in targetstring and returns the offset of the start of that string when found, and -1 if the substring is not found in targetstring (see C-function of the same name). For example: STRSTR("abc","xxxabcdefxxx")returns 3 STRSTR("abc","abcabc")returns 0 STRSTR("abc","abdxabd")returns -1 See also SUBSTR. STRSTR is often used in conjunction with a CAPTURE statement. For example: CAPTURE LoginSequence WAIT "ogin:" SEND "$USER\r" WAIT "assword:" SEND "$PASSWORD\r" CALL WaitPrompt CAPTURE off if STRSTR("You have mail",$LoginSequence) == -1 THEN RETURN SEND "mailx\r"# Start Unix mail program This sequence uses the CAPTURE statement to capture all output that is produced during login into a variable. A Unix host will usually print the message "You have mail" when you have unread mail. When this string is detected among all other output, the login-script automatically starts the Unix mail program. See also SUBSTR, INSTR and MATCH. 13.10.86: SYSTEM (Run a command on the PC) SYSTEM("host command") This function can be used to run any operating system command as a sub-proces of IVT. The contents of "host command" is passed to the command processor of the PC that IVT runs on. The result is the value returned by the command processor. Note that this can take a long time to run, and the call to SYSTEM will not return until the command finishes. This can block ALL of IVT, all sessions! Also note, that in spite of this, it is not considered a blocking command and thus can be used anywhere, anytime, even in STARTUP scripts. So, handle with care...

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.86: SYSTEM (Run a command on the PC)

Page: 24

If you want to start a command without waiting for it, and want to pass arguments that contain spaces, do something like: Word = "c:\\Program Files\\Microsoft Office\\Office\\Winword.exe" File = "c:\\Documents and Settings\\RBeerstra\\My Documents\\x.doc" SYSTEM("START \"Word\" /B \"$Word\" \"$File\"") The Windows START command takes a window title (Word), the /B will not create a new window, the backslashes and quotes are required because the other arguments contain spaces. The example fires up Word on the specified file. Note: The newer ShellExecute is a lot more convenient for this task. The START command does not wait for Word to finish (leave /B out if you want to wait for the command to finish, or add a /WAIT parameter). The function returns, according to the Windows documentation, the value returned by the command processor (CMD.exe in Windows NT). The command processor returns the exit status of the program you start, but Windows programs are not exactly careful in returning meaningful exit codes. For example, the following does NOT work: x = SYSTEM("ping -n 1 some_host") One might expect that PING would show the success of the operation in the exi state (as it does on Unix), but the Windows PING.EXE always returns zero. So, the function DOES return the exit code of the started program, but it is not always meaningful. If you want to examine the output of the program, you will have to redirect the output to a file, then read the file (see OPEN, READLN and CLOSE). See also SHELLEXECUTE, which is a better way to start Windows programs. 13.10.87: THREAD (Start an - asynchronous - thread) THREAD ScriptName([parameters]...) IVT supports the concurrent execution of multiple SCRIPTs in a single session This means, for example, that multiple WAIT statements can execute simultaneously on a single session. All those WAIT statements will parse the same data. TIMEOUTS, SLEEPs and USLEEPs are all designed such that they do not block other threads or other scripts. A "normal" CALL to a script is synchronous, if you want to create a new thread, all you have to do is to use THREAD instead of CALL. The return value of the THREAD function is the PID (Process ID) of the newly created thread (or -1 when something fails). This PID can be used as a parameter to a WAITTHREAD call if you want to wait for a specific thread to exit. For example: ... IGNCHILDREN on Pid1 = THREAD WaitMail() Pid2 = THREAD WaitDown() # Execution continues normally ... Script WaitMail HIDDEN SECRET WAIT "You have mail" ... # Do something with the knowledge that the user received new mail END Script WaitDown HIDDEN SECRET WAIT "System is going down" # Do something with the knowledge that the system is going down END This will start two threads. All data received on the session is continually inspected for "You have mail" and "System is going down". The efficiency of IVT is such that this will hardly cause a notable differenc in speed. The WAITTHREAD can be used to wait for the termination of a thread. Just like in Unix, a process (thread) cannot die completely until its termination code has been received by its parent. If the parent wants to start threads and forget about them (it does not intend to do a WAITTHREAD for them), it should issue an IGNCHILDREN (ignore children) before it creates new threads with FORK or THREAD.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.87: THREAD (Start an - asynchronous - thread)

Page: 24

If the parent (the scripts that creates a THREAD) has died (or returned normally), any orphaned threads will be cleaned up by IVT when they terminate Their return values are discarded. See also the example at $WAITPID. 13.10.88: TIME (Get current date/time in various formats) TIME() TIME("MILLISECS") TIME("DATE",seconds,"format string") This function simply returns the number of seconds since 1970 (standard Unix time format) when invoked with zero parameters. When the MILLISECS qualifier is used, the number of milliseconds that have elapsed since the system started is returned. This can be used to time things in scripts. When the DATE qualifier is used, the next argument must be a numeric value specifying a number of seconds since 1970. The format string will format this date/time into any required format. The format string can contain any text (which is copied to output) and specia conversion characters which are introduced by a %-sign (see below for examples). The following conversion characters are recognized: %m %d %y %Y %D %H %M %S %T %j %w %a %h %r %A Month (01 - 12) Day (01 - 31) YY (00 - 99) YYYY (1900 - 2038) MM/DD/YY Hour (00 - 24) Minute (00 - 60) Seconds (00 - 60) HH:MM:SS Day number in year (000 - 365) Day number in week (0 - 6, 0 = Sunday) Day name (Sun, Mon...) Month name (Jan, Feb..) HH:MM:SS [AM|PM] CTIME format (example "Thu Mar 28 12:08:08 2002")

Because the DATE format accepts any valid input parameter, date calculation becomes possible, as in: now = TIME() tomorrow = $now + (24 * 3600) ECHO "Now is" TIME("DATE",$now, "%A or %m/%d/%Y day %j\n") ECHO "Tomorrow is" TIME("DATE",$tomorrow,"%A or %m/%d/%Y day %j\n") When run, this produces: Now is Sun Jan 28 13:07:19 2007 or 01/28/2007 day 27 Tomorrow is Mon Jan 29 13:07:19 2007 or 01/29/2007 day 28 By playing with the value added or subtracted to the current date, it is possible to obtain any representation of any past or future date (within the limitations of the operating system). 13.10.89: TOASCII (Translate from numeric to ASCII) TOASCII(number) This function will generate a string of one byte long that contains the ASCII character specified by number. See also FROMASCII. 13.10.90: UNLINK (Remove a file) UNLINK(filename) This function removes the specified file (expression). It sets $ERRNO. When the remove is successful, it returns TRUE. In case you wonder about the name, UNLINK is the name of the (Unix) system call that removes an object... See also REMOVE, which is supplied as an easier to remember alias. See also RMDIR, to remove an (empty) directory. See FINDFILES to find objects in a directory.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.91: UPPER (Translate to upper case) 13.10.91: UPPER (Translate to upper case) UPPER(string) The result of this function is the uppercase version of string. See also LOWER. Can be used to build case-insensitive IF statements. See also STRICMP. 13.10.92: VARDEF (Test if a variable exists yes/no) VARDEF(variablename)

Page: 24

This function is passed the name of a variable. It returns TRUE (1) when a variable with that name exists, and FALSE (0) if it does not. This can be very useful when the difference between an empty variable and a non-existent variable matters. See also DEFINED, which does the same for functions. See also EXISTS, which does the same for files. 13.10.93: VLINES (Query/change VERTICAL_LINES on session) VLINES("QUERY"|"ON"|"OFF") This function queries or changes the current setting for VERTICAL_LINEs. The VERTICAL_LINE statement allows you to define lines that are on the screen all the time to indicate a particular position (such a column 80) on wide screens. Once defined, they will appear on all sessions. Sometimes, depending on what you use the session for, they are just in the way, and you'd rather have them turned off temporarily. The 'Extra' menu bar menu will allow you to turn them on and off manually as desired. If you know beforehand that you will not want them for a particular session, you can also turn them on or off under script control. The QUERY parameter will return 1 when VERTICAL_LINEs are defined and visible, 0 otherwise. The ON and OFF will function only when lines are defined (and return TRUE (1)), and will return FALSE (0) when no lines are defined. See also QUERYSETTING. 13.10.94: WAITTHREAD (Wait for a thread to exit) WAITTHREAD([pid]) Wait for the specified thread-id to exit. Return value of this function is the exit status of that thread. If no PID is specified, this will wait for ANY child (of the currently executing script). The process (or thread) ID is returned by the FORK and THREAD functions. If there are no (more) children that can be waited for, the function returns a value of -1 immediately. When an IGNCHILDEN on was in effect when the child was created, it will not be noticed by a WAITTHREAD. The PID of the process that ended is stored in $WAITPID (which is the only way to find out WHICH process ended if you are waiting on multiple PIDs). Notice that one session CAN wait on a thread created by ANOTHER session if it somehow knows the PID of the process (a GLOBAL variable, for example). PID's are globally unique in IVT. A WAITTHREAD without parameters only detect threads created by the CURRENT session, of course. 13.10.95: STAT (Status/attributes of a file) STAT(Filename,Base,Type) the given Filename. The results are returned in multiple IVT variables. The Type determines the scope of the given variables: - GLOBAL (global variables, visible in all sessions). - SESSION (session variable, visible in all scripts and threads running for the current session. - LOCAL. Local scope, only visible in the current instance of the current SCRIPT.

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.95: STAT (Status/attributes of a file)

Page: 24

inserted in the name): - Base_ATIME Time of last access of the file. Valid on NTFS but not on FAT formatted dis drives. Format is seconds since the epoch, see TIME(). - Base_CTIME - Base_MTIME Time of last modification of file. - Base_INODE Drive number of the disk containing the file. - Base_MODE Bit mask for file-mode information. See IsDir. - Base_SIZE Size of the file in bytes; a 64-bit integer The function returns 0 on success and -1 on errors (in which case the $ERRNO variable is set to indicate the error). Example: IF STAT("$IVTDIR/ivt.exe","IvtDetails","LOCAL") == 0 \ THEN ECHO "The IVT executable is $IvtDetails_SIZE bytes in size\n" \ ELSE ECHO "Cannot get status for IVT: error is $ERRNO\n" See also OPEN and FindFiles. 13.10.96: WRITE (Write to a file) WRITE(Fdexpr,String) This writes the data in String to the file identified by Fdexpr. The FD (file descriptor) must have been obtained from a valid OPEN, CREAT or SOPEN function. The function returns the number of characters successfully written. It returns -1 and sets $ERRNO in case of trouble. See also EXISTS, RENAME, OPEN , LSEEK and READLN. See also UNLINK, MKDIR and RMDIR. 13.10.97: WINDOW_ATTR (Query attributes of a WINDOW) WINDOW_ATTR(name,attr) A text popup can be created using the WINDOW statement. These can be given a title, color, position, text and so on. Sometimes it can be convenient to query certain attributes of these windows for use in a script (for example in combination with MOUSE_KEYLOC when you click on a window). The name argument must be the name of a valid WINDOW (a string). The attr argument (also a string) must be one of: ROW- Returns the row number of the current top line of the window. COL- Returns the column number of the current left border of the window. HEIGHT- Returns the height in lines of the window (includes borders). WIDTH- Returns the width of the window in characters (includes borders). VISIBLE- Returns TRUE (1) when the window is visible, FALSE (0) when hidden. When an invalid window or attribute name is given, the function returns -1. Example: Col = WINDOW_ATTR("MY_WIN","COL") Row = WINDOW_ATTR("MY_WIN","ROW") See also WINDOW, CURSOR_COL, CURSOR_ROW and MOUSE_KEY. 13.10.98: WINEXISTS (Test status of a WINDOW handle) WINEXISTS(name) When windows are created and destroyed with the WINDOW statement, it is sometimes convenient to test whether a specific window exists or not. This function returns TRUE (1) when the specified window handle exists, FALSE (0) when it does not. Example:

IVT User Manual, Version 23.0 13: The SCRIPT language 13.10: All function calls of the SCRIPT language 13.10.98: WINEXISTS (Test status of a WINDOW handle) WINDOW MyWin x = WINEXISTS("MyWin")# Returns TRUE (1) WINDOW MyWin KILL x = WINEXISTS("MyWin")# Returns FALSE (0)

Page: 24

IVT User Manual, Version 23.0 14: X/Y/Zmodem file transfer 14: X/Y/Zmodem file transfer

Page: 24

IVT supports file transfer by means of the XMODEM, YMODEM and ZMODEM file transfer protocols. The first two are rather old, but ZMODEM is based on X/Y modem and available on a wide variety of platforms. New in 16.4 is the option to transfer a file in plain ASCII mode. Files can be transferred over any IVT built-in protocol (even TELNET and RLOGIN, though you will usually have FTP or shared disks in a networking environment as a better way of sharing files). Originally, X/Y/Zmodem was introduced after adding serial line support to IVT, because, in that case, it is a very necessary feature to have. IVT supports auto-recognition of a ZMODEM file transfer. If you use the sz/rz tools commonly available on Unix platforms, IVT will start the receive automatically in case of a 'sz', and prompt you for a file in the case of 'rz'. When you want to transfer files using X/Ymodem, you type ALT+F9 to get to the file-transfer screen of IVT (or use the 'Sessions' menu on the menu bar). First, you have to choose a protocol and a direction to to the transfer in. When the protocol supports the transmission of filenames, you will not be prompted for a filename (Y/Z modem) when RECEIVING files. Clicking on CANCEL will abort the procedure (which sometimes implies that a CANcel sequence is transmitted to the remote end), clicking on ABORT will ALWAYS explicitly send a CANcel to the remote end. For XMODEM, you are prompted for a local filename to store received files. You are always prompted for filenames to SEND. You can use wildcards in the names of files to send. Also, IVT will first look in the DOWNLOAD directory to find files to send. When zero matches are found, it will interpret the typed name as a full path name and try again. This allows you to specify a download directory that is used as an exchange area for both sending and receiving files. The progress screen will show some statistics on ongoing transfers. Especially important is the speed (characters per second) in relation to the size of the file. IVT calculates a "Time remaining" based on this. When the transfer finishes, the BELL is sounded and you have to use ESC to return to the session screen. Of course, IVT handles file transfers asynchronously. So while a file is being transferred, you can use session management keys to switch to other sessions, create new ones, etc. An ESC can be typed to abort the transfer prematurely. If, for example, you type: $ sz MyBigFile everything should start automatically. Files are received into the DOWNLOAD directory. Files can be sent from any directory, too. When you type: $ rz You will be prompted for a name. Whatever file is transferred will be stored in the current directory on Unix, since IVT does not send the full pathname o the file. Make sure the receiving end is ready to receive a file. For a plain ASCII transfer, you would (on Unix) typically do something like: $ x=`stty -g`; stty -echo tabs -opost -icrnl; cat - > file; stty $x This will save the current terminal settings in variable x, turn off echo, settings. When the transfer finishes, you have to type an EOF character to tell CAT to stop (usually ^D). See the FILE_RECEIVE and FILE_SEND function calls and the examples there.

IVT User Manual, Version 23.0 15: Kerberos V5 authentication/encryption 15.1: Introduction to Kerberos This is an important feature, others are prev/next 15: Kerberos V5 authentication/encryption 15.1: Introduction to Kerberos

Page: 24

This build of IVT does not support Kerberos authentication/encryption. Contact your local IVT representative :-)

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT

Page: 25

This chapter lists all escape sequences that are recognized by IVT. Most of these are standard VT220 escape sequences. Where IVT differs from the standard, this is (of course) noted. There is also a list of IVT-only escape sequences (which do not conflict with the VT220 standard). These are described here. The sequences are split into various parts: - Control codes (single byte codes); - 8-bit control codes (single byte codes); - Sequences started by a single ESC lead-in; - Sequences started by a CSI lead-in; - Sequences taken from XTERM terminals. - Sequences recognized only in VT52 mode. - Sequences recognized only in SCO_ANSI_ESC mode. Controls codes and escape sequences are only interpreted when IVT is not in DEBUG mode. Another way that can cause escape sequences not to be interpreted is when a SCRIPT uses a DISPLAY off command in combination with WAIT statements to catch characters transmitted by the host. Lastly, the session can turn the printer in controller mode, which will result in every character being transmitted straight through to the printer without further action taken (except for the end-of-print-through escape sequence...) However, in all other cases the incoming characters are processed according to the rules detailed in the topics below. 16.1.1: IVT Control codes Control codes are single-byte characters that perform special functions. Control codes can occur anywhere in the stream of characters that gets transmitted by the host. Many VT220 terminal emulators fail miserably in this respect, but the DEC standard dictates that a sequence such as: ESC [ 1 ; 1 H which will home the cursor, may be interspersed with control codes such as new lines, tabs and so forth without altering the meaning of the escape sequence. So there might be a LineFeed in the middle of the above example, like: ESC [ 1 LineFeed; 1 H And this should perform the LineFeed control function (which might scroll the screen) AND home the cursor! IVT of course implements the correct functionality :-) Another bizarre item in VT220 compatibility was brought to my attention by Andy Langdon. A true VT220 will accept the following sequences and IGNORE them: ESC [ - 6 X ESC [ 6 ; - 2 X ESC [ - - 6 - ; - 2 X The 'X' command is just an example, all commands behave this way. In other words, a hyphen (minus sign) anywhere in an escape sequence causes the sequence to be turned into a no-operation, but it is parsed entirely unti a command character (the X in the examples above) is seen. Older versions of IVT would treat the hyphen as an unexpected character, abort the parsing of the sequence and display the rest of the data as normal characters (so IVT would display the "6X" on screen in the first example. IVT 16.2 and later wil accept the hyphens and ignore the resulting command. Incidentally, it also accepts and ignores NULL characters in escape sequences. Note that the number of hyphens does not matter, nor their position in the but when a second parameter is sent with a hyphen in it, the entire command is ignored. When two hyphens are sent, they do NOT cancel each other out. They can occur before, in between and after the decimal digits. They seem to have no use or logic, but I have verified this behaviour against a genuine VT220 terminal and copied the observed behaviour in IVT.... IVT knows the following control codes (see also 8-bit commands): - NULL (ASCII 0 character, CTRL+@). This gets ignored (even in the middle of a command). - ENQ (ASCII 0x5 character). This is the VT220 ENQUIRY function. In response, IVT transmits the ANSWERBACK string. The default for this is ACK (ASCII character

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16.1.1: IVT Control codes 0x6) but this can be modified either using the ANSWERBACK command in a SCRIPT or IVT.RC file or by using this setup screen. - BELL (ASCII 0x7 character, CTRL+G). This rings the computer bell in the fashion described by the BELL command. This can be TUNE, BEEP, FLASH or OFF. See also BELL_ABUSE.

Page: 25

- LineFeed (ASCII 0xA character, CTRL+J) - Vertical TAB (ASCII 0xB character, CTRL+k) - FormFeed (ASCII 0xC character, CTRL+l) These three all perform the IVT New Line function. This performs many important functions, such as: - Print the current line when the printer is switched on. - If a LineFeed implies a carriage return then the cursor is positioned in column 1. - Scroll the screen one line down if the cursor was at the end of the screen (or else move the cursor one line down). A line that scrolls from the top of the screen is saved into the HISTORY buffer (when enabled). - Delay a short while when the SPEED has been lowered. - BackSpace (ASCII 0x8 character, CTRL+H) This performs the IVT Back Space function. It will position the cursor one position to the left. When it reaches the beginning of the line, it will NOT wrap around (but stay in position 1). - ShiftOut (ASCII character 0xE, CTRL+N) This changes the mapping of the IVT character set. The left hand side of the ASCII table is replaced by the special character set. - ShiftIn (ASCII character 0xf, CTRL+O) This undoes the effect of a ShiftOut, the left hand side of the ASCII table is replaced by the standard ASCII set. - TAB (ASCII 0x9, CTRL+I) This will advance the cursor to the next TAB position. The default for this is every 8 characters, but it can be changed by these ESC H escape sequence. See also the CSI g sequence to clear tabs. IVT will correctly process tabs on double width lines. - CarriageReturn (ASCII 0xD, CTRL+M) This will position the cursor in column 1. All other characters will be processed as any normal displayable character, except for the 8-bit commands. Depending on the selected character set, this will display various interestin characters (or not :-). 16.1.2: VT220 8-bit control codes A VT220 terminal supports a number of 7-bit single byte commands and a number of 8-bit single byte commands which are (relatively) rarely used. Every 8-bit command code has a 7-bit equivalent. See also the CODEPAGEMOD statement, which can be used to disable these 8-bit commands one-by-one, and BIT8COMMANDS which can be used to disable them all together. bit equivalents: - 0x84 (Equivalent of ESC D) This does an INDEX (go to the same column position on the next line, scroll when the end of the screen is reached). - 0x85 (Equivalent of ESC E) This does a NEL (go to the first column of the next line, scroll when the end of the screen is reached). - 0x88 (Equivalent of ESC H) Horizontal tab set, sets a TAB at the current cursor position. - 0x8D (Equivalent of ESC M) Reverse index. Moves the cursor to the previous line (same column) and will reverse-scroll when the top of the screen is reached. - 0x8E (Equivalent of ESC N) Single shift G2 - the next character to display (NOT necessarily the next character received) is selected from G2.

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16.1.2: VT220 8-bit control codes

Page: 25

- 0x8F (Equivalent of ESC O) Single shift G3 - the next character to display (NOT necessarily the next character received) is selected from G3. - 0x90 (Equivalent of ESC P) Starts a DCS (Device Control String). - 0x9B (Equivalent of ESC [) Starts a CSI (Control Sequence Introduction). 16.1.3: VT220 escape sequences IVT implements find them all, Over and above find listed in the full set of VT220 escape sequences. Listed below you will in all their nauseating detail :-) these standard ones, there are also IVT specials, which you'll this chapter.

Escape sequences start with either an ESC (ASCII 0x1B character) or with a thing that DEC calls a CSI. This CSI is normally a two byte sequence ESC[ (ESCAPE followed by a square-bracket-open), but when IVT is operating in 8-bit mode, this can be abbreviated to 0x9B (an ESC-character with the high bit turned on). This saves bytes-on-the-wire, but also causes many problems with software that cannot adequately handle a VT220 in eight-bit mode (this 8-bit mode also alters the codes generated by keystrokes). Also see CODEPAGEMOD which can turn these commands into displayed characters. To complicate things further, some sequences ALWAYS start with just an ESC character. And to complete the fun, typing a single ESC key will generate a sequence that will confuse many hosts because function keys start with an ESC character (followed by codes that identify the key being pressed). This means that a host has to rely on timing to differentiate between a lone ESC key and a function key... Many people have cursed Unix because leaning on one of the cursor keys can cause all sorts of things to happen when you are connected on a slow line. This is however, caused by the brain-dead design of the VT220 function keys. Anyway, the ESCAPE sequences recognized by IVT are listed below. The ones tha are preceded by the CSI lead-in are in the next section. - ESC ESC (two escapes) Any escape sequence can be prematurely aborted by sending an escape. Nothing will happen. - ESC , (comma) This will cause a 250Ms (quarter second) delay. IVT will only perform this delay when the session is in the foreground. It is ignored for background sessions. - ESC 7 (ASCII 0x37, the digit 7) Save current cursor attributes. Unlike some inferior emulators, IVT will also save various other attributes such as the current video-mode and character set mappings (as done by a real VT220). This saves the current cursor position, to be restored by ESC 8. - ESC 8 (ASCII 0x38, the digit 8) Restore saved cursor attributes. All saved attributes are restored, returning the cursor to its saved position. See ESC 7 above. - ESC # 3 Turns the double high, top-half mode-bit on for the current line. Like double wide characters, this feature works only for whole lines, not individual characters. - ESC # 4 Turns the double high, bottom-half mode-bit on for the current line. See description above. - ESC # 5 Restores normality (single height, single width characters on the current line. No effect when the current line is already normal. - ESC # 6 Turns double-wide mode-bit on for the current line. Remember that this can only be turned on for individual lines. When a line is changed from single-width to double-width and back again, you will unfortunately lose any characters that were on the right half of the screen (normally the 40th position). Strictly speaking, this is a bug. - ESC # 8 Fills the screen with a test-pattern of 'E' characters (regardless of the current screen size). Is meant to give you the chance to twiddle with the video controls to center the picture and such.

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16.1.3: VT220 escape sequences -

Page: 25

ESC ~ ESC n ESC { ESC o ESC | These commands are used to set the character set used to display characters Refer to a VT220 programming guide for details.

- ESC N Single shift to G2. - ESC O Single shift to G3. - ESC c (lower case C) Reset the current session. This basically does the same as F3-R: - Reset any active printer on the session (close it); - Clears the screen; - homes the cursor; - Restore the programmed function keys to the default; - Restore all foreground and background colors to defaults; - Restore key click setting; - Restore F1 - F4 setting to default; - Restore history saver to default; - Restore line wrap to default; - Restore the CODEPAGE to default. - Restore cut mode to default; - Restore debug mode to default; - Restore bell mode to default; - Restore backspace key setting to default; - Restore speed setting to default; - Restore 7 or 8 bit mode to default; - Restore number of lines and columns to default; - Restore cursor height to default; - Restore mouse mode to default; - Restore answerback string to default; - Restore status line on/off to default; - Reset scroll region to full screen; - Reset line attributes to single height, single width. - Reset cursor attributes and size; - Etc. See also soft reset. However, when the host initiates the reset, the terminal identification string is not reset. Also, a running script is not terminated by a host reset command. - ESC H Sets a tab at the current cursor position. See F3-R to restore tab settings to their defaults. See also the CSI g sequence to clear tabs. - ESC = Turns the numeric keypad into APPLICATION mode. In this mode, the numeric keys of the extra keypad generate function key codes, rather than the numeric values. - ESC > Turns the numeric keypad into NUMERIC mode. This is the default. See also ESC = above. - ESC D Performs the same as a New Line. - ESC E First does a New Line, then moves the cursor to the first position of the current line. - ESC M Move cursor up one line. If the cursor is already at the top of the current scroll region, it will scroll that region down one line (that is, a reverse scroll). ESC ESC ESC ESC ( ) * + These manipulate the character set.

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16.1.4: VT220 CSI sequences 16.1.4: VT220 CSI sequences

Page: 25

These sequences are started with the CSI lead-in. The general format is: CSI [parameter;]... COMMAND [option] Parameters are numerical values, separated by semicolons. The COMMAND is a single character. As an example: ESC[10;20H is a command to position the cursor. Below is the complete list of all such sequences understood by IVT. Other special sequences are described in this chapter. - CSI row ; col H Set cursor to the position indicated by row and col. For example, CSI10;20H will position the cursor on column 20 in line 10. See also cursor relative positioning below. - CSI row ; col f This does the same as the command above, but the values of row and col are interpreted to be to the start of the scroll region. This way, you can address relative to a scroll region even if absolute cursor addressing is in effect - see also cursor relative addressing. - CSI ? 1 h This sets the cursor keys of the keyboard in application mode. - CSI ? 1 l This sets the cursor keys of the keyboard in normal mode. - CSI ? 2 h Locks the keyboard. Has to be enabled from the host again, or the session has to be reset entirely. When a script has used a KEYBOARD command to lock the keyboard, this sequence is ignored. - CSI ? 2 l Unlock keyboard. This will only work if the keyboard was locked by the host as well. When a script has used a KEYBOARD command to lock the keyboard, lock/unlock commands from the host are ignored. - CSI ? 3 h This changes the width of the screen to 132 columns when possible (when the font is too big, or the monitor too small it may fail). - CSI ? 3 l This changes the width of the screen to 80 columns. As a side effect of this command, the screen is cleared and the history data is lost (only when the size actually changes from 132 back to 80). When the screen was already in 80-column mode, nothing happens. - CSI ? 4 h Smooth scroll. This sets a default delay of 10 ms in GUI_SMOOTH. Only possible in the GUI versions of IVT. - CSI ? 4 l Turn smooth-scroll mode off. Sets the GUI_SMOOTH value (for the current session) to zero. Only works in the GUI version of IVT. - CSI ? 5 h Turns on dark text on a the defaults background setting commands of IVT Improves readability of the surroundings. light screen. This is implemented by reversing and foreground colors. All explicit color take this setting into account. Seldom used. the screen when there is a lot of light in

- CSI ? 5 l Reverses the effect of CSI ? 5 h, and thus restores normal text on a normal background. - CSI ? 6 h Turns on cursor relative mode. This means that ALL cursor addressing is relative to the scroll region, not absolute screen coordinates. - CSI ? 6 l Turns off cursor relative mode. Addressing the cursor will now be interpreted as absolute screen coordinates. - CSI ? 7 h

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16.1.4: VT220 CSI sequences

Page: 25

Turns auto wrap mode on. This means that lines longer than the current screen width are automatically wrapped to the next line. See also the WRAP script command and this setup screen. The IVT default for this is to be ON. - CSI ? 7 l Turns auto wrap mode off. See also this setup screen. - CSI ? 8 h Turn key auto repeat on. When a key is held down, it will repeat. This is what most users will expect. - CSI ? 8 l Turn key auto repeat off. When a key is held down, it will NOT repeat. This is very uncommon, but a VT220 must be able to do this. - CSI ? 9 h - CSI ? 1000 h This turns XTERM mouse mode on. In this mode, the mouse buttons do not perform the usual actions but send codes to the host instead. This allows you to use application on Unix that are controlled by the mouse (such as Midnight Commander and CSCOPE). The "9" mode is normal XTERM mode, it sends events only on button-down events. The "1000" mode is XTERM2 mode, it sends up AND doen events and uses a different button-numbering system. See also the MOUSE command. - CSI ? 9 l - CSI ? 1000 l This turns XTERM mouse mode off. Default IVT mouse mode is restored. - CSI ? 18 h Set automatic FormFeed to ON when closing printer. On old continous-feed printers this will go to a new page. Most modern printers wil always finish a page, and some may eject an empty page when you use this. - CSI ? 18 l Set automatic FormFeed to OFF when closing printer. See also PRINTER_AUTO_FF. - CSI ? 19 h Turn full screen print mode on. See scroll region. Any 'Print Screen' command will now print the full screen, rather than just the scroll region. See also region print. - CSI ? 19 l Turn scroll region print mode on. A "Print Screen" command will print just the scroll region, not the full screen. - CSI ? 25 h Turn cursor ON (makes it visible). - CSI ? 25 l Make cursor invisible. - CSI ? 47 h Switch to alternate screen. - CSI ? 47 l Switch to normal screen. - CSI ? 66 h Set numeric keypad in APPLICATION mode. - CSI ? 66 l Set numeric keypad in NORMAL mode. - CSI ? 67 h Set backspace key to emit a DELETE character. - CSI ? 67 l Set backspace key to emit backspace. - CSI ? 1047 h Switch to alternate screen, reset screen. - CSI ? 1047 l Switch to normal screen, reset screen. - CSI ? 1048 h Save cursor/color settings, but only when ALT_SCREEN is enabled. - CSI ? 1048 l

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16.1.4: VT220 CSI sequences Restore cursor/color settings, but only when ALT_SCREEN is enabled. - CSI ? 1049 h Save cursor/color settings, switch to alternate screen. - CSI ? 1049 l Switch to normal screen, restore cursor/color settings.

Page: 25

- CSI 3 h Display controls. Does no longer interpret any incoming data except CSI 3 l. All data is displayed in IVT debug format. This control can also be set from this control screen. - CSI 3 l Interpret controls, only works when host turned display of control characters on using CSI 3 h. This code is recognized as the only escape sequence, all others are displayed and not executed. - CSI 4 h Turn insert mode ON. Any characters already on screen will be shifted to the right. VAX VMS toggles insert mode using either Ctrl-A or F14 (Shift+F4). - CSI 4 l Turn insert mode off. Output will overwrite characters already on the screen. VAX VMS toggles insert mode using either Ctrl-A or F14 (Shift+F4). - CSI 12 h Turn local echo off. - CSI 12 l Turn local echo mode on. This command is called SRM (Send/Receive Mode) by DEC. Typed characters are echoed by IVT. - CSI 20 h This sequence turns automatic CR-after-LF on. This means that every time IVT receives a Line Feed character, a subsequent Carriage return character is assumed (positioning the cursor in column 1). Can be turned off by CSI ? 20 h. - CSI 20 l This sequence turns automatic CR-after-LF off. The application will have to explicitly send CR or positioning commands. - CSI 0 K Erase from current cursor position to end of line. - CSI 1 K Erase from current cursor position to begin of line. - CSI 2 K Erase entire current line. - CSI ? 0 K Selectively erase from current cursor position to end of line. - CSI ? 1 K Selectively erase from current cursor position to begin of line. - CSI ? 2 K Selectively erase entire current line. - CSI s1;s2;...sn m This command is called 'set graphics rendition' by DEC. It controls the attributes (colors, blink, underline and such) with which subsequent text will appear. Any number of combinations may be set. The valid values for the parameters are as follows: 0 1 2 4 5 7 8 Reset all attributes to normal. Turn BOLD (bright) video on. Set DIM (grey) video on. Set underlined video mode on. Set blinking video mode on (see SOFTBLINK). Set reverse video mode on. Set invisible video mode on. Set normal intensity on (not bright or dim). Turn underlined video mode off. Turn blinking video mode off. Turn reverse video mode off. Turn invisible video mode off.

22 24 25 27 28

30 - Set current foreground color to black.

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16.1.4: VT220 CSI sequences 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 Set Set Set Set Set Set Set Set Set Set Set Set Set Set Set Set Set Set Set current current current current current current current current current current current current current current current current current current current foreground foreground foreground foreground foreground foreground foreground foreground foreground background background background background background background background background background background color color color color color color color color color color color color color color color color color color color to to to to to to to to to to to to to to to to to to to red. green. brown. blue. pink. magenta. white. grey. the IVT default (COLORS). black. red. green. brown. blue. pink. magenta. white. grey. the IVT default (COLORS).

Page: 25

90 - 97 : Set foreground colors to bright versions of the above colors. 100 - 107: Set backgfround colors to bright versions of the above colors. 130 - 149 are IVT specific: 130 - 138: Temporarily set DEFAULT foreground color 139 : Restore the default foreground color 140 - 148: Temporarily set DEFAULT background color 149 : Restore the default background color There is a rather complicated algorithm in IVT to choose certain combinations 'rightly' in the face of monochrome displays, default reverse video settings, default background/foreground colors and so on. In most cases, this results in the 'best' possible display. - CSI n B - CSI n e Move cursor down n lines. If the end of the scroll region is reached this way, leave cursor on last line of the scroll region. The 2nd form is only valid in ANSI mode. - CSI n A Move cursor up n lines. If the start of the scroll region is reached this way, leave cursor on first line of scroll region. - CSI n D Move cursor back by n positions on the same line. Will leave the cursor on the first position when this is reached or exceeded. - CSI n C - CSI n a Move cursor forward by n positions on the same line. Will leave the cursor on the last position when this is reached or exceeded. The 2nd form is only valid in ANSI mode. - CSI n g Clear tabs. The parameter n can have the following values: 0 - Clear tab in current cursor position. 3 - Clear all tabs. - CSI n J Clear part of the screen. The parameter n can have the following values: 0 1 2 3 Clear Clear Clear Clear from current cursor position to end of screen. from the HOME position up to current cursor location. the entire screen. the scroll back (history) buffer.

The current cursor position is unchanged. - CSI ? n J Selectively clears part of the screen. The parameters and meaning and behaviour is the same as the command above, but only non-protected characters are erased. The "CSI ? 3 J" command does nothing. - CSI n B - CSI n e Move cursor down n lines. If the end of the scroll region is reached this way, leave cursor on last line of the scroll region. The 2nd form is only valid in ANSI mode.

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16.1.4: VT220 CSI sequences

Page: 25

- CSI n A Move cursor up n lines. If the start of the scroll region is reached this way, leave cursor on first line of scroll region. - CSI n D Move cursor back by n positions on the same line. Will leave the cursor on the first position when this is reached or exceeded. - CSI n C - CSI n a Move cursor forward by n positions on the same line. Will leave the cursor on the last position when this is reached or exceeded. The 2nd form is only valid in ANSI mode. - CSI ? 15 n This is the 'Inquire Printer Status' request. IVT will respond with a fixed 'CSI ? 10 n' response, indicating 'Printer OK'. - CSI ? 25 n This is the 'Inquire Function key lock status' request. The response will b CSI ? 21 n when the function keys are locked and CSI ? 20 n when they are unlocked. - CSI ? 26 n Keyboard language request. Response is CSI ? 27 ; 1 n to indicate an North American keyboard. - CSI ? 55 n Request locator status. IVT will respond: No mouse present (IVT does not support Regis style graphics input. Response is CSI?53n. - CSI 5 n Terminal status request. Response is CSI 0 n, indicating 'Terminal OK'. - CSI 6 n Current cursor position request. Response will be CSI row ; col R, where row and col are the current positions. - CSI c Inquire terminal capabilities. See IDENTIFY command. - CSI 1 x - CSI 0 x IVT responds with the following for a CSI 1 x query: CSI2;1;1;144;144;1;0x IVT responds with the following for a CSI 0 x query: CSI3;1;1;144;144;1;0x Note: Each of the response strings do the same thing: what differentiates them is the beginning number in the response (2 or 3). This is a valid, fixed response that claims IVT is having an 8 bit, no parity, 115200 baud session (receive and transmit speeds). Since most sessions are not serial, I just couldn't be bothered :-) - CSI ! p DECSTR - Soft device reset. Resets almost all settings of the current session back to start-up defaults but does not clear the screen or change the cursor positioning. See also ESC c - CSI > c - CSI > 0 c (Secondary Device Attributes Request) IVT responds with the fixed string: CSI>21;11;0c Which claims IVT is a VT220 series terminal, revision 11, no hardware options. - CSI p This is an IVT only 'getname' function. This is recognized only when NetBios support is compiled into IVT (as in this version). It returns the NetBios hostname of the PC that IVT runs on. IVT first sends a single ESC char, then the name, then a line feed. Make sure you read this with echo off, or you'll be sorry. - CSI ln;...q Set LED status. When ln is 0, all LEDS are turned off. Otherwise, the appropriate LEDS (1-4) are turned ON. They are displayed in the status line as icons. Seldom used. A real VT220 has 4 LED-lights on the keyboard. A PC does not. - CSI s Save current attributes. This includes character set, cursor position, and a few other things. These can be restored with the command below. - CSI u

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16.1.4: VT220 CSI sequences Restore current attributes. See above. - CSI " 61 p - CSI " 62 ; 1 p Turn 7-bitmode on. See BITMODE. - CSI " 62 p Turn 8-bitmode on. See BITMODE. - CSI n " q Select character protection attribute (DECSCA). n = 0: Characters may be erased n = 2: Characters may be erased n = 1: Characters may NOT be erased

Page: 25

IVT supports the selective erase commands, which clears non-protected characters. Protected characters are the ones received after a DECSCA is sent with a parameter value of 1. Characters can still be cleared with a normal clear command. See the "selective" clear commands. - CSI start ; end r Define scroll region starting at line start and ending at line end. Such a region defines a sort of "window" on the screen, output will scroll between these lines while the rest of the screen remains stable. A few functions alter their behaviour when a scroll region is in effect: - Cursor addressing can be relative or absolute; - Printing can be of the full screen or the scroll region; A scroll region can be cancelled by specifying no (or 0) for start and end. - CSI n P Delete n characters (default 1) at current cursor positions, shifting remaining characters to the left and filling in free space at the end with blanks. - CSI n @ Insert n spaces at current cursor position. - CSI n X Erase n positions at current cursor location (replace by spaces). - CSI ? n X Selectively erase characters. Oddly, this is not supported by a VT220, but since there is no conflict either, IVT implements this logical extension (all other erase commands have the optional ? feature). - CSI n L Insert n lines. - CSI n M Delete n lines. - CSI ? n i Printer control. n = 1: Print the current line. n = 4: Auto print mode off. n = 5: Auto print mode on. n = 6: "All text" print mode on (IVT only). In 'Auto print mode' a line of output is sent to the current printer every time the cursor leaves that line in a 'normal' fashion. When "All text" is selected, every received byte is sent to printer. See also: Managing printers. See also IVT ESC<space>D special extension. - CSI n i n = 0: Print current screen. n = 4: Controller print mode off. n = 5: Controller print mode on. In 'Controller mode' received data is NOT displayed on the screen but is sent directly to the printer. See also: Managing printers. See also: GUI_PR_CONTROLLER. - CSI 80 $ | - CSI 132 $ | Set page width to 80 or 132.

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.1: Standard VT220 sequences in IVT 16.1.5: IVT VT420 extensions 16.1.5: IVT VT420 extensions

Page: 26

Some applications will ignore the current type of terminal and send escape sequences to IVT that are part of the VT320 or even VT420 command set. To make some of these work, IVT implements a subset of the VT420 commands. I intend to extend these as the need arises. Rectangular Area Operations: - CSI Top;Left;Bottom;Right;Page;DestTop;DestLeft;DestPage $v (DECCRA) This is the Copy Rectangular Area. The first two specify the upper-left, the next two the bottom-right coordinates of a rectangular area on a specified page of memory. Page 1 is the current screen, there can be up to 6 pages of various sizes (see CSI n t command). The data is copied to a similar rectangle that starts on the coordinates DestTop and DestLeft. Example: CSI 7;2;19;80;1;6;2;1$v copies a rectangle starting in row 7, column 2 and ending on 80 to row 6, column 2 (it shifts a chunk of the screen up by Invalid sizes are silently adjusted to sanity when possible, adjustment fails (like a left position that is larger than a position). row 19 column one line). ignored when right

- CSI Top;Left;Bottom;Right $z (DECERA) Erase the characters (and their visual attributes) in the specified rectangular area. Line attributes are not erased. - CSI Top;Left;Bottom;Right ${ (DECSERA) Selective erase the characters (and their visual attributes) in the specified rectangular area. Only characters that are not protected are erased. - CSI Char;Top;Left;Bottom;Right $x (DECFRA) Fill an area in display memory with a specified character. The fill character takes on the visual attributes set by the last SGR control function, not the attributes of the characters that it replaces. Current line attributes (for example, the attributes that specify double-wide, double-high characters) remain unchanged. The first parameter is the decimal code of the character to use. Others: - CSI n $ | Set screen width to n, where n is either 80 or 132. - CSI n t Select Lines Per Page (DECSLPP) This function sets the number of lines for each page in page memory. The VT420 terminal has off-screen memory for storing data entered from the keyboard or the host application; up to 144 lines can be stored. These 144 lines are called page memory. By default, the terminal (and IVT) uses 6 pages of 24 lines each of page memory. The following values are valid: CSI CSI CSI CSI CSI CSI 24t 25t 36t 48t 72t 144t 6 5 4 3 2 1 pages pages pages pages pages page of of of of of of 24 lines. 25 lines. 36 lines. 48 lines. 72 lines. 144 lines.

As a special extension, the following special commands are supported: CSI 1t Restore IVT window (foreground session only). CSI 2t Minimize IVT window (foreground session only). CSI 3;x;yt Move window to coordinates specified by x and y (pixels). CSI 5t Move window to top of Z-order. CSI 6t Move window to bottom of Z-order. CSI 7t Force full repaint of the window. 16.2: IVT-only special escape sequences Besides the standard VT220 escape sequences IVT also supports a number of interesting extra features. They all start with ESC<space> (where <space> is a space-character) and are: - ESC<space>a Paste the default buffer (same as typing ALT-p). For example, my CSCOPE program uses this when the mouse is in XTERM mode and the user presses the right-hand mouse button on some specific place on the screen. In that case, that mouse button must do a paste...

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.2: IVT-only special escape sequences

Page: 26

- ESC<space>B When this escape sequence is seen by IVT, it will change the background color of the activity indicator for that session to GREEN (when that session is in the background). The idea is to use this as part of your Unix shell prompt. The result will be that a background session that returns to the command-prompt will give a green indicator. NOTE: The new COLORREADY statement can be used to customize the actual foreground and background colors for the indicator... See also this part of the status line. - ESC<space>b0 - ESC<space>b1 This controls the binary mode of IVT. For a TELNET session, this will be the TNOPT_BINARY as described in RFC 856, for a serial session, it will toggle the local flow control. The b0 turns it on, the b1 turns it off. - ESC<space>CText ...\n Set the session line comment to the string specified. The string must be terminated with a new line character. When the string is too long it will be truncated. As an extra nicety, IVT will remember the current color settings for the comment string. By explicitly setting the foreground and background colors, sending the comment, and resetting the colors, the comment part of the status line will inherit these explicit colors. - ESC<space>D This sequence simulates a "Print Screen" operation by the user (normally bound to the F2 key). This is the same as the normal CSI 1 i sequence except for the user confirmation. The normal CSI sequence NEVER asks for a confirmation, this special IVT version will ask a confirmation, except when NO_CONFIRM_PRSCREEN is in effect (i.e., exactly the same as manually using the F2 key). The 'D' is short for 'Dump Screen'. - ESC<space>e This escape sequence allows the host control over the clipboard and the multiple copy/paste buffers of IVT. The full syntax is: ESC<space>e<name><Arbitrary data>ESC<space>e The first ESC<space>e is the command lead-in. The next argument <name> is a single alphanumeric character which names the buffer that you want to fill. The name "*" is used to indicate the default copy/paste buffer of IVT (which is the Windows clipboard). Everything that follows is stored in the named buffer. There is no limit to the length of that data, IVT keeps allocating memory as necessary (so you better make sure you terminate the data properly). The data must be terminated by another ESC<space>e. When <name> is an UPPER case character, the data is APPENDED to the buffer with the lower-case name, just like a normal copy/paste does (and the VIM editor). Normally, data replaces whatever is there in the buffer or clipboard. As an example, this command on Unix stores the current directory name on the clipboard (\033 produces an ESC character): echo "\033 e*`pwd`\033 e" For some shells, you may need to write this as: echo -en "\033 e*`pwd`\033 e" or as: echo "\033 e*`pwd`\033 e\c" This stores the combination of the Unix password and group files in the buffer named "a" (the first stores the passwd file in buffer "a" and the next appends the group file to it because of the upper-case A): echo -en "\033 ea"; cat /etc/passwd; echo -en "\033 e" echo -en "\033 eA"; cat /etc/group; echo -en "\033 e" Note that you can use VTECHO to access this feature from a script. - ESC<space>f This will flash the screen briefly (only when session is in foreground). Implemented by turning reverse video on for the entire screen for a short time. Can be used as a silent bell mode. - ESC<space>gfile; - ESC<space>gV;file; This can read a file from your local PC and transmit it to the host. Since this has potential security problems (to say the least), it is disabled by default and has to be enabled using the ESCGET command. See also ESCRUN. The V; causes Verbose mode (the user can see the file being sent). See this example for a Unix script that makes use of this. In IVT 16.4 you can also use file transfer in "Plain Ascii" mode. Use a QUERYSETTING with "ESCGET" as argument to query the current setting.

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.2: IVT-only special escape sequences

Page: 26

- ESC<space>nfile; This is the IVT "noise" command. The given file is fed to the Windows PlaySound function. The given sound file will be played when your PC has the proper hardware (soundcard and speakers), else Windows will make a default noise. See also PLAYSOUND and BELL WAV. When the file name does not exists, IVT will search the PATH for it. When still not found, it will try with MEDIA/ in front, and .WAV appended and combinations of those. - ESC<space>o This is an IVT inquiry command. The global foreground color and background color of the session are returned in the same format as specified in the COLORS command, such as "WHITE BLACK BRIGHT NOBRIGHT". This is useful when you write applications that use colors. A color scheme can be very nice, but is usually assumes a certain background or foreground color that contrasts nicely with the explicit colors set by the application However, some users choose a white background, others blue, others black. This command allows the application to choose "appropriate" colors. See also setting IVT foreground and background colors. - ESC<space>P This has the same effect as using the ALT+F4 key - the session will be terminated. Use with care. Needed when the host wants to make sure (for whatever reason) that the session is going to be disconnected, regardless of the setting of (NO)RECONNECT. The host that uses this should expect an immediate HANG-UP to occur. See also the ENDSESSION command. - ESC<space>p This is the equivalent of using the F3-F key combination. Any active printer on the session will be flushed and closed, causing any print job to end spooling and start printing. This allows remote control of local printers. See also IVTFUNCTION. - ESC<space>Rcommand\n - ESC<space>rcommand\n This can execute arbitrary commands on your local PC. Again, because of the security implications, this is disabled by default and has to be enabled with the ESCRUN command. IVT will read characters until it finds a new line, and store the result in a buffer. When enabled, the whole shebang is passed to a 'system()' call. The PC will execute whatever is passed! See also VTECHO as a way of generating such an escape sequence. When an upper-case R command is used, IVT will send a single new line to the host when the command is finished. When the lower case r command is used, this acknowledgment is suppressed. Also see the SYSTEM function which allows a script to do the same with more control. Use a QUERYSETTING with "ESCRUN" as argument to query the current setting. - ESC<space>s+ - ESC<space>sA + is the same as typing ALT+q (quicker), minus is ALT+s (slower). This either speeds up or slows down the displaying of data by IVT. The default speeds is as fast as possible, the slowest waits significantly between characters. You can send multiple plusses or minuses to make IVT go even slower (or faster). - ESC<space>S0 Turn IVT status line off. Makes extra room available to the application. Will automatically send a RESIZE message to hosts when necessary and supported by the host. - ESC<space>S1 Turn IVT status line on. See above. - ESC<space>S2 Toggle back to the previous setting. This allows you to turn the status line on or off explicitly without knowing the current status, to return it to the previous setting when done. - ESC<space>S3 Reset status line to start-up defaults. - ESC<space>Vname The queries the value of an environment variable of the PC IVT runs on. The name must specify the name of the requested variable, terminated by a new line. IVT responds with a "1 " to indicate the variable exists, followed by the value of the variable, terminated by a new line. When the variable does not exist, the response is a "0 " followed by a new line. Example (on Unix):

IVT User Manual, Version 23.0 16: IVT Escape sequences 16.2: IVT-only special escape sequences stty echo read stty -echo "\033 VUSERNAME" -r does_exist remuser echo

Page: 26

NOTE: See also the termquery support program! This stores the value of the USERNAME environment variable in the remuser variable on Unix (and a 1 in the does_exist variable). The stty -echo is used to prevent the values appearing on-screen, since IVT transmits the data as if it were typed by the user. The "-r" on the read does a raw read, preserves backslashes in an answer. When USERNAME is missing, does_exist contains a zero. You can use this, for example, to find out which Windows user is really logged on when the Unix account is not enough (shared accounts). When the value of the variable is too long (currently 1024 bytes), IVT pretends it does not exist (so you get a 0 returned). This list is expandable upon request. 16.3: VT52 mode For many years, I never bothered with the very old-fashioned VT52 compatibility mode of IVT. This ancient beast is a predecessor of the VT100, and has a number of mutually exclusive escape sequences and sends different codes for the functions and cursor keys. Nobody ever asked, either. However, because I want to have the highest score on the VTTEST score card, I decided to do them anyway (only took a few hours, too). So here they are: - CSI ? 2 h Turns VT52 mode compatibility on. - ESC < Turns VT52 mode off (back to normal mode). - ESC H Homes the cursor. - ESC K Clear to end of line. - ESC J Clear to end of screen. - ESC Y row col Position cursor. Row and col are both single bytes, the ASCII value of which determines the row and column. A fixed value of 31 must be added, the upper-left corner of the screen thus is 1,1. So a SPACE character (value 32 is used to indicate position 1... - ESC I Reverse line feed. Moves the cursor up by one row until the top is reached. When the cursor is at the top of the screen, the contents of the screen will scroll UP. - ESC D|C|B|A Cursor left|right|down|up. - ESC F Select special character set (line drawing). - ESC G Select default character set. - ESC Z Identify. IVT will return a response of ESC / Z, meaning "VT100 emulating a VT52". Furthermore, the cursor keys and function keys emit different values in VT52 mode. It knows about application and numeric mode, too. compatibility test for VT52 features (7 points!). 16.4: IVT XTERM escape sequence support A rather late addition to IVT (May 2005), these sequences mimic features on a XTERM terminal. Exp