Jump to content

Possible to use mouse with HotKeySet?


Quakes
 Share

Recommended Posts

I've searched the boards for a while now regarding this, but either due to my lack of searching skills or the lack of information, I haven't been able to find it, thus this topic.

My question: Is it possible to set mouse buttons to HotKeySet? Such as ctrl+mouseclick, alt+mouseclick, etc?

Link to comment
Share on other sites

In the help file it states that HotKeySet uses the same keys as Send. So the answer to your question is no.


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

Link to comment
Share on other sites

As BigDod said, it isn't possible, but there are several possibilities to let mouseclicks work as hotkeys:

First possibility, if you want to have mouseclicks as a "hotkey", when you click on your gui:

#include <GUIConstants.au3>


Opt("GUIOnEventMode", 1)
GUICreate("",@DesktopWidth,@DesktopHeight)
GUISetOnEvent($GUI_EVENT_PRIMARYDOWN,"your_function")
GUISetState()

While 1
    Sleep(100)
WEnd

Func your_function()
    If _IsPressed(11) Then MsgBox(0,"","Mouse as Hotkey");11=additional key (CTRL)
EndFunc

Second possibility, mouseclicks as "hotkey" independent of the window:

#include <Misc.au3>

While 1
    If _IsPressed(01) And _IsPressed(11) Then your_function()
    Sleep(100)
WEnd

Func your_function()
    MsgBox(0,"","Mouse as Hotkey") 
EndFunc
Edited by Markus

"It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output

Link to comment
Share on other sites

  • 2 years later...

what button does _IsPressed(11) point to?

It does not point to any mouse keys. For a complete list lookup _IsPressed in the help file.


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

Link to comment
Share on other sites

Snowman. Learn to search and use the help file. Then you should start to go okay. I figured someone with as many posts as you would have figured that out by now...

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
 Share

  • Recently Browsing   0 members

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