Sign in to follow this  
Followers 0
Vindicator

wait for a click...

7 posts in this topic

#1 ·  Posted (edited)

How could I get the script to pause untill the user clicks (anywhere)?

well, is there a command for it anyway?

Edited by P a R a D o X

If I hadn't said thank you yet, and you deserve it, than thank you...

Share this post


Link to post
Share on other sites



#include <misc.au3>
Func _ClickWait()
    While (_IsPressed('01') == 0)
        sleep(10)
    WEnd
EndFunc

_ClickWait()
MsgBox(0, "", "Done!")

This ought to work.

Was going to make'em work for it. :whistle:

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Like this works too

#include <Misc.au3>

Do  
    Sleep(100)
    ToolTip("Waiting For Click",0,0)
Until _IsPressed("01")
    ToolTip("")

;Rest of script here
MsgBox(0, "You Clicked!", "You Clicked!")
Edited by Paulie

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

k thanks all, but now how do I make this repeat, so that every time I click it would say "done!"? I tried putting buth of the scripts into a While 1 loop but it just says I dont have a WEND to go with it..

EDIT: Nvm thanks, I found it

Edited by P a R a D o X

If I hadn't said thank you yet, and you deserve it, than thank you...

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

k thanks all, but now how do I make this repeat, so that every time I click it would say "done!"? I tried putting buth of the scripts into a While 1 loop but it just says I dont have a WEND to go with it..

EDIT: Nvm thanks, I found it

Oh, we thought you just wanted it to pause until it was clicked.

While 1
    If _IsPressed("01") Then
        MsgBox(0,"","You Clicked!")
    EndIf
    Sleep(100)
WEnd

EDIT: Sorry, Missed your edit..

Edited by Paulie

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  
Followers 0