Merchants Posted March 27, 2010 Share Posted March 27, 2010 (edited) this is wat i wanti press 1x p then do notingif i press 2x p in 90 millisecondes then run func... else do notingHotKeySet("p", "Toggle1") Func Toggle1() Send("Job done!") Endfunc Edited March 27, 2010 by Merchants Link to comment Share on other sites More sharing options...
d0n Posted March 27, 2010 Share Posted March 27, 2010 maybe use Timerint() to check for time Link to comment Share on other sites More sharing options...
furrycow Posted March 27, 2010 Share Posted March 27, 2010 I'm not going to lie, there probably is a lot cleaner way of doing this, but this works: #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 While Not _IsPressed(50,$dll) Sleep(1) If _IsPressed(50,$dll) Then While _IsPressed(50,$dll) Sleep(1) WEnd $Timer=TimerInit() While TimerDiff($Timer)<=90 If _IsPressed(50,$dll) Then _PPressed() WEnd ExitLoop EndIf WEnd WEnd Func _PPressed() Msgbox(0,"Information","P was pressed twice in "&Round(TimerDiff($Timer),3)&" milliseconds!") EndFunc Instant Lockerz Invite - www.instantlockerzinvite.co.uk 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