2 inputbox(), Nput – Teledyne LeCroy SierraFC Verification Script Engine Reference Manual User Manual

Page 56

Advertising
background image

Verification Script Engine Reference Manual

51

24.2 InputBox()

Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns

a CSL list object ( see CSL manual for details about list objects ) or 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

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, the text box is

displayed empty.

return_type – Optional. It 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 on the return_type argument this function returns either CSL list object or the text

typed in the text box as it is.

In case of return_type = _IB_LIST ( by default ) the text in the text box is considered as a set of list
items divided by ',' ( only hexadecimal, decimal and string items are currently supported ).
i.e. text :

Hello world !!!, 12, Something, 0xAA, 10, "1221"

Will produce a CSL list object ( 5 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 as a string.

Advertising