Computer Science Canada

Mouse Roller?

Author:  Flikerator [ Fri Feb 25, 2005 7:06 pm ]
Post subject:  Mouse Roller?

Is there anyway to use turing to detect the mouse roller? I want to roll it up and the weapon switches. I just need to know if it can detect it. I know if you press it with multibuttons you get 10 but I want to ROLL it up or down to switch between weapons in your inv.

I just need to know if its possible.

Author:  AsianSensation [ Fri Feb 25, 2005 10:39 pm ]
Post subject: 

Sure it is. I knew someone in my last computer science class that basicly made a game based on mouse gestures (like the mouse gestures extension on FireFox).

Basicly, you detect the bunch of the mouse's position within a short period of time, and if the slope of the lines between 2 points comes close to your predefined range, then you execute your change weapon procedure.

Author:  Flikerator [ Fri Feb 25, 2005 11:56 pm ]
Post subject: 

Thats pretty cool, reminds my of black and white. Great game Razz

But im talking about rolling that round thing on your mouse, not the ball underneat. I mean the thing that moves the side bar go up and down. Not all mouses have them though, but most nowadays do.

Posted Image, might have been reduced in size. Click Image to view fullscreen.

Like that thing in the center. If its possible can you tell me how?

Author:  AsianSensation [ Sat Feb 26, 2005 10:36 am ]
Post subject: 

oh, you mean the scroll button, well, that's even easier, the answer is: No (at least not to my knowledge).

Don't you hate turing now Razz

Author:  jamonathin [ Sun Feb 27, 2005 6:41 pm ]
Post subject: 

aw that sux, that'd be cool if you could . . . Sad

Author:  Flikerator [ Sun Feb 27, 2005 8:03 pm ]
Post subject: 

Darn that sux

I dont hate turing though ^^ Razz

Author:  jamonathin [ Sun Feb 27, 2005 8:16 pm ]
Post subject: 

yeah man, turning's what boosts my average Very Happy, nice lil 100% in comp sci fills in for my 50's in eng.

Author:  Genesis [ Sun Feb 27, 2005 9:04 pm ]
Post subject: 

jamonathin wrote:
yeah man, turning's what boosts my average Very Happy, nice lil 100% in comp sci fills in for my 50's in eng.


I hope you don't plan on going to university with a 50 in english. Because your knowledge of Turing won't get you very far.

Author:  jamonathin [ Sun Feb 27, 2005 9:07 pm ]
Post subject: 

lol nah. i just need over a 60 in it (which im hopin to do) and im gonna go to college and go into their comp programming course then the comp prog. analyst, which is supposed to be for game making, which'll be cool Smile

Author:  Flikerator [ Mon Feb 28, 2005 4:37 pm ]
Post subject: 

I hate my comps teacher. I got everything in the class 100% and he takes marks off because I didn't add enough extras. He said since I excelled I should have done more to improve on the work, more then I alread have. I tell you there isn't much you can do to a cashier program cept mess with the colours...

Oh well I pulled a 90% and that brougt my average up a bit, I get near 90 in english so Razz

Author:  Cervantes [ Mon Feb 28, 2005 7:17 pm ]
Post subject: 

Flikerator wrote:
I tell you there isn't much you can do to a cashier program cept mess with the colours...

Learn RGB. Make a nice introduction. Try fading a picture in and out (it's in Zster's tutorial).
Also, try using your own GUI, not Turing's built in stuff. Smile ... Shifty

Author:  Flikerator [ Mon Feb 28, 2005 8:39 pm ]
Post subject: 

Cervantes wrote:
Flikerator wrote:
I tell you there isn't much you can do to a cashier program cept mess with the colours...

Learn RGB. Make a nice introduction. Try fading a picture in and out (it's in Zster's tutorial).
Also, try using your own GUI, not Turing's built in stuff. Smile ... Shifty


Learning GUI beggining of grade 9? Thats tough lolz

Author:  jamonathin [ Tue Mar 01, 2005 9:49 am ]
Post subject: 

man, i feel so dumb, because im in gr.12 comp sci, and all of these other people are starting in gr.9, and by the time they get to gr.12 they'll be haXoRz, and i started juss last year in gr 11 Confused

Author:  Tony [ Tue Mar 01, 2005 10:26 am ]
Post subject: 

jamonathin wrote:
all of these other people are starting in gr.9

Amailer started in grade 7~8 Wink

