Jump to content

HOTkeyset with a mouse click?


Recommended Posts

Take a look at _ispressed() in the help file.

while 1 

#Include <Misc.au3>

if _IsPressed("01") = 1 then  ; when left mouse button is clicked, returns 1 as success 0 as failure
          code here
endif

wend
oÝ÷ ÚÚºÚ"µÍÚ[ÛYH  ÛZØË]LÉÝÂÌÍÙHÜ[   ][ÝÝÙÌ  ][ÝÊBÚ[HBYÒÔÜÙY
    ][ÝÌI][ÝË   ÌÍÙ
HHH[ÛÙHB[YÙ[ÛÜÙJ  ÌÍÙ
B
Edited by acidfear
Link to comment
Share on other sites

Hello,

I'm wondering if it is possible to use hotkeyset, but with a mouse click, I could not seem to find a way.

no, use _IsPressed() instead or larrys hook.dll in example scripts section of the forum.

#include <Misc.au3>
Local $click = 0

While 1
    Sleep(10)
    If _IsPressed('01') Then
        If $click = 0 Then
            MsgBox(0,'Clicked','You right clicked')
            $click = 1
        EndIf
    Else
        $click = 0
    EndIf
WEnd
Edited by mrRevoked
Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
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...