p00pies Posted January 26, 2010 Share Posted January 26, 2010 Would it be possible to use HotKeySet("{HOME}", MouseClick("Left")) HotKeySet("{END}", MouseClick("Right")) for mouse button clicks Link to comment Share on other sites More sharing options...
somdcomputerguy Posted January 26, 2010 Share Posted January 26, 2010 This works too HotKeySet("{HOME}", "Home") HotKeySet("{END}", "End") While 1 Sleep(50) Wend Func Home() MouseClick("Left") EndFunc Func End() MouseClick("Right") EndFunc - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
p00pies Posted January 26, 2010 Author Share Posted January 26, 2010 Thank you that works great Link to comment Share on other sites More sharing options...
MilesAhead Posted February 25, 2010 Share Posted February 25, 2010 (edited) 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 February 26, 2010 by MilesAhead My Freeware Page Link to comment Share on other sites More sharing options...
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