Xshell Forum

WaitForString only works in SSH

Last post: Monday, May 16, 2016 9:53 PM by Support, 1 reply

Wednesday, May 11, 2016 1:29 AM - Josef

WaitForString only works in SSH

the waitforstrign command only seems to work during a SSH connection. when I try in either Serial or Telnet it doesn't work.

Sub Main
xsh.Screen.Send "1" & VbCR
xsh.Screen.WaitForString "command not found
xsh.Screen.Send "MADE IT!"
End Sub

Program Ver. : Xshell 5

The farthest it makes it is xsh.Screen.WaitForString "command not found" and continues to just wait indefinitely.
Monday, May 16, 2016 9:53 PM - Support

Re: WaitForString only works in SSH

This is not a common issue when using telnet. There may be other variables that are causing the script not to work.

[c:\]$ telnet mysvr

Host 'mysvr' resolved to
Connecting to
Connection established.
To escape to local shell, press Ctrl+Alt+].
CentOS release 5.3 (Final)
Kernel 2.6.18-128.1.10.el5 on an i686
login: test
Last login: Fri May 13 10:18:58 from
-bash-3.2$ 1
-bash: 1: command not found
-bash-3.2$ MADE IT!

Technical Support

Like us on Facebook
Follow us on Twitter
Visit our blog Blog