Here is a Keyboard Maestro question for you. Say you want to start your computer at different times during the week using KM’s time trigger. Where you set it at 10:00 am to trigger the energy system preference pane, select schedule, change the time and save. Is that possible? If so, you can have it perform different changes on different days, automatically.

Great question.
Unfortunately, KM can’t start your computer at different times. Your Mac has to be on in order for the KM Engine to work. So what I’ve done is, in Energy Saver set my computer to awake at 8:28 AM each morning, and then from there KM runs a few macros, such opening a few websites and bringing my 2Do application to the forefront. (See more ideas about this in my article, The Fastest Ways to Open and Quit Applications Beyond Your Dock)
KM can open System Preferences, and then trigger Energy Saver using the Move and Click action > found image, and another found image action to click the Schedule button. When the schedule window opens, KM can tab through the selection boxes to change the settings. A found image would also have to be used for selecting the Every Day button, and using a Type a Keystroke action to activate the down arrow key to selecting the day. And from there, KM tabs forward and inputs the numbers for the time.
I tried it out, but it needs a few tweaks in order for it run effectively each time. Let me know if you’re following what I’m describing. If it does work, you can set up the macro to run, using time triggers, at different times during the day. However you will probably need to duplicate and set up separate macros for the different schedules you want to run, because when you using the found image action, KM has to see that same action each time.
Here’s how the macro I set up looks:


I the course of writing my response to the above question, Kenneth, the Mac automator who asked it, sent me his solution to the workflow. His is better, because he found that KM includes a System Pane action that will open a selected item in your System Preferences, which negates the need for the found image action.
Here’s Kenneth’s workflow:
Keyboard Maestro Clipping (1∶03∶26 PM)
Thanks, Kenneth. Your input is a great example of the purpose of Ask Mac Automator, to share solutions to both common or complex automation hacks.

Your Thoughts?

Have you tried a similar workflow as this one? If so, please share it with us.

You have an Ask Mac Automator question? Post and send the question here, and if it’s useful for other readers, I will post it in this column.


Is this article helpful?