Jump to content
Sign in to follow this  
schwiz

wait for input

Recommended Posts

schwiz

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

Share this post


Link to post
Share on other sites
billthecreator

#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

Share this post


Link to post
Share on other sites
schwiz

exactly what i was wanting, thanks for the quick reply!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.