Werty 157 Posted September 19, 2010 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
AdmiralAlkex 125 Posted September 19, 2010 And where do you want to detect the button release? When you decide that then look at the other mouse-threads from today. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites
seandisanti 6 Posted September 19, 2010 you can use _IsPressed() to see if it's down. if you loop it until it's not down, you're good Share this post Link to post Share on other sites
Werty 157 Posted September 19, 2010 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
Werty 157 Posted September 19, 2010 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
AdmiralAlkex 125 Posted September 19, 2010 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 .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites
seandisanti 6 Posted September 19, 2010 or #Include <Misc.au3> While 1 If _IsPressed("01")Then While _IsPressed("01") ToolTip("Button down") Sleep(10) WEnd ToolTip("Button up") EndIf Sleep(10) WEnd Share this post Link to post Share on other sites
Werty 157 Posted September 19, 2010 orThanks, 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
seandisanti 6 Posted September 19, 2010 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
Werty 157 Posted September 19, 2010 Thanks. Some guy's script + some other guy's script = my script! Share this post Link to post Share on other sites
seandisanti 6 Posted September 19, 2010 Thanks.No problem, glad to help Share this post Link to post Share on other sites