MESSAGEBOX        Display a text message in a pop-up dialog box

Top  Previous  Next

Syntax:

MESSAGEBOX

[ message ]  [ title ] [  options ]

Arguments:

[ message ]

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

 

[ title ]

Optional 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, Robo-FTP displays a message box in the center of the screen. Use this option if you wish the box to be centered relative to the Robo-FTP window instead.

 

/nocrlf

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

 

 

This command not allowed when running as a Windows service or in a locked minimized window.

 

This script command displays a dialog box on your display. 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 the OK button. This command is useful to display important messages while a script is running.

 

If Robo-FTP is running a script in a unlocked minimized window then Robo-FTP window will be restored when this command is performed.

 

Consider the following example.

 

MESSAGEBOX  "This is a whiz-bang message box!"

 

robo_message_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:

 

MESSAGEBOX " Line 1 \n\r Line 2 \n\r Line 3 "

 

The /nocrlf option 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:

 

MESSAGEBOX "Sending c:\newfile\reports.dat" /nocrlf

 

The %crlf internal variable may be useful if you need to both format a multi-line message AND need to suppress the \n and \r sequences.

 

SET long_msg = "Sending c:\newfile\reports.dat" + %crlf + "This is fun!"

MESSAGEBOX long_msg "Upload Attempt" /nocrlf

SENDFILE "c:\newfile\reports.dat"

 

The [ message ] argument can be quite long -- 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 command(s): PROMPT, ASK, BROWSE, PLAYSOUND, CONSOLE, DISPLAY, CONSOLEMSG, LOGMSG, LOGNTEVENT, PRINT, WRITEFILE, PRESSANYKEY, MAILTO

See also: Running Robo-FTP With Prompting, Interactive Debugging