Jump to content
Sign in to follow this  
mattfaust

can someone tell me why this doesnt work?

Recommended Posts

#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

Share this post


Link to post
Share on other sites

#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 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]

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 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]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...