mattfaust Posted September 19, 2007 Posted September 19, 2007 #Include <Misc.au3> $dll = DllOpen("user32.dll") While 1 For $i = 10 to 1 Step -1 sleep(1000) ToolTip($i,1,1) If _IsPressed("01", $dll) Then $i = 10 Next wend what Im going for is a 10 second countdown, that when the user left clicks it will reset the count thanks
Monamo Posted September 19, 2007 Posted September 19, 2007 (edited) #Include <Misc.au3> $dll = DllOpen("user32.dll") While 1 For $i = 10 to 1 Step -1 sleep(1000) ToolTip($i,1,1) If _IsPressed("01", $dll) Then $i = 10 Next wend what Im going for is a 10 second countdown, that when the user left clicks it will reset the count thanks Give this a shot. The ExitLoop should exit out of the For...Next, causing it to return to the While...WEnd, thus auto-initiating the 10->1 countdown. #Include <Misc.au3> $dll = DllOpen("user32.dll") While 1 For $i = 10 To 1 Step - 1 Sleep(1000) ToolTip($i, 1, 1) If _IsPressed("01", $dll) Then ExitLoop EndIf Next WEnd Edited September 19, 2007 by Monamo - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]
mattfaust Posted September 19, 2007 Author Posted September 19, 2007 it is not picking up any clicks, it just countsdown, over and over
mattfaust Posted September 19, 2007 Author Posted September 19, 2007 it is not picking up any clicks, it just countsdown, over and over actually, if i click as fast as my finget will allow it does rest. Is it not "seeing" my clicks because the sleep?If that is the case how can I make it a 10-sec timeout w/o sleep?
Monamo Posted September 19, 2007 Posted September 19, 2007 (edited) actually, if i click as fast as my finget will allow it does rest. Is it not "seeing" my clicks because the sleep? If that is the case how can I make it a 10-sec timeout w/o sleep? Try For $i = 100 to 1 Step -1 Sleep(100) Edit: Reasoning = the 100 on Sleep will yield a better response factor, and the count increase *10 is to counter the Sleep decrease /10 Edited September 19, 2007 by Monamo - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]
mattfaust Posted September 19, 2007 Author Posted September 19, 2007 Try For $i = 100 to 1 Step -1 Sleep(100) Edit: Reasoning = the 100 on Sleep will yield a better response factor, and the count increase *10 is to counter the Sleep decrease /10 ahhh, works perfectly!! Thanks, your a jedi master
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