Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 02:26:24 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Esc key event
Pages: 1   Go Down
Print
Author Topic: Esc key event  (Read 818 times)
0 Members and 1 Guest are viewing this topic.
swarfboy
Active Member

Offline Offline

Posts: 69


View Profile
« 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.

Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 1,707


Briceville, TN, USA


View Profile WWW
« 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
Logged

Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
swarfboy
Active Member

Offline Offline

Posts: 69


View Profile
« 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 » Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!