Skip to content

Instantly share code, notes, and snippets.

@lockieluke
Last active April 4, 2024 14:23
Show Gist options
  • Save lockieluke/9c7bead14114ecbfc52272608ac87714 to your computer and use it in GitHub Desktop.
Save lockieluke/9c7bead14114ecbfc52272608ac87714 to your computer and use it in GitHub Desktop.
Apple Script for pausing/resuming active primary timer on macOS with the Clock app
tell application "Clock"
activate
end tell
tell application "System Events"
tell application process "Clock"
tell window 1
# Go to Timers, 1 = World Clock and so on
click radio button 4 of radio group 1 of group 1 of toolbar 1
# button 2 is pause, button 1 is cancel
click button 2 of group 2 of group 1 of group 1 of group 1 of group 1 of group 1 of group 1 of group 1 of group 1 of group 1 of group 1 of group 1 of group 1
click button 1
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment