Jump to content
Macro Express Forums

Macro activation after suspend


david462

Recommended Posts

I use a netbook for which it is convenient to enter suspension mode between uses. I would like to run a ME macro when I take the netbook out of suspension. The Activate dialog lets me run a macro when I restart the computer but seems to offer no option to run a macro when I take the computer out of suspension (or, for that matter, hibernation).

 

Any ideas on how I can do this with 3.7a? If not, can I do it with ME Pro?

 

David

Link to comment
Share on other sites

You could schedule your macro to run every ten seconds, more or less. First thing the macro does is check what time it last ran. If less than a minute or two since it ran, record the current time (maybe in a file, or an environment variable), and exit with no other action. If more than a couple minutes since it last ran, then assume the long delay was due to suspension or hibernation, so record the current time and do whatever else you want it to do.

 

Someone else may have a more elegant method, but the above should work with either ME3 or ME Pro.

Link to comment
Share on other sites

I use a netbook for which it is convenient to enter suspension mode between uses. I would like to run a ME macro when I take the netbook out of suspension. The Activate dialog lets me run a macro when I restart the computer but seems to offer no option to run a macro when I take the computer out of suspension (or, for that matter, hibernation).

 

Any ideas on how I can do this with 3.7a? If not, can I do it with ME Pro?

This is easy to do using MEP, but impossible with ME3. I just wrote a macro which is activated when a system event (incoming message=WM_POWERBROADCAST, WParam=7, LParam=0) occurs. In Windows 7, the macro runs if I resume from sleep or hibernation. There's another message (resume after standby) which I have been unable to get to work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...