Trait Posted October 2, 2005 Posted October 2, 2005 Hey, sorry if this has been asked allready... Didn't see it when I did a search. Anyone know if it's possible to set the middle mouse button as a hotkey to start a function? Thanks a million guys! Aaron
BigDod Posted October 2, 2005 Posted October 2, 2005 Hey, sorry if this has been asked allready... Didn't see it when I did a search.Anyone know if it's possible to set the middle mouse button as a hotkey to start a function?Thanks a million guys!AaronI do not know if it can be done directly but the following will work#Include <Misc.au3> HotKeySet("{F9}", "ShowMessage") While 1 if _IsPressed(04) Then send("{F9}") EndIf WEnd Func ShowMessage() MsgBox(4096,"","This is a message.") EndFuncI know there are probably better ways to do it but no-one else was answering. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
LxP Posted October 3, 2005 Posted October 3, 2005 There probably isn't any fantastic solution to achieving this with AutoIt because AutoIt doesn't take advantage of 'hooks' to watch mouse events. Consequently you would need to use a loop (like BigDod suggested) which will eat unnecessary CPU. I don't like to plug non-AutoIt software here but you may want to look at PowerPro, which will allow you to assign all sorts of actions to all sorts of events including middle click, bump screen side/corner, caption double-click, right mouse drag down etc. Your action can then trigger an event such as running an AutoIt script.
Trait Posted October 3, 2005 Author Posted October 3, 2005 Thanks for the help guys ^^ I'll look into some other options too! Thanks again! Trait
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