I want my email app to be only available between say 9-9:30 am and again between say 5-5:30 pm.
Any other time email app is launched KM will immediately quit it. Duh!
This is designed to make it a pain to check emails outside these time slots.
Any suggestions as to how to create such a macro?
Wow that was easy! Did not think down that route so thank you.
1 Like
Hi @michael_gilbert, I had created the solution of @hello, but then I realized that I could call my KM palettes but they did not trigger any actions while the mail time macro was running.
So I made an AppleScript and created it as an app. Additionally I can choose in a popup how long the mail app should run. Of course it works with any other app, too.
In this tutorial (unfortunately in German) from minute 02:50 you can see my workflow.
tell application "Mail"
launch
activate
tell application "System Events" to tell process "Mail"
keystroke "1" using {command down}
delay 3
tell application "System Events"
activate
set theTime to text returned of (display dialog "How long should the mail app remain activated?" with title "Apple Mail" default answer "" buttons {"Cancel", "Start"} default button 2)
delay theTime * 60
tell application "Mail" to quit
end tell
end tell
end tell
1 Like
Thanks for that. Watched and will re-watch! 