2 inputbox(), Nput – Teledyne LeCroy SAS_SATA Protocol Suite Verification Script Engine Reference Manual User Manual
Page 76

76
20.2 InputBox()
Displays a dialog-based input prompt in a dialog box, waits for the user to input text or click a
button, and returns a CSL list object (see the CSL Manual for details about list objects) or a
string containing the contents of the text box.
Format :
InputBox( prompt, title, default_text, return_type )
Parameters
prompt
Required. String expression displayed as the message in the dialog box.
title
Optional. String expression displayed in the title bar of the dialog box.
If you omit the title, the script name is placed in the title bar.
default_text
Optional. String expression displayed in the text box as the default
response if no other input is provided.
If you omit default_text, the text box is displayed empty.
return_type
Optional. Specifies the contents of the return object.
The return_type argument values are:
Constant
Value
Description
_IB_LIST
0
CSL list object will be returned (by default).
_IB_STRING
1
String input as it was typed in the text box
Return Values
Depending upon the return_type argument, this function returns either a CSL list object or the
text typed in the text box.
In case of return_type = _IB_LIST (by default), the text in the text box is considered as a set
of list items delimited by ',' (only hexadecimal, decimal, and string items are currently
supported).
Text example
Hello world !!!, 12, Something, 0xAA, 10, "1221"
Will produce a CSL list object of five items:
list = [ "Hello world !!!", 12, "Something", 0xAA, 10, "1221" ];
list [0] = "Hello world !!!"
list [1] = 12
list [2] = "Something"
list [3] = 0xAA
list [4] = 10
list [5] = "1212"
Note: Although the dialog box input text parser tries to determine a type of list item
automatically, a text enclosed in quote signs "" is always considered a string.