But you still have quite an advantage over younger programmers because of other courses you already took. Most notably trig and physics.

Author:  Martin [ Tue Mar 01, 2005 11:20 am ]
Post subject: 

I started in grade 10.

I got into Waterloo with a 50ish in physics. Go me. Now I have an 80 in it Smile

Author:  Flikerator [ Tue Mar 01, 2005 4:16 pm ]
Post subject: 

martin wrote:
I started in grade 10.

I got into Waterloo with a 50ish in physics. Go me. Now I have an 80 in it Smile


Good news for me cause I have high marks lolz. I also won the waterloo math contest they have in all the schools Razz

They told me I won but didn't say wheather it was in my school or the whole thing, I got 98% so I would assume the school as you can get over 100%. They wouldnt let me compete this year because I had math second semester, im mad grr >.<

Oh well always next year.

Quote:
But you still have quite an advantage over younger programmers because of other courses you already took


I would say my advantage is they are not obsessed and practise everyday lolz ^^ I wish I had started earlier, but I never heard of turing and nobody would help me with C :/

Author:  person [ Tue Mar 01, 2005 5:35 pm ]
Post subject: 

wich math contest (name)? i did Gauss twice before they'r easy got perfect on the first one, and 1 wrong on the second. screwed up on Pascal though i dont know wat i got

Author:  Flikerator [ Tue Mar 01, 2005 6:08 pm ]
Post subject: 

person wrote:
wich math contest (name)? i did Gauss twice before they'r easy got perfect on the first one, and 1 wrong on the second. screwed up on Pascal though i dont know wat i got


Yah Pascal I think.

Author:  Cervantes [ Tue Mar 01, 2005 8:39 pm ]
Post subject: 

Flikerator wrote:

They told me I won but didn't say wheather it was in my school or the whole thing, I got 98% so I would assume the school as you can get over 100%. They wouldnt let me compete this year because I had math second semester, im mad grr >.<

Err, you can't get over 100%. Confused
And, if they wouldn't let you compete, how did you win? You must be really good. Laughing

Man, I'm confused.

Regardless, if you guys are doing well in the Gauss/Pascal, great! But it gets progressively harder (and I don't mean because you need higher level math, it's really harder). Do some practice, every now and then, and you should do well on the Euclid.

Author:  person [ Tue Mar 01, 2005 8:43 pm ]
Post subject: 

did anyone like get over 90% in Descartes? heard it was really hard

and wats the waterloo page for constests?

Author:  Mazer [ Wed Mar 02, 2005 8:05 am ]
Post subject: 

Here's a thought:
Do you know how to set the number of mouse buttons in Turing? Something like Mouse.ButtonChoose(something here). See if you can set it to 5 buttons, and then the fourth and fifth buttons would correspond with scroll up and scroll down. (so, button 4 would be 10000 and button 5 would be 100000)

Author:  Drakain Zeil [ Wed Mar 02, 2005 4:15 pm ]
Post subject: 

With some grade 10 math you can do a lot of cool things in programming.

Author:  Flikerator [ Wed Mar 02, 2005 5:03 pm ]
Post subject: 

Cervantes wrote:
Flikerator wrote:

They told me I won but didn't say wheather it was in my school or the whole thing, I got 98% so I would assume the school as you can get over 100%. They wouldnt let me compete this year because I had math second semester, im mad grr >.<

Err, you can't get over 100%. Confused
And, if they wouldn't let you compete, how did you win? You must be really good. Laughing

Man, I'm confused.

Regardless, if you guys are doing well in the Gauss/Pascal, great! But it gets progressively harder (and I don't mean because you need higher level math, it's really harder). Do some practice, every now and then, and you should do well on the Euclid.


I competed last year, and this year I couldn't because I didn't have math first semester. Someone got 115% in the grade 11 math contest Rolling Eyes So I assumed you could in Pascal too. If you can't I did really well...Having 98% that is...

So there is hope for mouse rolling? If anyone knows how to do it could you send me a small explanation?

Author:  person [ Wed Mar 02, 2005 5:28 pm ]
Post subject: 

you do understand that 100% means perfect, so how can u get better than perfect??

did u mean 98 points instead of percent?

EDIT: pardon me for my rudeness

Author:  Flikerator [ Wed Mar 02, 2005 5:32 pm ]
Post subject: 

person wrote:
you do understand that 100% means perfect, so how can u get better than perfect??

