Shift+ESC Not working

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Jlomers
Newbie
Posts: 7
Joined: Tue Feb 06, 2018 4:11 pm

Shift+ESC Not working

Post by Jlomers » Wed Feb 14, 2018 7:18 pm

I have a .exe that I created that does not stop when I press Shift+Esc. because of all the button presses that are in the script CTL+ALT+Delete does not really work either because it just spams out the window.

The system tray icon says press Shift+Esc to stop. I have not checked the /NOSTOPKEY option in the .exe creation.

Shift+Esc ends the other .exe files that I have created but this particular one will not.

Is there a way to create a kill switch other than S+E?

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Shift+ESC Not working

Post by JRL » Thu Feb 15, 2018 4:43 pm

because of all the button presses that are in the script CTL+ALT+Delete does not really work either because it just spams out the window.
"Spams out the window", never heard that one before, but very descriptive. If you can't get ctrl + alt + del to work because the script interferes with the button presses that is likely why shift + esc is not working as well.
Is there a way to create a kill switch other than S+E?
By using OnEvent> with Key_down you can set any modifier key plus key combination you desire. In your case however I'd recommend using a single key press to stop the script. The following will use the esc key.

The MDL>Done line is only there as confirmation that the Esc key keypress worked.

Code: Select all

OnEvent>Key_down,VK27,0,Quit

SRT>Quit
  MDL>Done
  Exit>0
END>Quit

Joelyboy0991
Junior Coder
Posts: 24
Joined: Thu Oct 11, 2018 1:19 pm

Re: Shift+ESC Not working Not MacroString

Post by Joelyboy0991 » Wed Oct 24, 2018 8:50 am

Hey,

OnEvent>Key_down,VK27,0,Quit
SRT>Quit
Exit>0
END>Quit

this Code isn't working for me either

i have a .exe

did not check the No Shift-esc (still doesnt work)

is there a certain place i need to put the code (atm i have it at the start)

Cheers

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Shift+ESC Not working

Post by Marcus Tettmar » Wed Oct 24, 2018 8:18 pm

Shift+ESC may not be working because you already have a copy of Macro Scheduler running that is already using it. If you run a .exe while running Macro Scheduler which is already using the default SHIFT+ESC sequence then THAT will get the hotkey not your .exe. Either quit Macro Scheduler first or change the stop key sequence under Settings. It is also possible some other app is using it.

Now this ...
OnEvent>Key_down,VK27,0,Quit
SRT>Quit
Exit>0
END>Quit
If that is all your script is then it is going to start and finish in a fraction of a second. You won't have time to press escape before it finishes running. It probably won't even get into the subroutine. Try it in debug mode, or add a never ending loop:

Code: Select all

OnEvent>Key_down,VK27,0,Quit

Label>start
Wait>0.02
Goto>start

SRT>Quit
Exit>0
END>Quit
If it fails to detect the escape key it may be because something else has already registered it. I would advise trying a modifier key combination like ALT-ESC instead.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts