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.
crt.Screen.Synchronous = True
crt.Screen.Send "login" & vbCr
crt.Screen.Send "password" & vbCr
crt.Screen.Send "a1" & vbCr
crt.Screen.Send "b1" & vbCr
crt.screen.send "MFG" & vbCr
--> crt.screen.sendSpecial "VT_F7" <--
crt.Screen.Synchronous = False
There is a new method to send function keys in SecureCRT 6.1.x that will allow you to simply specify the key itself.
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?
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Display Modes||Rate This Thread|