Can a macro tell if it has been asleep?
Moderators: JRL, Dorian (MJT support)
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Can a macro tell if it has been asleep?
If a compiled macro (e.g. one that collects or sends data at regular intervals) is running on a PC that goes into sleep or hibernation mode, is there any system way for it to recognize that when it starts running again? Of course it could be constantly checking the previous timestamp but I'm wondering if there is a more sophisticated solution.
Is this what you're NOT looking for? It works, and its not very sophisticated.Of course it could be constantly checking the previous timestamp but I'm wondering if there is a more sophisticated solution.
Code: Select all
VBSTART
VBEND
Label>Loop
VBEval>timer,first_time
Wait>1
VBEval>timer-%first_time%,second_time
If>Second_Time>10
MDL>Second_Time=%Second_Time% I must have been sleeping.
EndIf
Goto>Loop