Do you want the macro to run continuously? If so, I believe the only way to do that would be to use the macropump, which runs 10 times per second. You can't turn it on and off, except to toggle it in General Config.
I guess you can check the position two times, and compare the results. You may need a small delay (sleep(10) maybe?) in between the two checks, as the macro may run too fast to detect the movement.