SeeView Manual
SeeView Statements and Script Symbols
HP NonStop SeeView Manual—526355-004
9-158
String Intrinsics
You can use this intrinsic to obtain user input in response to a prompt production
input field. For example:
Beginning with the C30 SeeView product version, #MENUINPUT returns the text
on the sill of a window up to the cursor position if that window has KEYS SILL
fkey-list specified.
You can use this example to obtain TACL help via the F16 keys.
#MENULINE
returns the screen line number of the top edge of the window that invoked this
script. You invoke a script with Return, Shift-Return, or any of the function keys in
?MENU MyMenu
Enter Filename:[ ] <==? CALL FileInfo ( #MENUINPUT )
?PROC FileInfo( #filename )
PARM #filename; { #filename = #MENUINPUT
TASK fup; { declare fup task
WINDOW fup, "INFO " & #filename; { do a FUP INFO on #filename
?SECT Main
LINE 4;
WINDOW MyMenu MENU CACHE FIRST size 30,3;
?SECT TaclWindow
{---------------}
{ Display a tacl window that passes F16
{ through to TACL. So that user can get TACL
{ help by typing on the SILL and pressing F16.
{--------------------------------------------}
PAGE #LASTPAGE;
TASK TACL;
WINDOW TACL CACHE LL KEYS SILL F16
PRODUCTION "CALL PassFkeyCmd(Tacl)";
?PROC PassFkeyCmd(tid);
{---------------------}
{ Pass fkey pressed to taskid=tid along with cmd on the sill
{ Note that the task expects the terminal fkey data stream,
{ so we must build the <SOH> <fkey> <row> <col> data stream.
{-----------------------------------------------------------}
PARM tid;
VAR #s
, #fkeyTransform:= "@ABCDEFGHIJKLMNO" & { f1..f16
"'abcdefghijklmno" & { sf1..sf16
"PQRSTUVW" & "pqrstuv" { others
, #fk:=#char(1) & { <soh>
#fkeyTransform[#fkey] & { <fkey> code
#char(32+0) & { <row>
#char(32+#fkeycol-#menucol-1) { <column>
;
WITH tid; { pickup old prompt
#s := #TASKPROMPT & #MENUINPUT; { #menuinput is sill input
WRITE tid, #MENUINPUT & #fk; { write cmd & fkey to tid
WRITE tid CACHE -1 UPDATE,#s; { suppress #fk in cache
LINE #MENULINE,#MENUCOL; { update window
WINDOW tid CACHE LASTLINE
SIZE #MENUWIDTH,#MENUHEIGHT
PRODUCTION #MENUPRODUCTION
KEYS SAME NOFRAME;