MouseHideQuestion

Is there a way to hide the mouse until it moves, and then show it until it is still for a time?
if (MouseActor.directional_velocity==0)
{
CreateTimer("Event Actor", "MouseHide", 20000);
}
else if (MouseActor.directional_velocity!=0)
{
//destroys the timer so it dosent hide after you move the mouse
DestroyTimer("MouseHide");
VisibilityState("Event Actor", ENABLE);
}