texan Posted April 27, 2011 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.
somdcomputerguy Posted April 27, 2011 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.
texan Posted April 27, 2011 Author Posted April 27, 2011 Perfect! That's what I was looking for. Thanks!
somdcomputerguy Posted April 27, 2011 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now