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 / Detecting Mouse Movement

Author
Message
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 4th May 2003 15:48
This is for me and Armeggadon; click the source button.
I hear and I forget. I see and I remember. I do and I understand.
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 4th May 2003 15:51
I am now using the below source-code:

I hear and I forget. I see and I remember. I do and I understand.
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 4th May 2003 16:02
Figured it out.

I hear and I forget. I see and I remember. I do and I understand.
Armeggadon
21
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 4th May 2003 20:52
heh. yeah i posted on the ther one about the screensaver what i did but its basically the same

Current Status: learning MORE about dbpro
I consider myself: newb
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 5th May 2003 01:33
You may want to change a line to:

if abs(X) > 1 or abs(Y) > 1 or abs(Z) > 1 then exit

you are only detecting mouse movement to the right and down. So if you move mouse left or up, it does not currently exit.

Gronda, Gronda
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 5th May 2003 01:41
Why is that sonic? I don't understand why what you just said is so.

I hear and I forget. I see and I remember. I do and I understand.
Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 5th May 2003 02:24
use "<>0" instead.....
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 5th May 2003 02:26
Ok, thankyou Chiwawa, but why the abs(letter)?

I hear and I forget. I see and I remember. I do and I understand.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 5th May 2003 02:48 Edited at: 5th May 2003 02:49
mousemovex is the DIFFERENCE between last mouse co-ord and current mouse co-ord, so if you move mouse left 3 pixels, the mousemovex command returns -3. As you are only testing positive values your condition fails.

abs just turns negative values to positive values.

Gronda, Gronda
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 5th May 2003 02:55
ok thankyou.

I hear and I forget. I see and I remember. I do and I understand.

Login to post a reply

Server time is: 2024-11-24 13:05:32
Your offset time is: 2024-11-24 13:05:32