Which session will be send [1]
Which session will be send by xsh.screen.send
Tuesday, January 7, 2014 10:04 PM - wyw
I want to open multiple sessions in one script,and send "cd" command to each session.
The code:
sub main
myopen "root","1234567","10.10.1.238","/workspace"
myopen "root","1234567","10.10.1.238","/workspace"
myopen "root","1234567","10.10.1.238","/workspace"
end sub
sub myopen(name,passwd,host,path)
xsh.screen.Synchronous = true
xsh.session.open "SSH://" & name & ":" & passwd & "@" & host
xsh.session.sleep 1000
xsh.screen.send "cd " & path & vbcr
xsh.screen.Synchronous = false
end sub
When I run this script, the "cd" command all send to the first session.
Could you tell me what wrong in my code.
thank you!
Program Ver. : Xshell 4
The code:
sub main
myopen "root","1234567","10.10.1.238","/workspace"
myopen "root","1234567","10.10.1.238","/workspace"
myopen "root","1234567","10.10.1.238","/workspace"
end sub
sub myopen(name,passwd,host,path)
xsh.screen.Synchronous = true
xsh.session.open "SSH://" & name & ":" & passwd & "@" & host
xsh.session.sleep 1000
xsh.screen.send "cd " & path & vbcr
xsh.screen.Synchronous = false
end sub
When I run this script, the "cd" command all send to the first session.
Could you tell me what wrong in my code.
thank you!
Program Ver. : Xshell 4
Re: Which session will be send by xsh.screen.send
Friday, January 10, 2014 1:22 AM - Support
Opening multiple sessions in a single script is not supported in the current version. We will try to add this feature in the future.
---
Technical Support
---
Technical Support
Previous views: 138