TelnetWaitFor


 

TelnetWaitFor>session_id,text,timeout,response

 

Not supported in Macro Scheduler Lite.

 

Waits for text in a Telnet session.  Specify a session ID returned by a call to TelnetConnect.

 

Enter a timeout in seconds.  If the command times out response will be set to TIMEOUT otherwise response will return session output since the last TelnetSend.

 

The TELNET_SESSIONLOG variable can be used at any time to see all session activity.

 

Abbreviation: TNW

See also: TelnetClose, TelnetConnect, TelnetSend

 

Example

 

TelnetConnect>my.domain.com,23,hTN
 TelnetWaitFor>hTN,Press any key to continue,5,r
 TelnetSend>hTN,a
 TelnetWaitFor>hTN,login,5,r
 TelnetSend>hTN,administrator%CR%
 TelnetWaitFor>hTN,password,5,r
 TelnetSend>hTN,monsoon%CR%
 TelnetWaitFor>hTN,>,5,r
 TelnetSend>hTN,dir%CR%
 TelnetWaitFor>hTN,>,5,dirlist
 MessageModal>dirlist

MessageModal>TELNET_SESSIONLOG
 TelnetClose>hTN