Werty Posted September 19, 2010 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!
AdmiralAlkex Posted September 19, 2010 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
seandisanti Posted September 19, 2010 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
Werty Posted September 19, 2010 Author 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!
Werty Posted September 19, 2010 Author 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!
AdmiralAlkex Posted September 19, 2010 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
seandisanti Posted September 19, 2010 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
Werty Posted September 19, 2010 Author 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!
seandisanti Posted September 19, 2010 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
Werty Posted September 19, 2010 Author Posted September 19, 2010 Thanks. Some guy's script + some other guy's script = my script!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now