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

Top  Previous  Next

Syntax:

PROMPT

[ variable ]  [ message ]  [ title ]

Arguments:

[ variable ]

A variable to store characters typed in the prompt dialog; if the variable does not previously exist, it is created.

 

[ message ]

Variable or string defining a text message to display within a pop-up dialog box; this message is limited to up to three lines of text approximately 50 characters each.

 

[ title ]

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

Options:

/history=xx

When the /history=on option is used the last ten responses you type are saved for instant recall. (This history is shared with console command mode.) This option is not permitted with the /password option.  When the /history=off option is used, no history will be saved

 

/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.

 

/password

Select this option if you are prompting for a password and you do not want what is typed to be readable. This option is not permitted along with the /history option.

 

 

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 or Cancel buttons. This command is useful to prompt for file names or other information that is not static during the course of a file transfer session.

 

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

 

The script file can detect if the Cancel button has been clicked by using IFERROR to test for result code 1013 or the $ERROR variable $ERROR_PROMPT_CANCELLED.

 

Consider the following example of a script file that prompts you for the name of next file to send to an FTP site.

 

PROMPT file_name "Enter File name:" "Prompt Window"

IFERROR= $ERROR_PROMPT_CANCELLED GOTO done

SENDFILE file_name

:done

 

The prompt dialog looks like the following:

 

prompt dialog

 

Up to three lines of text may be displayed as a prompt. Use \n and/or \r carriage control characters to format the text display. Any \n characters after the two are discarded.

 

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:

 

PROMPT new_name "Enter new name for file c:\newfile\reports.dat" "Rename File" /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 = "Enter new name for file c:\newfile\reports.dat" + %crlf + "Make it good!"

PROMPT new_name long_msg "Rename File" /nocrlf

IFERROR= $ERROR_PROMPT_CANCELLED GOTO next_step

RENAME "c:\newfile\reports.dat" new_name

:next_step

 

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

 

Related Commands: MESSAGEBOX, ASK, BROWSE, PLAYSOUND, CONSOLE, CONSOLEMSG

See also: Running Robo-FTP With Prompting