Philip Young
Session automation on Mac is powered by AppleScript. This means you need to understand a bit of code to unlock it's full potential. If you don't know about Session automation yet, you can learn more from Automate your workflow with Session Automation.
If you don't want to dabble with code and just want to turn on Do Not Disturb on and off—follow this guide to turn on/off Do Not Disturb with Session.
If you're up with the challenge, you can learn to write your first AppleScript.
Now, let's dissect how to integrate AppleScript you wrote or download with Session.
It's now possible to use Apple Shortcuts (the same one on iOS) on Monterey on above. This way you can share the shortcut between macOS and iOS. Take a look at here.
There's 5 scenarios where automation ran. They are:
session_start.scpt
session_pause.scpt
session_unpause.scpt
session_went_too_long.scpt
session_end.scpt
break_start.scpt
break_went_too_long.scpt
break_end.scpt
session_end
or break_end
not called. Example, from abandon Session : stop_working.scpt
p.s. .scpt
is a file extension for AppleScript (like .mp3
for Music).
What you probably use is session_start
, session_end
, stop_working
and possibly break_start
.
Session will run AppleScript you've made if the script with matching file name above exists on Session script folder. Otherwise, it'll be ignored.
You can put the script you've wrote, rename the script while filename above (refer to #1) inside Session's user script folder (you can open the folder location by clicking a button on Session's setting page).
Move the script you have wrote / download to com.philipyoungg.session
folder below:
Preferences
> Automation (AppleScript)
,Session start
checkbox,Stop working
checkbox,Test session Start
,Test stop Working
,If it didn't ran, make sure you have put the script in correct location. Refer to screenshot above. Otherwise, you can contact me on my email
Congratulations! Now you've automated your workflow based on Session current state
!