GetNumber


The GetNumber function opens a dialog to request a number. If you click [OK], the entered number is returned.

 

Syntax

number, bOK = GetNumber()

number, bOK = GetNumber( number )

number, bOK = GetNumber( number, sPrompt )

number, bOK = GetNumber( number, sPrompt, sTitle )

bullet.gif    number is the initial value of the number. If nil, 0 is used.

bullet.gif    sPrompt is the message above the number field. If nil, a default is used.

bullet.gif    sTitle is the window title. If nil, a default is used.

bullet.gif    If [OK] is clicked, the function returns the number and bOk=true.

bullet.gif    If the dialog is canceled, 0,false is returned.

Remarks

All arguments are optional and assume default values beyond the last argument you specify. To use a default argument but follow it with a specified argument, use a nil in its place..

Example

The window shown above was created using the following code. Note that the last argument, the window title, was omitted and left to the default:

     number, bOK = GetNumber( 125.44, "Enter a number :" )

Related Topics

GetString

 


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.