Xshell Forum

Student

Last post: Wednesday, December 23, 2015 1:13 AM by zoo, 3 reply

 
Monday, December 7, 2015 6:51 PM - Julian Hnandez

Student

 
Hi, How can i simulate an arrows(left,right,down,up) keypress ?
_____________________________________________________
http://www.vt100.net/docs/vt100-ug/table3-6.html
My Code
_____________________________________________________
Sub Main

' turn on synchronous mode
xsh.Screen.Synchronous = True


' find FTP route
xsh.Screen.WaitForString chr(62)
xsh.Screen.Send Chr(111)
xsh.Screen.WaitForString chr(62)
xsh.Screen.Send Chr(116)
scr.screen.Send Chr(27) & "OA"

' turn off synchronous mode
xsh.Screen.Synchronous = False
End Sub


-------------------------------------------
Vandyke code example
______________________-
# $language = "VBScript"
# $interface = "1.0"

' This script simulates an F3 keypress (VT100 keyboard)

Sub Main

' Simulate F3 by sending ESC-OR
'
scr.screen.Send Chr(27) & "OR"

End Sub
--------------------------------------------------------------

Program Ver. : Xshell 4
Tuesday, December 8, 2015 6:24 AM - Support

Re: Student

 
You can simulate them as follows:

Up => xsh.screen.Send Chr(27) & "OA"
Down => xsh.screen.Send Chr(27) & "OB"
Right => xsh.screen.Send Chr(27) & "OC"
Left => xsh.screen.Send Chr(27) & "OD"

Technical Support

Like us on Facebook
Follow us on Twitter
Visit our blog Blog
Monday, December 21, 2015 4:22 AM - Julian Hnandez

Re: Student

 
Hi again,I need to know other different form to simulate "arrow Keypress" cause xsh.screen.Send Chr(27) & "OA"
xsh.screen.Send Chr(27) & "OB"
xsh.screen.Send Chr(27) & "OC"
xsh.screen.Send Chr(27) & "OD"
is interpreted by the divice only like "ESC" Keypress and return to main screen
Help me :(
Wednesday, December 23, 2015 1:13 AM - zoo

Re: Student

 
According to the TERM type you are using, the arrow character can be different.
There is need to find out what character is each arrow key.

By using the cat command, we can do this.
After the cat command, type arrow keys one by one.

In my case, it shows like this:
-bash-4.1$ cat
^[[A^[[B^[[C^[[D

You know ^[ char is ESC.