/
script api problem [1]
script api problem [1]
script api problem
Saturday, May 12, 2018 1:14 PM - xqin
Hello,
I get some trouble in script. the core code like below:
'''''''''''''''''''''
Sub Main
For i = 0 To 3
xsh.Session.Open "ssh://uname:pwd@192.168.1.17:12345"
xsh.Screen.Synchronous = True
xsh.Screen.WaitForString "node]: "
xsh.Screen.Send i & vbCrLf
xsh.Session.Sleep 50
xsh.Screen.WaitForString "$ "
xsh.Screen.Send "enter" & vbCrLf
xsh.Session.Sleep 50
Next
End Sub
''''''''''''''''''''''''''''''''''''''''''''
I want to connect to a destination with different param( the var i ). seems that only the first seeion works well. How can I specify a session to focus on and send text to it? especially, it even cause a crash in xshell6. In xshell6, if there are more the one xshell app in system, call the api Session.open twice in a script, the second new tab may create in another xshell app.
BRs,
xqin
Program Ver. : Xshell 6
I get some trouble in script. the core code like below:
'''''''''''''''''''''
Sub Main
For i = 0 To 3
xsh.Session.Open "ssh://uname:pwd@192.168.1.17:12345"
xsh.Screen.Synchronous = True
xsh.Screen.WaitForString "node]: "
xsh.Screen.Send i & vbCrLf
xsh.Session.Sleep 50
xsh.Screen.WaitForString "$ "
xsh.Screen.Send "enter" & vbCrLf
xsh.Session.Sleep 50
Next
End Sub
''''''''''''''''''''''''''''''''''''''''''''
I want to connect to a destination with different param( the var i ). seems that only the first seeion works well. How can I specify a session to focus on and send text to it? especially, it even cause a crash in xshell6. In xshell6, if there are more the one xshell app in system, call the api Session.open twice in a script, the second new tab may create in another xshell app.
BRs,
xqin
Program Ver. : Xshell 6
Re: script api problem
Tuesday, May 15, 2018 1:07 AM - Support
Previous views: 267
, multiple selections available,
Related content
xsh.Session
xsh.Session
More like this
윈도우 11 24H2 버전에서 waitforstrings 함수가 작동하지 않는 문제
윈도우 11 24H2 버전에서 waitforstrings 함수가 작동하지 않는 문제
More like this
Xstart Command Tag Definition
Xstart Command Tag Definition
More like this
Xshell Command Line Options
Xshell Command Line Options
More like this
Xshell Command Line Options
Xshell Command Line Options
More like this
Script Example
Script Example
More like this