 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
zorglups
Joined: 04 Feb 2005 Posts: 22
|
Posted: Mon Feb 07, 2005 11:51 am Post subject: How to send a "Physical" mouse click ? |
|
|
I know this question might sound stupid but I found some cases where I can't do a "^{Insert}" while the user still hold down the LButton.
I know I could wait for the button to be up but ... would prefer not to wait.
The following code shows what I mean:
| Code: | ~LButton::
Traytip,, Waiting for Left button to be Up
MouseClick, Left,,,,,U
KeyWait,LButton,U
Traytip,, Finally
SoundPlay, %SystemRoot%\Media\Windows XP Start.wav
return |
Well, anyone reading this code would tell me to replace:
KeyWait,LButton,U
by:
KeyWait,LButton,UL
But I really need to have the "physical" state of the LButton cleared.
Is there a way to send something like:
MouseClick, Left,,,,,UP
where P would mean that my LeftButton is physically up ?
Hum. Strange I know.
Pierre. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Mon Feb 07, 2005 12:43 pm Post subject: |
|
|
I know exactly what you mean, but unfortunately I don't think it's possible without writing some software to operate at the driver level, which for now is outside the scope of the project.
Try the following just to see if "^{Insert}" works while the button is down:
*LButton::
MouseClick, Left,,,,, D
KeyWait LButton
MouseClick, Left,,,,, U
return
If it works, you might be able to redesign your LButton hotkey to omit the tilde, using something like the above example to do it. |
|
| Back to top |
|
 |
zorglups
Joined: 04 Feb 2005 Posts: 22
|
Posted: Mon Feb 07, 2005 6:06 pm Post subject: |
|
|
Maybe I misunderstood you but this doesn't change anything.
The KeyWait will wayt until I release physically the button.
I already tried to make a
MouseClick, Left,,,,, U
SendKey, ^{Insert}
But it fails in some cases because the buttonnis still physically down.
What I do now is something like:
KeyWait LButton
SendKey, ^{Insert}
It works. I just wanted to avoid waiting for the user to give him a better 'feeling'.
Nevermind. It is just nice to have.
Thanks for the suggestion.
Pierre. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Mon Feb 07, 2005 11:59 pm Post subject: |
|
|
| The reason I made the suggestion above is that it will cause the keyboard hook to suppress the mouse down-event, which might prevent the system from ever seeing that the mouse is physically down in the first place. But this is a longshot. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|