ASK        Ask a yes/no question in a pop-up dialog box

Top  Previous  Next

Syntax:

ASK

[ message ]  [ title ]

Arguments:

[ message ]

Variable or string defining a text message to display within a pop-up dialog box (up to 1000 characters).

 

[ title ]

Variable or string defining the window title displayed in the dialog box.

Options:

/large

Select this option to display the dialog box in a larger 12 point font rather than the default 8 point.

 

/local

By default, FileLink displays a message box in the center of the screen. Use this option if you wish the box to be centered relative to the FileLink window instead.

 

/nocrlf

Ignore embedded \n and/or \r carriage control.

 

 

This command not allowed when running as an NT Service or in a locked minimized window.

 

This script command displays a dialog box with Yes and No buttons. The window title and text within the dialog are specified in the command. Control returns to next script command when you close the dialog by clicking on one of the buttons. This command is useful to ask yes or no questions of an operator during the course of a file transfer session.

 

If FileLink is running a script in a unlocked minimized window then FileLink’s window will be restored when this command is performed.

 

Consider the following example of a script file that prompts if a file should be sent to the remote system.

 

ASK "Send file now?" "Question"

IFNO goto do_not_send

SENDFILE file_name

:do notsend

 

The dialog looks like the following.

 

ask dialog box

 

Two embedded formatting or carriage control character sequences are recognized. A \n sequence is interpreted as a carriage return and a \r sequence is interpreted as a line feed. Use of this carriage control sequences permit you to display multiple lines inside a dialog box. For example:

 

       ASK " Line 1 \n\r Line 2 \n\r Question?"

 

Use of the option /nocrlf suppresses the recognition of the \n and \r sequences. This is useful if you are displaying file names in the message box that may include either of these two sequences. For example:

 

       ASK "Send c:\newfile\reports.dat now?" /nocrlf

 

The [ message ] can be quite large -- up to 1000 characters. When using extremely long messages, we suggest that you precede the command with an @ modifier to suppress the echoing of the command to the console window and log file to preserve readability. Use care also not to overflow the possible space in the Windows dialog box that this script command will display by including too many embedded carriage control sequences.

 

The /large and /local options may not be used together.

 

Related Commands: MESSAGEBOX, PROMPT, IFYES, IFNO

See also: Running FileLink With Prompting