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


Re: script api problem

Tuesday, May 15, 2018 1:07 AM - Support

Currently this is not available. Scripts are dependent on the session. So it's unavailable to call another session from a session with scripts.

However, we're working on this issue. Appreciate your patience. Thank you!

Technical Support

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


Previous views: 267