Jump to content
Sign in to follow this  

GetAsyncKeyState Mouse button 5

Recommended Posts

Hai guys :)

I wana know how can i set If _WinAPI_GetAsyncKeyState(0x12) to mouse button 5. Can anybody please tell me what should i replace the 0x12 with ?

If this is not possible, is it possiblet to set mouse button 5 (or 4) to _IsPressed ?

Share this post

Link to post
Share on other sites

Look at the example for the _IsPressed function in the AutoIt help file.  And change the "10" for shift key to either:-
 "01" for Left mouse button; or,
 "02" for Right mouse button; or,
 "04" for Middle mouse button (three-button mouse); or,
 "05" for X1 mouse button; or,
 "06" for X2 mouse button.
This should show you which mouse button you are calling "mouse button 5".


Note:-  Look at the _WinAPI_GetAsyncKeyState function in the "WinAPI.au3" file in the AutoIt include directory.

And look at the _IsPressed function in the "Misc.au3" file, also in the AutoIt include directory. 

You will find that both functions use the export function, GetAsyncKeyState, from the "user32.dll" Window's file.



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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...