ugol / pomodoro

Time management for your Mac
http://pomodoro.ugolandini.com
881 stars 238 forks source link

Mute/unmute via applescript? #306

Open wc8 opened 9 years ago

wc8 commented 9 years ago

I can use the following to toggle mute sound, but as far as I can tell, it won't check if the sound is already muted or not muted.

tell application "Pomodoro" to start pomodoroName duration workLength break breakLength tell application "System Events" tell application "Pomodoro" to activate key code 29 using {command down, control down, option down} end tell

Is there a way to tell the app to "mute" or "unmute" specifically? For example, • applescript "studying" starts a pomodoro and tells it to mute sound (no ticking noise) • applescript "housework" starts a pomodoro and tells it to unmute sound (ticking noise) • applescript at the end of a session unmutes sound (default ticking noise)