Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / mouse scrollar button

Author
Message
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 27th Sep 2003 02:51
does anyone know if you can use the scroller button on the mouse in DBC? if so, how?

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
zzabb
21
Years of Service
User Offline
Joined: 25th Apr 2003
Location: Seattle, USA
Posted: 27th Sep 2003 03:32
yes but I could only get it to work with limited functions
use the command

t=mousez()

the problem for me is that it is either on or off
on = 99
off = 0

it didn't "scroll" like it should

i used it like

if mousez()>0 then t=t+1

the problem with this command is that when you turn it on by scrolling it keeps working even when you quit scrolling,
you have to turn it off by scrolling in the opposite direction

the scroll will turn it off and on, so it is either always on or always off

hope it helps

My advice is free -
unfortunately you get what you pay for (-:
AndyUK
21
Years of Service
User Offline
Joined: 2nd Apr 2003
Location: United Kingdom
Posted: 28th Sep 2003 05:29
i think he mean the actuall scroll wheel button and not the scrolling itself

| AMD Athlon XP 2000+ | 512DDR(400) | GF4MX400 64MB | Win2k Sp4 | Cup of Coffee |
DrakeX
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 28th Sep 2003 07:25
the scroll wheel button is button 4. so

if mouseclick()=4

will detect the scroll mouse button.

..

you're probably wondering why it's 4 and not 3.

well it's because button 1 is 1, 2 is 2, 3 is 4, 4 would be 8 if you had one, button 5 would be 16, 6 would be 32 etc. this is so you can check for combinations of buttons. so if you want to see if button 1 AND 2 are being pressed, you can use 3, which is 1+2. button 1 and 3 would be 5, which is 1+4.

if you just want to check for a button and don't want other buttons to interfere with it, you can do this:

mc=mouseclick()

if mc && 1
`this works if left button is pushed no matter what other buttons are pushed
endif

if mc && 4
`same here, except for hte scroll wheel button
endif

stop looking at me!
zzabb
21
Years of Service
User Offline
Joined: 25th Apr 2003
Location: Seattle, USA
Posted: 28th Sep 2003 07:50
hey thanx (-:
thats helpfull

My advice is free -
unfortunately you get what you pay for (-:

Login to post a reply

Server time is: 2024-09-21 01:09:51
Your offset time is: 2024-09-21 01:09:51