Mouse Input

Blitz3D Forums/Blitz3D Beginners Area/Mouse Input

AJ00200(Posted 2009) [#1]
As you may have seen in the General Help section, I got a new mouse with 2 extra buttons on it.
I was wondering if I could in any way (dll/userlib or whatever) read them.


jfk EO-11110(Posted 2009) [#2]
Probably there is a ready to use solution floating around somewhere, did you already check the code archives, especially section userlibs?

I guess you need however to install a special mouse driver for mouses with more than 3 Buttons.



EDIT
There is a B+ sample in the archives (didn't see one for B3D yet), showing how to use mouse_event and SetCursorPos. I'm not sure if these are the ones that will do the trick. Just don't use the other stuff that is B+ specific in this souce: http://www.blitzbasic.com/codearcs/codearcs.php?code=1186 .

Get a good info source for your API works, like the original API Help files, also seen on this page: http://www.carabez.com/downloads.html ( win32api.zip,win32api_big.zip,constants.zip)

If you once understand how to declare an API function in a decls file for Blitz then you may use any windows API function in Blitz with relative ease.
/EDIT

EDIT2: Uhm, I just see mouse_event seems to be a function to automatize some mouse events, like simulating a mouseclick, and not as I I thought a function to gather mouse information. But there is a function named GetNumberOfConsoleMouseButtons that may be interesting. When you let google search for it, it may find some sources that are handling higher numbers of buttons.


AJ00200(Posted 2009) [#3]
Thanks, I'll check those out.


_PJ_(Posted 2009) [#4]
Someone already provided you with the info:
http://www.blitzbasic.com/Community/posts.php?topic=85172#963086
http://www.blitzbasic.com/codearcs/codearcs.php?code=1943


AJ00200(Posted 2009) [#5]
That doesn't read mouse buttons does it?
If so, could you explain the API stuff a little bit?


Ked(Posted 2009) [#6]
That doesn't read mouse buttons does it?
If so, could you explain the API stuff a little bit?

Do you not remember commenting on those archive entries about 4 months ago?

EDIT: Hold on, I think I know what you mean... :P


AJ00200(Posted 2009) [#7]
If it helps, the buttons act as forward/back buttons in Windows Explorer, and Internet Browsers


chi(Posted 2009) [#8]
wrote a little dll for this...

http://www.blitzbasic.com/toolbox/toolbox.php?tool=242


AJ00200(Posted 2009) [#9]
Thanks.
I'll try those out when I add that function to my level builder (soon?).


Mustang(Posted 2012) [#10]
Thanks, got 4-5 buttons to work/detected! Any way to check combination of buttons like "3rd and 5th button pressed"?


airborne(Posted 2012) [#11]
I would guess you could possibly write it the same way for the other buttons for example:
If MouseDown(1)=True Then ;do whatever