Jump to content
Sign in to follow this  
MyEarth

Force release mouse click

Recommended Posts

MyEarth

In a GUI, there is a way to force the mouse primary release after a xyz timer?

I see exist messages like $GUI_EVENT_PRIMARYDOWN and PRIMARYUP but nothing about the mouse click release

Share this post


Link to post
Share on other sites
this-is-me

Does MouseUp("primary") not work for you?


Who else would I be?

Share this post


Link to post
Share on other sites
this-is-me

In that case, you will have to share some code that exemplifies the problem you are having.


Who else would I be?

Share this post


Link to post
Share on other sites
MyEarth

i don't have any problem but a necessity. I'll rephrase the question, is possible to release the primary button (real mouse, not virtual) using a GUI made with autoit?

I know is possible to intercept both "state" ( $GUI_EVENT_PRIMARYDOWN and $GUI_EVENT_PRIMARYUP ) but I can not find anything on "release mouse button"

Share this post


Link to post
Share on other sites
BrewManNH

You can't have a script force a person's finger off of the button, which is what you just said by mentioning real mouse. Virtual mouse buttons are all you can affect.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
this-is-me

I really don't understand what you speak about with the real mouse versus virtual. Are you suggesting that a script could reach outside the computer screen and slap a user's hand away from the mouse? (LOL) I'm afraid I can't begin to understand a circumstance under which MouseUp would not function. I have an example script that works perfectly on everything I've tried. Just try to mouse down for longer than 3 seconds. It causes a mouseup event. It requires the >MouseOnEvent UDF.
 

#include "MouseOnEvent.au3"

_MouseSetOnEvent($MOUSE_PRIMARYDOWN_EVENT, "MouseIsDown")

While 1
    Sleep(1000)
WEnd

Func MouseIsDown()
    AdlibRegister("MouseItUp", 3000)
EndFunc

Func MouseItUp()
    MouseUp("primary")
    AdlibUnRegister("MouseItUp")
EndFunc

To test, you can go to QuirksMode and hold down the mouse on "The event handlers are registered on this link."


Who else would I be?

Share this post


Link to post
Share on other sites
Bert

Question - is this your AutoIt application (you have the source code) or something you do not have the source code for? If you do not have the source code for it then you would need to go to the author to make the change you need. If it is your source code then you may be able to do a _IsPressed("01") and have a if statement built into your while loop. Again, it would be helpful if you shared your code so we can get a better idea of what you are trying to do.

Edited by MBALZESHARI

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.