Hello Guest it is March 28, 2024, 04:44:12 PM

Author Topic: Esc key event  (Read 2944 times)

0 Members and 1 Guest are viewing this topic.

Esc key event
« on: January 14, 2009, 05:24:15 PM »
I have a homing and probing script that I wrote that is called from an external .m1s from a button in my screen set. The script runs fine but if the user hits the esc key during runtime the script doesn't exit. It stops current function and moves to the next function so you have to hit the esc key 3 times before it exits the script. How can I exit the script completely on the esc key event.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Esc key event
« Reply #1 on: January 15, 2009, 08:47:17 AM »
Put a "GetKey" function in your code, and so it will Exit on that key press
fun times
Re: Esc key event
« Reply #2 on: January 15, 2009, 09:38:35 AM »
There is no such function.   http://www.cypressinc.com/enduser.pdf

There should be a key press event built into mach because you can assign hotkeys.
I need to know how to assign these keys via a script so I can assign Esc = Exit Sub

I believe what Esc is currently canceling the While/Wend loop and jumping to the next While/Wend in my script.

« Last Edit: January 15, 2009, 10:03:12 AM by swarfboy »