Running Robo-FTP with Prompting

<< Click to Display Table of Contents >>

Navigation:  Robo-FTP User's Guide > Script Programming > Select Topics in Script Programming >

Running Robo-FTP with Prompting

 

Although Robo-FTP is designed for automating unattended file transfers, the scripting language contains several commands for interactive user input. The included prompt.s script file provides a simple example of using these commands together to create a rudimentary prompt-driven graphical user interface.

 

This script file is focused around the PROMPT script command and effectively demonstrates its use. The user is prompted for a script command which is saved in the variable var.  The PERFORM command is then used to execute the user-provided command.

 

:top

SET var = ""

PROMPT var "Enter Robo-FTP Script Command:" /history=on /local

IFERROR= $ERROR_PROMPT_CANCELLED GOTO done

PERFORM var

GOTO top

 

:done

ASK "Exit Robo-FTP?" /local

IFYES GOTO exit

STOP

 

:exit

EXIT

 

The prompt dialog box looks like this.

 

robo_prompt_dialog

 

Obviously this sample command script is only good for users that already know the Robo-FTP scripting language but PROMPT, ASK, and the related scripting commands listed below could be used to design a prompt-driven interface for less advanced users.

 

 

Related command(s): ASK, PROMPT, MESSAGEBOX, BROWSE, FTPCLIENT, PLAYSOUND, FTPCLIENT, CONSOLE, CONSOLEMSG, MAILTO, PRINT, PRESSANYKEY, WEBBROWSER

See also: Suppressing Console Output