SeeView Manual
Sample Script
HP NonStop SeeView Manual—526355-004
C-6
{-------------------------------------------------------}
{ Have #opfile to do #rule against and #prompt response }
{ folded into #rule if required. Now do operation, and }
{ highlight each file as operation is performed on it. }
{-------------------------------------------------------}
LINE #menuline+row+1,#menucol+2;v(r); { Highlight file,
CALL FileOp(#opFile,#rule,waitForOp); { do operation,
LINE #MENULINE+row+1,#MENUCOL+1; { remove mark, and
" "; v[#fvmenubody]; { un-highlight file.
IF #op="P" THEN BEGIN { if purge operation
ERASELINE; { erase file on screen
WRITE files CACHE { and in cache
menuline1+row UPDATE,"";
END;
FLUSH;
#lastop:=#op; { remember last op
END;
END;
row:=row+1; { increment row to check.
END UNTIL eof;
IF #lastop="" THEN BEGIN { if no operation marks
CALL FileOp(#File,"INFO ^,DETAIL"); { do INFO <file>,DETAIL
END;
?PROC ask{#prompt,row,col}
{------------------------}
{ This proc implements a modal WAITED dialogue box.
{ The proc forces a response to #prompt and returns
{ the result in the global string variable #parm.
{
{ Notice that a WAITED accept is performed and that the accept
{ "insists" that the FKEY be pressed while the cursor is positioned
{ within ASK prompt.
{
{ Note that the user can escape this "mode" by pressing F16.
{-----------------------------------------------------------}
PARM #prompt { msg to display with prompt
, row := 1 { row of prompt
, col := #menucol + #menuwidth { column of prompt
, accepted { flag if accept ok
;
LINE row,col; { Display prompt
WINDOW MyMenu MENU
GLASS CACHE /[ / FOR 1 SIZE 80
HEAD #prompt & " (F16 to escape)";
MSG (r) #prompt;
DO BEGIN { accept fkey & parm
FLUSH;
ACCEPT #parm FKEY;
IF (#FKEYLINE=row+1) and (#FKEYCOL>=col) { Cursor in prompt area
THEN BEGIN { when Fkey pressed.
accepted := 1;
END ELSE
BEGIN { Cursor not in prompt
MSG(r) "You must respond to " & #prompt; { when Fkey pressed.
BELL;
accepted := 0;
END;
END UNTIL accepted or #FKEY=16;