#1
|
|||
|
|||
Sending Function keys...again. F2 and SCOANSI
I'm having trouble finding the correct way of sending the F2 key to an emulated SCO/ANSI terminal using SecureCRT and a VBscript.
Any help? Here is my script. Everything works except the last part in sending the F2 key. # $language = "VBScript" # $interface = "1.0" ' Connect to a telnet server and automate the initial login sequence. ' Note that synchronous mode is enabled to prevent server output from ' potentially being missed. Sub Main crt.Screen.Synchronous = True crt.Screen.WaitForString "login:" crt.Screen.Send "login" & vbCr crt.Screen.WaitForString "Password:" crt.Screen.Send "password" & vbCr crt.Screen.Send vbCr crt.Screen.Send "a1" & vbCr crt.Screen.Send vbCr crt.Screen.Send "b1" & vbCr crt.Screen.Send "3" crt.Screen.Send "2" crt.Screen.Send "3" crt.Screen.Send "L" CRT.Screen.SendSpecial "VT_CURSOR_DOWN" CRT.Screen.SendSpecial "VT_CURSOR_DOWN" crt.screen.send "MFG" & vbCr crt.screen.send "SSS" --> crt.screen.sendSpecial "VT_F7" <-- crt.Screen.Synchronous = False End Sub |
#2
|
||||
|
||||
Hi Dogchainx,
There is a new method to send function keys in SecureCRT 6.1.x that will allow you to simply specify the key itself. For example: CRT.Screen.SendKeys ("{F2}") This will send the F2 key as specified in the session being used. As long as the F2 key works correctly in the session, it will be sent correctly in the script. Older versions do require a different method based on what the F2 key is configured to send to the remote system. Which version of SecureCRT is installed?
__________________
Thanks, Teresa Teresa Nygren |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|