Xshell Forum

Which session will be send by xsh.screen.send

Last post: Friday, January 10, 2014 1:22 AM by Support, 1 reply

 
Tuesday, January 7, 2014 10:04 PM - wyw

Which session will be send by xsh.screen.send

 
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
Attachment send.png (52.2 KB)  
Friday, January 10, 2014 1:22 AM - Support

Re: Which session will be send by xsh.screen.send

 
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