did u mean 98 points instead of percent?

EDIT: pardon me for my rudeness


No they said I got 98%...If I didn't then they lied. Razz

I know 100% is perfect..im not 5 Razz Im just going by what they said, by they I mean math teachers who got the results.

Your not being rude Razz

Author:  Cervantes [ Wed Mar 02, 2005 7:28 pm ]
Post subject: 

Coutsos wrote:
Here's a thought:
Do you know how to set the number of mouse buttons in Turing? Something like Mouse.ButtonChoose(something here). See if you can set it to 5 buttons, and then the fourth and fifth buttons would correspond with scroll up and scroll down. (so, button 4 would be 10000 and button 5 would be 100000)

Nice idea, Coutsos. Unfortunately, when I tried it, Turing experienced a fatal error which then caused an error in kernal32, bringing me to the blue screen of death. Nice. So I restarted my computer, loaded Turing once again, retyped the code, then encountered another fatal error. I'm not trying it again. Laughing

Author:  Flikerator [ Wed Mar 02, 2005 7:32 pm ]
Post subject: 

Why make the numbers so high? Make them like 1000, and -1000?

Author:  Mazer [ Wed Mar 02, 2005 8:22 pm ]
Post subject: 

Cervantes: All the way to the BSOD, you say? Interesting. AsianSensation should like to hear that!

Flikerator: My logic is in this:
1) Under Linux, the X server uses the mouse wheel by mapping the buttons as follows
- left click is 1
- right click is 2
- middle click (wheel click) is 3
- mousewheel up is 4
- mousewheel down is 5
(though I may have the last 2 wrong)

2) Turing recognizes which mouse button is being pressed by an integer that, from what I could tell just goes by 10^(mouse button - 1). It's true for the first three, I thought I'd just take it from there.

Ah well. Maybe the turing files could shed some light on this? Referring to one of the files that are automatically included, that is, not that silly semi-useless turing reference.

Author:  Flikerator [ Wed Mar 02, 2005 9:39 pm ]
Post subject: 

code:
var x, y, z : int
Mouse.ButtonChoose ("multibutton")
loop
    Mouse.Where (x, y, z)
    locate (1, 1)
    put x, " ", y, " ", z
end loop



When I roll my mouse the z value is 0. Can I make it take on a value?

I use Windows...

Author:  mike200015 [ Sat Mar 05, 2005 3:20 pm ]
Post subject: 

if you click the mouse wheel , then the z variable changes to 10... no clue what that means or nething.. jus thought ud like to know lol Razz

Author:  Flikerator [ Sat Mar 05, 2005 3:23 pm ]
Post subject: 

mike200015 wrote:
if you click the mouse wheel , then the z variable changes to 10... no clue what that means or nething.. jus thought ud like to know lol Razz


Yah I already know that, i need it ti be a value when I roll it though.

Author:  McKenzie [ Sun Mar 06, 2005 11:02 am ]
Post subject: 

In the old DOS version the button numbers made sence because Turing would register more than one button being pressed. So for example:
pressing left and right : 101
pressing left and right : 011
So it looks like there is one bit for each button. There in reverse order so that the left button is 1 for simplicity (mine you I don't find 100 all that complex.)

Author:  Flikerator [ Sun Mar 06, 2005 3:11 pm ]
Post subject: 

You can't even do two buttons being pressed at once, which suks. It should add them up. If I right click and left click it should be 101...but its 1..

Author:  McKenzie [ Sun Mar 06, 2005 5:20 pm ]
Post subject: 

Right, like I said, it worked in the old DOS version. I'm pretty sure that it's not supported by the Windows API, so you can't really blame Holt for this one.

Author:  Flikerator [ Fri Mar 11, 2005 8:38 pm ]
Post subject: 

McKenzie wrote:
Right, like I said, it worked in the old DOS version. I'm pretty sure that it's not supported by the Windows API, so you can't really blame Holt for this one.


But...But...I play games and I use both clicks at once. *Is confused*

Author:  McKenzie [ Sun Mar 13, 2005 7:25 pm ]
Post subject: 

OK, You can Kinda blame Holt. It is far from impossible to check both buttons. Windows will give an event each time either button goes up or down. All they had to do was track the status of the buttons. In DOS you do and Int21 and the mouse driver will give you the exact status.

Author:  Andy [ Sun Mar 13, 2005 7:30 pm ]
Post subject: 

u sure u cant do it in a process?


: