Xshell Forum

not working xsh.Screen.WaitForString("login") xsh.Screen.Send("admin")

Last post: Thursday, August 18, 2016 9:17 AM by zootopia, 1 reply

 
Tuesday, August 16, 2016 9:29 AM - Boobathi

not working xsh.Screen.WaitForString("login") xsh.Screen.Send("admin")

 
not working below line as expected
someone help
xsh.Screen.WaitForString("login")
xsh.Screen.Send("admin")

Program Ver. : Xshell 5
Thursday, August 18, 2016 9:17 AM - zootopia

Re: not working xsh.Screen.WaitForString("login") xsh.Screen.Send("admin")

 
The waitforstring api seems to work well.

The next text is a script to login a server. This script works well from local shell status.

sub main
xsh.Screen.Synchronous = True
xsh.Screen.Send("telnet myserver"+vbcr)
xsh.Screen.WaitForString("login")
xsh.Screen.Send("test"+VbCr)
xsh.Screen.WaitForString("assword")
xsh.Session.Sleep 500
xsh.Screen.Send("test"+VbCr)
end sub

Good luck!