Sign in to follow this  
Followers 0
illya

listen for mouseclicks (side buttons)

2 posts in this topic

Hi, im pretty sure this answer is really simple, but after searching in both the forums and the Online Documentation I couldnt find anything.

I want autoit to listen for certain mousebuttons and act when they are pressed. The buttons conserned are the two buttons on the left on the mouse(found on most modern mouses).

I couldnt find a function for it, but surely there is one right? :)

I basicly want to do: if mousebuttonpressed("button4") then: bla bla bla else: nothing.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Ok so far Ive found _IsPressed and that 01 is the elft button and 02 the right and 04 the middle.... now I just need to find what button is the ones on the side

EDIT1:

the code in case someone care:

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1

If _IsPressed("04", $dll) Then

MsgBox(0,"_IsPressed", "End Key Pressed")

ExitLoop

EndIf

WEnd

DllClose($dll)

EDIT2:

Ok so I abandoned that and found another way:

http://www.autoitscript.com/forum/index.ph...+x+mouse+button

I actually wanted to have one of the sidebuttons press backspace and the other one to press space, but with this one I can only choose one. Well atleast thats better than nothing, but if anyone finds a way to have them use different buttons then I would love to hear how :)

Edited by illya

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