SeeView Manual

SeeView Statements and Script Symbols
HP NonStop SeeView Manual526355-004
9-5
ACCEPT
FKEYWAIT
specifies that the SeeView program wait for a function key to be pressed before
performing the ACCEPT operation. During this wait interval, other SeeView
function key operations are not available.
Use the #FKEY intrinsics to determine the function key to be pressed. #FKEY
returns values 1 through 16 for function keys F1 through F16 and values 17
through 32 for shifted function keys SF1 through SF16. If they are pressed, the
#FKEY intrinsics #FKEYCOL, #FKEYDELETELINE, #FKEYINSERTLINE,
#FKEYLINE, #FKEYNEXTPAGE, #FKEYPREVPAGE, #FKEYRETURN,
#FKEYROLLDOWN, #FKEYROLLUP, #FKEYSNEXTPAGE, #FKEYSPREVPAGE,
#FKEYSRETURN, #FKEYSROLLDOWN, and #FKEYSROLLUP return values for
nonnumeric function keys. (For details, see String Intrinsics on page 9-151.)
The FKEYWAIT option is referred to as a modal operation. The FKEYWAIT option
results in a wait state or mode. The FKEYWAIT option is not recommended if you
want to preserve the modeless, nonhierarchical interface that the standard
SeeShell provides.
The FKEYWAIT option is useful for implementing modal dialog mechanisms such
as dialog boxes and function-key-driven operations.
To maintain script context, use the WINDOW MENU option to associate the
desired screen-handling procedure with the input menu. You need not use the
modal FKEYWAIT option to maintain script context.
This example shows the FKEYWAIT option:
INTO taskid [ FIELDPERLINE ]
appends the data received from the terminal to the end of the cache associated
with taskid.
You can use the INTO option to implement features that benefit from iteration, such
as accepting a list of objects marked with an x and then iteratively reading through
the cache to see which items are marked.
The INTO option without the FIELDPERLINE option provides a means of creating
an approximate image of the screen area being accepted. For example, if the first
data received is from line 3 and column 10 of the ACCEPT area, the first line in the
cache is from (3,10), and columns 1 through 9 are blank-filled.
?PROC PersonMaint{Accept input, wait for fkey.
{----------------------------}{Do table maint, based on fkey.
LINE #menuline, #menucol;{Define menu area for accept.
MSG "Press F1-Select, F2-Delete, F3-Insert";FLUSH
ACCEPT #name, #address, #phone FKEYWAIT;{Accept wait on fkey.
TASK sqlci;BELOW
IF #FKEY = 1 then WINDOW sqlci, "SELECT * FROM PERSON ...";
IF #FKEY = 2 then WINDOW sqlci, "DELETE * FROM PERSON ...";
IF #FKEY = 3 then WINDOW sqlci, "INSERT * FROM PERSON ...";