Previous | Contents | Index |
The BOLD, BLINK, UNDERLINE and REVERSE options allow each input string to be displayed with its own attributes. If these format options are used together with the ATTRIBUTES option, the ATTRIBUTES option will be supressed.
10 INPUT SCREEN '<AT 5,10, BOLD,BLINK:@@@@@@>' + & '<AT 6,10, REVERSE:@@@@@@>': str1$, str2$ 20 END |
When a single INPUT SCREEN statement is used to create a fill-in screen, certain keys on the keyboard have special functions. The following keys can be used to complete the screen:
Jump to the next field in the input screen statement. Once you have finished filling in a field, you must press the [Tab] key to jump to the next field.
The \ (backslash) can be used to return to a previous field. When the \ key is pressed, you will jump back to the beginning of the previous field and can change the entry.
The [Return] key is used to complete a data entry screen. If more than one format is included in a screen option, when you have finished filling in all the fields, the [Return] key must be pressed to complete data entry. You must be at the last field when the [Return] key is pressed. Until the [Return] key is pressed, you are free to change your response to any field.
10 a$ = '<AT 6, 10: Full name @@@@@@@@@@@@@@@@@@@@@@@@>' + & '<AT 8, 10: Address @@@@@@@@@@@@@@@@@@@@@@@@@@>' + & '<AT 10, 10: City @@@@@@@@@@@@>' + & '<AT 10, 38, AJ, REQ, LETTERS: State ^^>' + & '<AT 10, 50, REQ, DIGITS: Zip #####>' 20 CLEAR INPUT SCREEN a$: name$, addr1$, city$, state$, zip$ DELAY 30 CLEAR PRINT AT 6, 10: name$ PRINT AT 8, 10: addr1$ PRINT AT 10, 10: city$; ', '; state$; ' '; zip$ 40 END RNH Full name Sunny Day_______________ Address 2356 Main St._____________ City San Diego___ State CA Zip 92131 Press the RETURN key to continue Sunny Day 2356 Main St. San Diego, CA 92131 |
Use the MENU option to create pop-up menus.
[LINE] INPUT MENU str_expr: str_var |
str_expr is a string expression that describes the menu. It consists of multiple, comma-separated elements. The elements can be either items or directives.
10 title$ = '%TITLE "structure",%MULTI,' box_loc$ = '%AT 10,15,' client$ = '"TTI_Client"={id,name={Cass,Brock,Errant},phone},' address$ = 'address={%BAR,street,city,state,country},' misc$ = 'misc={%REPLACE,mail,record}' menu$ = title$ & box_loc$ & client$ & address$ & misc$ 20 LINE INPUT MENU menu$: ans$ 30 END RNH +---STRUCTURE---+ | TTI_CLIENT +---ADDRESS--+ | ADDRESS |------------| | MISC... | STREET | +--------------| CITY | | STATE | | COUNTRY | +------------+ |
INTOUCH supports the use of a MOUSE to select and execute menu items when on a DECterm (X-term or workstation). A single mouse click selects and executes the menu item. |
5.17.1 Items
Menu items consist of either a description or a description and = sign
followed by either a data value or a submenu indicator. If no = sign is
given, the data value is the same as the description. If the
description contains spaces or special characters, it must be enclosed
within quotes. Up to 5000 menu items can be handled.
5.17.1.1 Descriptions
Menu descriptions are displayed on the menu for the user to choose.
5.17.1.2 Data Value
The data value is the value returned to the application when the menu
item is chosen.
5.17.2 Submenu Indicator
A submenu indicator consists of a "{" followed by menu elements
followed by "}".
5.17.3 Menu DIRECTIVES:
The following directives can be used with the [LINE] INPUT MENU
statement:
The menu or submenu box can be placed at a given row and column. CENTER can be used in place of row and/or column to center a menu or submenu.
%AT row, CENTER %AT CENTER, column %AT CENTER, CENTER |
The %AUTODISPLAY directive controls display of submenus. Unless specifically turned OFF, INTOUCH automatically displays submenus.
FORMAT:
%AUTODISPLAY [ON|OFF] |
The %AUTOVBAR directive is used to turn vertical bars ON and OFF in menus. By default, menubars do not have vertical bars separating the items. The %AUTOVBAR directive can be used to enable this feature, but it must be placed after the %MENUBAR directive.
FORMAT:
%AUTOVBAR [ON|OFF] |
EXAMPLE:
10 item1$='%MENUBAR,%AUTOVBAR on,OPEN,SELECT={INCLUDE,EXCLUDE},SORT,PRINT' LINE INPUT MENU item1$ : ans$ END RNH +---------------------------------------------------------------------------+ | OPEN | SELECT | SORT | PRINT | +-----------+---SELECT---+--------------------------------------------------+ | INCLUDE | | EXCLUDE | +------------+ |
Separates DESCRIPTIVE-items with "----". The separated line consists of the characters specified in a "text_str". If no text is given, the separated line defaults to a dashed line.
FORMAT:
%BAR ['text_str'] |
EXAMPLE:
10 menu$ = '"DATA ENTRY","REPORTS",%BAR"*",MAIL,EXIT' LINE INPUT MENU menu$ : ans$ 20 END RNH +---------------+ | DATA ENTRY | | REPORTS | | ********** | | MAIL | | EXIT | +---------------+ |
The %COLUMNS directive sets the number of columns for the menu.
FORMAT:
%COLUMNS number |
EXAMPLE:
10 menu$ = '%COLUMNS 3,"DATA ENTRY","REPORTS",MAIL,HELP,EXIT' LINE INPUT MENU menu$ : ans$ 20 END RNH +-------------------------------------+ | DATA ENTRY | HELP | EXIT | | REPORTS | MAIL | | +-------------------------------------+ |
The %HEADING directive displays a blank line and a "text_str" between menu items. If no "text_str" is given, the line defaults to a dashed line.
FORMAT:
%HEADING ['text_str'] |
EXAMPLE:
10 menu$ ='OPEN,SHOW,PRINT,%HEADING"GUIDE_OPTIONS",NOSYSTEM,"MENU ON|OFF"' LINE INPUT MENU menu$ : ans$ 20 END RNH +------------------+ | OPEN | | SHOW | | PRINT | | | | GUIDE_OPTIONS | | NOSYSTEM | | MENU ON|OFF | +------------------+ |
The %ITEMS directive creates a multi-column menu. "number" represents the number of items per column. %ITEMS creates as many columns as is necessary. Horizontal scroll the columns as needed.
FORMAT:
%ITEMS number |
EXAMPLE:
10 menu$='ENGINES={%ITEMS 3, DBMS, RMS, ADABASE, RDB, DBASE}' INPUT MENU menu$: ans$ 20 END RNH +----------+------------------------+ | ENGINES | DBMS | RDB | +----------| RMS | DBASE | | ADABASE | | +------------------------+ |
The %LOCKSTEP directive controls column scrolling when there are multiple columns in one menu. If it is turned OFF, the columns scroll independently. Otherwise, the columns scroll together.
FORMAT:
%LOCKSTEP [ON|OFF] |
EXAMPLE:
10 menu$ = '%LOCKSTEP off, %SIZE 4, 1,2,3,4,5,6,%SPLIT,7,8,9,10,11,12' LINE INPUT MENU menu$ : ans$ PRINT 'Please, PRESS the "NEXT" key' 20 END RNH Please, PRESS the 'NEXT' key +---------------+ | ... | 7 | | 4 | 8 | | 5 | 9 | | 6 | ... | +---------------+ |
The %MAXWIDTH directive controls the maximum width of the entire menu.
FORMAT:
%MAXWIDTH number |
EXAMPLE:
10 menu$ = '%MAXWIDTH 20,%ITEMS 2,a,b,c,d,f,g,h,i,j' INPUT MENU menu$ : ans$ 20 END RNH +--------------------+ |<< F | H >>| | G | I | +--------------------+ |
The %MENUBAR directive creates menu bars (menus with choices listed horizontally) with pull-down submenus.
FORMAT:
%MENUBAR |
EXAMPLE:
10 item1$='%MENUBAR,OPEN,SELECT={INCLUDE,EXCLUDE},SORT,PRINT' LINE INPUT MENU item1$ : ans$ 20 END RNH +---------------------------------------------------------------------------+ | OPEN SELECT SORT PRINT | +----------+---SELECT---+---------------------------------------------------+ | INCLUDE | | EXCLUDE | +------------+ |
The %MESSAGE directive displays a message when the menu or submenu is displayed.
FORMAT:
%MESSAGE 'message' |
EXAMPLE:
10 CLEAR 20 menu$ = 'open,show,print, %MESSAGE "Select a menu option"' LINE INPUT MENU menu$: ans$ 30 END RNH +----------+ | OPEN | | SHOW | | PRINT | +----------+ Select a menu option |
The %MULTI directive allows multiple items to be selected from a menu or submenu.
The %REPLACE directive can be located in any submenu. The calling menu is not kept on the screen. Pressing '\' will return to the calling menu.
Determines the number of DESCRIPTIVE-items that are located in the menu_box.
There is no limit to the number of the items that can be used. If all of the items do not fit within the menu box, the items are vertically scrolled using the UP, DOWN, NEXT and PREV keys. "Str_var" contains the name of the selected item. If the %MULTI directive is used and the [Select] key is pressed, "Str_var" contains the names of the items. Each item is separated by a linefeed character.
The %SPLIT directive instructs INTOUCH to start a new column at that specified point in the menu.
FORMAT:
%SPLIT |
EXAMPLE:
10 item1$='title,chapter,page={1201,1202,1203,1204,%SPLIT,1305,1306,1307}' LINE INPUT MENU item1$ : ans$ 20 END RNH +------------+ | TITLE | | CHAPTER +-------PAGE---------+ | PAGE | 1201 | 1305 | +----------| 1202 | 1306 | | 1203 | 1307 | | 1204 | | +--------------------+ |
Assign a title to a menu or submenu.
The %VBAR directive is used to explicitly insert a vertical bar.
FORMAT:
%VBAR |
EXAMPLE:
10 item1$='%MENUBAR,OPEN,%VBAR,SELECT={INCLUDE,EXCLUDE},SORT,PRINT' LINE INPUT MENU item1$ : ans$ END RNH +---------------------------------------------------------------------------+ | OPEN | SELECT SORT PRINT | +-----------+---SELECT---+--------------------------------------------------+ | INCLUDE | | EXCLUDE | +------------+ |
The %WIDTH directive controls the minimum width of the current column.
FORMAT:
%WIDTH number |
EXAMPLE:
10 menu$ = '%WIDTH 20,%ITEMS 2,a,b,c,d,f,g,h,i,j' INPUT MENU menu$ : ans$ 20 END RNH +------------------------------------------------------------------------------+ |<< C | F | H >>| | D | G | I | +------------------------------------------------------------------------------+ |
The following is the user interface in a [LINE] INPUT MENU:
KEY INPUT [[#channel] [, PROMPT str_expr] [, TIMEOUT time_limit] [, ELAPSED num_var] :] var, [var,...] |
10 PRINT 'See how quick you are.' 20 KEY INPUT PROMPT 'Press a key, quick!', & ELAPSED x: press$ 30 PRINT PRINT 'You took'; x; 'seconds to Press '; press$; '.' 40 END RNH See how quick you are. Press a key, quick! You took 1.99 seconds to Press h. |
KEY INPUT inputs a keystroke from the user and stores the value of the key in the string variable specified.
Some applications require the use of special keys on the terminal or keystroke level validation. The KEY INPUT statement is used for these applications.
KEY INPUT does not echo the key pressed, nor does it generate a line feed.
All the options available with the preceding "INPUT" statement are also available with KEY INPUT. KEY INPUT returns the following:
_TERMINATOR returns control (Ctrl) characters in the format "CTRL/X". For example, if the user presses [Ctrl/G], _TERMINATOR returns "CTRL/G".
10 KEY INPUT 'Press a terminator' : z$ PRINT PRINT 'You pressed '; _TERMINATOR 20 END RNH Press a terminator? (User presses [CTRL/G]) You pressed CTRL/G |
Previous | Next | Contents | Index |