Sub Main
xsh.Screen.Synchronous = true
xsh.Screen.WaitForString("Select page:")
xsh.Screen.Send("0")
xsh.Screen.Send(VbCr)
xsh.Screen.WaitForString("Select server:")
xsh.Screen.Send("12")
xsh.Screen.Send(VbCr)
xsh.Screen.WaitForString("Select account:")
xsh.Screen.Send("1")
xsh.Screen.Send(VbCr)
xsh.Session.Sleep(1000)
'xsh.Screen.WaitForString("xxx@192.168.1.1's password:")
xsh.Screen.Send("xxxxxxxxxxx")
xsh.Screen.Send(VbCr)
xsh.Session.Sleep(1000)
End Sub
转载于:https://my.oschina.net/bobchow/blog/883827