kra55 Posted May 9, 2010 Share Posted May 9, 2010 Hey everyone, A problem i have had for a while is that people get impatient during certain sleeps in my scripts. They will get impatient and click one of the buttons which will que that event to start as soon as the current event has finished. I would like to know if it is possible to make my macro ignore all keypress's while an event is occuring. Except maybe esc. It would be good if Esc was pressed it would ask if you wish to end the script or allow it to continue. I apologise if this has already been answered. If so i was using the wrong search terms Thanking you in advance...Thank you. Link to comment Share on other sites More sharing options...
hawky358 Posted May 9, 2010 Share Posted May 9, 2010 Are you using hotkeys & buttons to execute certain events? What I do when a function is going to take a while is either disable or hide the buttons until the function is complete. (With a repeating progress bar or a please wait or something) Typically I use a general disable() and enable() function which will disable all buttons & hotkeys when the function begins and ends. Link to comment Share on other sites More sharing options...
kra55 Posted May 9, 2010 Author Share Posted May 9, 2010 hahahhahaha silly me Thank you for the info - will just create a disable all fuction that starts at the begining of every event Link to comment Share on other sites More sharing options...
kra55 Posted May 9, 2010 Author Share Posted May 9, 2010 Now to be a pain is there anyway i can make esc interupt the script and ask if i wish to continue or quit? Link to comment Share on other sites More sharing options...
Developers Jos Posted May 9, 2010 Developers Share Posted May 9, 2010 Now to be a pain is there anyway i can make esc interupt the script and ask if i wish to continue or quit?Yes you can as long as you are not in another Event triggered Func, but that is just a matter of design. SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
kra55 Posted May 9, 2010 Author Share Posted May 9, 2010 This might be a stupid way of getting around it but couldnt i just have another script running that waits for a hotkey to be pressed and closes the script from the icon tray? Unfortunately random things happen and scripts get stuck. People cant seem to understand that they simply have to right click on the icon and hit Exit to end the script !!!!!!!!!!!!!!!! Link to comment Share on other sites More sharing options...
hawky358 Posted May 9, 2010 Share Posted May 9, 2010 (edited) Now to be a pain is there anyway i can make esc interupt the script and ask if i wish to continue or quit?If you use hotkeyset() with esc then it can interrupt even if you are in an event. You can just use a box to ask quit/continue.couldnt i just have another script runningYou can assign the hotkey in the main script, it should work. (It's always worked for me) Edited May 9, 2010 by hawky358 Link to comment Share on other sites More sharing options...
kra55 Posted May 9, 2010 Author Share Posted May 9, 2010 YAY - Thank you gotta love the basic things i overlook !!!! Link to comment Share on other sites More sharing options...
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