Sign in to follow this  
Followers 0
Gurblash

Do ... Until MouseClick("left")

4 posts in this topic

Oi!

Been using AutoIT for about a week now, absolutely love it so far, but have ran into a snag in my script. Sorry for the nooby question scourered across the forums as best as I could and came up short.

I'm trying to write my configuration of coordinates function which calls the CoordLocator(). What I'm looking for it to accomplish is, display a msgbox telling the user what they are supposed to do. "Click x area". It then calls the CoordLocator() and well I'll have you take a peek at the underlying code.

Func CoordLocator()
    Do
        $X1 = MouseGetPos(0)
        $Y1 = MouseGetPos(1)
    Until MouseDown("left") ; now I know this is not the correct expression this is what I'm looking for help with.
EndFunc

Func ConfigCoords()
    MsgBox(0 , "Configure Step 1 of 15" , "Please Click Empty Space in X")
    Call("CoordLocator")
    $BlahX1 = $X1
    $BlahY1 = $Y1

    MsgBox(0 , "Configure Step 2 of 15" , "Please Click Empty Space in y")
    Call("CoordLocator")
    $YaddaX1 = $X1
    $YaddaY1 = $Y1
EndFunc

Bascily it will prompt the user where to click. Then wait for the user to click the specified area and continue to the next MsgBox. Any help with finding IF MouseDown("left")?

Thanks in advanced,

Gurb

Share this post


Link to post
Share on other sites



#include<Misc.au3>

$x = 0

Do
    $x += 1
    Sleep(10);Not necessary may probably recudes CP load
Until _IsPressed('01');Loop until left click is pressed

Msgbox(0, '', $x)


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

Awesome works as is. Much appreciated Achilles.

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