texan 0 Posted April 27, 2011 I am looking for a way to create a hotkey to pause a script while it is processing. Is this possible? I created a script that will be adding some data records in a system. A User will monitor this process and if anything goes wrong I want them to be able to suddenly pause the execution of the script. Ideally, I was going to tell them to press the Pause key on the keyboard and I want the script to pause when this occurs. I have a GUIWindow for my script, I am using GuiOnEventMode 1 and I know how to pause the scrip using a button on the GUI. I was just hoping to do this with the simple press of the Pause button. My concern is that the script might be using mouse commands and the user would have to fight the script to be able to press the button. Share this post Link to post Share on other sites
somdcomputerguy 103 Posted April 27, 2011 (edited) Although not using a button, this function HotKeySet will help. See the Example code there. Also read here, GUIRegisterMsg, and here, GUIRegisterMsg - AutoIt Wiki.<br> Edited April 27, 2011 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Share this post Link to post Share on other sites
texan 0 Posted April 27, 2011 Perfect! That's what I was looking for. Thanks! Share this post Link to post Share on other sites
somdcomputerguy 103 Posted April 27, 2011 You bet. Good luck! - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Share this post Link to post Share on other sites