Wake Screen

I've been trying to create a macro that will go into effect at a set time in the middle of the night, when my computer and I are both asleep. The function will be to wake the computer, compose an e-mail message and send it. The macro I've created does everything successfully except hit Send.

I'm new here, and am not sure how best to present what I've got so far in order to get help completing the macro.

Hey @philxm,

Welcome to the forum!   :smile:

You'll need to post your macro to the forum, so we can evaluate and test.

How to Post Your Macro to the Forum

If you can't post the entire macro please pare it down to the bare minimum working macro.

The easier you make it for people to test your macro, the more likely you are to get quality help.


KM macros won't run when the Mac is asleep. So you'll need another tool to first wake the Mac, and then your Macro can run (maybe using the on wake trigger).
There are several tools that do this. You can search the KM Forum to find some examples.

I have a step in there to Wake Screen at a particular time. Is that not sufficient?

Using bogus To and From addresses:

Contact Tracing mail copy.kmmacros (2.8 KB)

"Wake Screen" and "Wake Mac" are two entirely different things.
If your Mac is "asleep" in the middle of the night, then you will need to "Wake Mac".
There is no KM Action for that because KM Macros cannot be triggered when the Mac is asleep.

See this thread:

I was hopeful that JMichael's reply would help me over this hump, but when I checked my Energy Saver preference it turns out that (largely by coincidence) it's set to "Start up or wake" each Monday at 815a, in other words shortly before the macro is set to go into effect.

Not being up at that time myself during Covid I haven't been watched what takes place, but I leave my computer running nearly all of the time, meaning that Michael's issue with waking up from sleep should not be in effect here.

That said, his comment has prompted me to realize that I can set my macro to take effect at a time when I'm watching it, which might help me see where it fails. If not, though, I'll be back here in search of another reason for my failures.

Meanwhile, I've gone and deleted Wake Screen from the macro. For the heck of it, what does Wake Screen do?

I have come here, because of a similar issue. I found the solution in your last question and am happy to answer it for anyone following us:

I wanted a macro to run (with image detection in the UI and all that) when I am probably not using the computer. I have tested it even with a locked screen, the password input from the keychain was working. But when it was supposed to run "in production" at 7am it always failed

Now I have realized, that the "Stop Screensaver" command wasn't enough after the Mac had been unattended for several hours. By then, it had not gone to sleep itself, but had turned off the display and HDMI output. That is why the UI macro wasn't working and that is what "Wake screen" seems to do, it reactivates that system.

Funnily enough, on my Dell it also works even if the screen is actually off. I guess reactivating the display output is what it takes to make it work


1 Like