Jump to content



Recommended Posts

  • 5 weeks later...

Would it be possible to use

HotKeySet("{HOME}", MouseClick("Left"))
HotKeySet("{END}", MouseClick("Right"))

for mouse button clicks

I'm trying to figure out how to do it the other way around. I want to use HotKeySet with a left mouse click and keyboard modifier. For instance, if the user clicks on a window with the left mouse button while holding the shift key down, I should go to a function, not use _IsPressed(). I have programs that work fine using a hotkey like Alt-F11 or whatever, but it's a pain to have to take my hand off the mouse.

If there was something like

HotKeySet("+{LButton}","MyFunc") life would be a lot easier. Most times when I use AHK the only reason is because I want to use a mouse hotkey. But AutoIt3 is way better for UDFs. If only the mouse support was there it would really let me concentrate on just using Au3 for small utilities.

edit: The solution I came up with was to do it the Linux way. Use a program that makes it easy to do something. Fortunately the strings for both ahk and au3 hotkeys are the same(at least the ones I use in my programs anyway.) If the user wants the mouse hotkey, I launch an ahk program with the au3 program's hotkey as param. The ahk program eats the mouse click and Sends the hotkey. NoTrayIcon. Simple. When the user turns the option off, I just kill the mousekey monitor. I know it's a kludge but it's less likely to break something than sticking hooks in the user's event queues.

Edited by MilesAhead
Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...