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.
Gronda, Gronda