AskLine

Prompts the user for one line of input.

Syntax:

AskLine ( title, prompt, default [,format] )

Parameters:

(s) title: title of the dialog box.

(s) prompt: question to be put to the user.

(s) default: default answer.

(i) format: [optional] specifies the format of the returned string.

Returns:

(s) user response.

 

'Format' specifies the format of the returned string.

Format

Meaning

0

ANSI string (default)

1

Unicode string

2

hex string, with four hex bytes per Unicode character.

 

Use this function to query the user for a line of data. The entire user response will be returned if the user presses the OK button or the Enter key. If the user presses the Cancel button or the Esc key, the processing of the WIL program is canceled.

Example:

name = AskLine("Game", "Please enter your name", "", 0)
game = AskLine("Game", "Favorite game?", "Solitaire", 0)
Message(StrCat(name,"'s favorite game is "), game)

produces:

wila-k5_shg.gif

wila-k6_shg.gif

And Then, If Richard types "Scramble" and clicks ON the OK button:

wila-k7_shg.gif

 

See Also:

AskPassword, AskYesNo, Dialog, Display, AskItemList, Message, Pause, AskFileText, IntControl 28