Jump to content

Do ... Until MouseClick("left")


Recommended Posts

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...