Skip to content

Instantly share code, notes, and snippets.

@paulbjensen
Created October 1, 2022 13:39
Show Gist options
  • Save paulbjensen/e01afbb86fdf45089cff14935d5177a7 to your computer and use it in GitHub Desktop.
Save paulbjensen/e01afbb86fdf45089cff14935d5177a7 to your computer and use it in GitHub Desktop.
Set slack status with AppleScript in Apple Shortcuts
-- Sets the status to Pomodoro
on run {input, parameters}
tell application "Slack 2"
activate
end tell
tell application "System Events"
-- Set status keyboard shortcut
keystroke "y" using {shift down, command down}
-- Would be great to do the following:
-- - Clear the previous status
-- - Set the avatar
-- - Set time to exactly 25 minutes to clear
delay 1
-- keystroke "a" using { command down }
-- delay 0.5
-- key code 51 -- Backspace
-- delay 0.5
-- keystroke ":tomato: Pomodoro"
-- delay 0.5
key code 48 -- Tab key
delay 0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment