Sven Posted July 7, 2008 Share Posted July 7, 2008 Out of the necessity to wait for the hotkey to be released in order for the script to proceed, I've written this _release_wait UDF. Feel free to improve, adapt and optimize it for your own needs. _release_wait function #include <misc.au3> Func _release_wait() $hex = Hex(Asc(StringUpper(@HotKeyPressed))); this converts our hotkey into a format that _ispressed can work with HotKeySet(@HotKeyPressed, '_release_wait_dummy'); can't disable hotkey, because if we did we'd be spammed with the letter / number / whatever we're holding down ; can't disable input because then the up event of our hotkey wouldn't be registered Do Sleep(10) Until Not _IsPressed($hex) ; $hex is the hotkey used; non number & letter buttons need special treatment, like > and not _ispressed('0d') < (enter key) HotKeySet(@HotKeyPressed, '_' & @HotKeyPressed) EndFunc ;==>_release_wait Func _release_wait_dummy() ; does nothing but is still needed EndFunc ;==>_release_wait_dummy Link to comment Share on other sites More sharing options...
ludocus Posted July 7, 2008 Share Posted July 7, 2008 dude.. this is soooo simple.. Link to comment Share on other sites More sharing options...
James Posted July 7, 2008 Share Posted July 7, 2008 Says you with your CMD version of everything >>. Good work! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
ludocus Posted July 7, 2008 Share Posted July 7, 2008 muttley cool new avatar! Link to comment Share on other sites More sharing options...
Sven Posted July 7, 2008 Author Share Posted July 7, 2008 Sure it's simple... or not, depending on who you ask. Link to comment Share on other sites More sharing options...
MerkurAlex Posted July 7, 2008 Share Posted July 7, 2008 muttleycool new avatar!Way to change the subject instantly. [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] 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