Jump to content

wait for input


 Share

Recommended Posts

I am making a script that after I press a button on my GUI I want to wait for the user to left mouse click in another window to set a position. How can I do something like this? I want to either be able to wait for the return value from a hotkey function or just pause the script until the left mouse button is pressed. Is there a way to remove a hotkey after it has been set? If this isn't possible any other ideas would be appreciated.

Thanks!

Nathan

Link to comment
Share on other sites

#Include <Misc.au3>
Do
    $mPos = MouseGetPos()
Until _IsPressed(01)

$mX = $mPos[0]
$mY = $mPos[1]

this might help

Edited by billthecreator

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

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