Posted: 4th May 2003 16:04
Nothing much, but this will close your program if a mouse button is clicked, or a key is pressed, or if the mouse is moved.
Posted: 4th May 2003 17:29
cool.Thanks
Posted: 5th May 2003 2:38
Changed it a bit.
Posted: 5th May 2003 2:49
heh how many times you gonna come up with one of these. oh well. this one i might use over mine it seems to work better. thx
Posted: 5th May 2003 2:58
Hehe Armeggadon.

Improved it again, thanks to Sonic and Chiwawa for explanations etc.
Posted: 5th May 2003 3:30
I think me and Chiwawa have confused you a bit. You don't need my idea AND his idea as they are both different ways of doing same thing. Chiwawas is easiest though, i.e.

or X <> 0 or Y <> 0 or Z <> 0

this caters for whatever direction you move mouse in. My abs thingy was just to point out to you why your code would not work.

A good reason for using the abs thing though is to stop program exiting if you have a sensitive mouse that moves a pixel or two by itself, or you knock the table, then you can do something like:

or abs(X) > 2 or abs(Y) > 2 or abs(Z) > 2

this will mean only if you move mouse more than 2 pixels in any direction.
Posted: 5th May 2003 5:45
yeah...cause with my method..if you run close to your computer..mouse will move..and stop the..prog..

then sonic's method is..better...in fact not better..but depend.what you want..

you can also use:

if ((X = 0)=0)

or

if (((X <> 0)=0)<>1)

or anything you love



but the best way is in 1 line
+ Code Snippet
sleep 2000
repeat:until MouseMoveX() + MouseMoveY() + scancode() + mouseclick()