Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-25-2020, 12:00 PM
ajbroome ajbroome is offline
Registered User
 
Join Date: Nov 2020
Posts: 1
Script Not Sending ESC Key To Host

Hi.

I'm using SecureCRT v8.7.1 to automate transactions into a host system. One of the screens requires that the script sends the ESC key.

I have successfully used the script on a Windows 7 machine running SecureCRT v8.1.4, however after installing v8.7 onto a Windows 10 machine, the ESC key sequence no longer works.

I have tried all 3 methods to send an ESC to the host, and neither works on the new machine:

crt.Screen.Send "^[" (this was the original method which worked just fine on the Win7 machine)
crt.Screen.SendKeys "{ESC}"
crt.Screen.SendSpecial "VK_ESCAPE"

For the context, here's the section of the script that is failing (marked in red). If I manually hit the ESC key, the system moves on just fine. I have double-checked and triple-checked the onscreen prompts (host screen hasn't changed, only the client machine). DefaultWait is just a constant value of 250:

Code:
OnScreen = crt.Screen.WaitForStrings("WEIGHT","SKU","Lottable03","auid:",1)
 If OnScreen = 1 Then
  crt.Screen.Send "<$EXE_TRACK$>" & chr(13)
  crt.Sleep DefaultWait
  crt.Screen.Send "<$EXE_DS$>" & chr(13)
  crt.Sleep DefaultWait
  crt.Screen.WaitForString "SERIAL#"
  crt.Screen.SendSpecial "VK_ESCAPE"
  crt.Sleep DefaultWait
  crt.Screen.WaitForString "ITEM"
  crt.Screen.SendSpecial "VK_ESCAPE"
  crt.Sleep DefaultWait*6
Any ideas, please?
Reply With Quote
  #2  
Old 11-25-2020, 01:57 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,579
Hi ajbroome,

Did you migrate your SecureCRT config from the Windows 7 machine to the Windows 10 machine? If not, I would recommend doing that with this tip from the website.

What does happen when you reach that line of the script? Is some other character sent? Does the script hang? (If so, if you choose Cancel from the Script menu, is that the line of the script it indicates it is hanging on?)
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply

Tags
esc , escape , scripting , scripts


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 03:36 AM.