Sign in to follow this  
Followers 0
lolp1

HOTkeyset with a mouse click?

5 posts in this topic

Hello,

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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()

Share this post


Link to post
Share on other sites

Heh, I knew about Ispressed but doesnt really work in my case, thanks anyways.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Heh, I knew about Ispressed but doesnt really work in my case, thanks anyways.

ok so, can you explain why it doesn't work?

Edited by mrRevoked

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

Share this post


Link to post
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
Sign in to follow this  
Followers 0