Determining if computer has just woken up

From: Xmas ([email protected])

I have a batch script that is set to run every couple of hours to get my
email and check it for spam. However, I don't want it to do this if I'm
actually using the computer at the time.

Is there any way I can detect that the computer has recently woken from
standby, or whether there has been any recent keyboard / mouse input?

Cheers

Share |