When you manually restart Mac OS, it displays a checkbox allowing you to select or deselect "Reopen windows when logging back in." (And it remembers this selection, I'm pretty sure.)
When you use KM's "Restart Computer" action, it seems to default to windows reopening, without giving you another option, which is a problem if you prefer windows being closed upon restart.
Is there any way around this?
Hi, @alexcr. I'm using:
• Keyboard Maestro 10.2
• Sonoma beta 14.1 (23B5056e)/MacBookPro16,1
This works for me.
Select or Show a Menu Item.kmactions (720 B)
Thanks, Jim! And I suppose you can add a "Return" keystroke action at the end of this if you want to skip through the dialogue that follows and head right into the restart?
You could probably do that. I usually use AppleScript for that kind of automation. This works for me:
tell application "System Events"
tell application process "loginwindow"
repeat until exists button "Restart" of window 1
click button "Restart" of window 1