Jump to content
Sign in to follow this  
Werty

Detect mouse button release ?

Recommended Posts

How do you detect if a mouse button has been released ?

The mouse functions in the help file got nothing, and the UDF helpfile has no example of how to use the _WinAPI_Mouse_Event function.

I need to detect if the right button is released (not if it is pressed, only that it is released)

Thanks.


Some guy's script + some other guy's script = my script!

Share this post


Link to post
Share on other sites

No where, and anywhere.

I need it when zooming with the right button in Google Earth, then I want my script to do something when i release the right button, so the cursor isnt placed any particular place, it can be anywhere.

It's just the release itself I need.


Some guy's script + some other guy's script = my script!

Share this post


Link to post
Share on other sites

you can use _IsPressed() to see if it's down. if you loop it until it's not down, you're good

Wouldnt that just say that the button is unpressed, not released ?

I tried the ispressed like this...

If _IsPressed("02", $dll) Then
        MsgBox(1,"hello","hello")
        EndIf

But dunno how I would go about checking for a release of the button.


Some guy's script + some other guy's script = my script!

Share this post


Link to post
Share on other sites

cameronsdad meant more like this:

#Include <Misc.au3>

While 1
    While _IsPressed("01")
        ToolTip("Button down")
        Sleep(10)
    WEnd
    ToolTip("Button up")
    Sleep(10)
WEnd

;)

Share this post


Link to post
Share on other sites

or

Thanks, got that working ;)

Though, how do I get the tooltips to disappear again, now I got it hanging on my screen and cant get it away :)


Some guy's script + some other guy's script = my script!

Share this post


Link to post
Share on other sites

Thanks, got that working ;)

Though, how do I get the tooltips to disappear again, now I got it hanging on my screen and cant get it away :)

just call Tooltip() without an argument

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...