| 
       RoboSendCommand Method to send a script command to Robo-FTP  | 
    Top Previous Next | 
| 
 
 Overview Method to send a script command to Robo-FTP. 
 C++ Definition long RoboSendCommand( CString strCommand, long nTimeout ) 
 VB Definition RoboSendCommand( Command As String, Timeout As Long ) As Long 
 C# Definition Int RoboSendCommand( CString strCommand, Int nTimeout ) 
 VB.NET Definition RoboSendCommand( Command As String, Timeout As Integer ) As Integer 
 Return Value The numeric result code returned by Robo-FTP after the execution of a script command. 
 Returns >= ROBO_ERROR_FROM_ROBOFTP if the command was executed successfully by Robo-FTP. This value corresponds to one of Robo-FTP's script command result codes. Returns ROBO_ERROR_CMD_IN_PROGRESS if the command is non-blocking and the command has been successfully initiated. Returns ROBO_ERROR_TIMED_OUT if the command timed out. 
 See COM/OLE Return Codes below for a complete list of possible return values. 
 Parameters strCommand / Command A string defining the Robo-FTP script command to perform. 
 To have Robo-FTP simulate line numbers in the log file, precede the command with #{number} and a space character. For example, #100 FTPLOGON would result in a simulated line number of 100 being associated with this command. 
 nTimeout / Timeout A long specifying the period of time (10th of seconds) to wait for a blocking RoboSendCommand() to complete. The parameter is ignored when the RoboSendCommand() is non-blocking. 
 Remarks The RoboStartSession() method must be called prior to calling RoboSendCommand(). This method blocks or returns immediately depending on the selection made in the RoboStartSession() method. If non-blocking is selected, the RoboCommandResult() event is fired upon completion. 
 If you send a conditional command (e.g., IFFILE or IFERROR) the conditional element of the command is evaluated and a TRUE/FALSE result is passed back but no actual branching action is taken. 
 For example, if the following script command is sent to Robo-FTP and the file exists Robo-FTP returns $ERROR_OLE_COMPARISON_TRUE; if file does not exist, the return value is $ERROR_OLE_COMPARISON_FALSE. The goto portion of the command is ignored since Robo-FTP really does not have a script file to branch within. 
 IFFILE "c:\Program Files\Robo-FTP\thisfile" goto found it 
 If script labels are sent, they are ignored. 
 See also: COM Programming Reference  |