SeeView Manual

SeeView Statements and Script Symbols
HP NonStop SeeView Manual526355-004
9-161
String Intrinsics
This intrinsic is often used to pass information contained in the selected line of
window text to a procedure associated with the window. For example:
#MENUTOKEN
returns a string containing the token pointed to by the cursor in the window that
invoked this script. You invoke a script with Return, Shift-Return, or any of the
function keys in the WINDOW statement KEYS fkey-list.
Use this intrinsic in windows that have unprotected text to allow a user to point at
specific tokens in the window text.
You can point the cursor to any character in the token, and this intrinsic returns the
entire token (a token in this case being characters bound on either side by blanks).
For an example, see #MENUCACHELINEPTR on page 9-156.
#MENUTOKENINDEX
returns a numeric value representing the character index of the first character of
the #MENUTOKEN in the #MENUTEXT of the window that invoked this script. You
invoke a script with Return, Shift-Return, or any of the function keys in the
WINDOW statement KEYS fkey-list.
Use this intrinsic in windows that have unprotected text. It allows users to point at
specific tokens in the window text. You can point the cursor to any character in the
token, and the intrinsic returns the first character position of the #MENUTOKEN.
For an example, see #MENUCACHELINEPTR on page 9-156.
#MENUWIDTH
returns a numeric value representing the width in characters of the window that
invoked this script. You invoke a script with Return, Shift-Return, or any of the
function keys in the WINDOW statement KEYS fkey-list.
You can use this intrinsic to repaint the last referenced window with the same size.
For example:
?MENU MyMenu
Disc
Tape
Printer
?SECT ShowMenu
LINE 4;
WINDOW MyMenu MENU "CALL ListDev ( #MENUTEXT )" SIZE 12,5;
?PROC ListDev ( #DevType )
PARM #Devtype;
TASK pup;
BESIDE;
WINDOW pup, "LISTDEV " & #DevType;
WINDOW #MENUTASKID MENU SIZE #MENUWIDTH, #MENUHEIGHT;