Skip to content

Instantly share code, notes, and snippets.

@stephanschuler
Last active March 15, 2017 09:23
Show Gist options
  • Save stephanschuler/b2ac9318d1d96311a8ef527e441b3950 to your computer and use it in GitHub Desktop.
Save stephanschuler/b2ac9318d1d96311a8ef527e441b3950 to your computer and use it in GitHub Desktop.
try
tell application "System Events"
tell process "Telefon"
if menu item "Mikrofon an" of menu 1 of menu bar item "Anruf" of menu bar 1 exists then
set frontmost to true
click menu item "Mikrofon an" of menu 1 of menu bar item "Anruf" of menu bar 1
else
if menu item "Mikrofon aus" of menu 1 of menu bar item "Anruf" of menu bar 1 exists then
set frontmost to true
click menu item "Mikrofon aus" of menu 1 of menu bar item "Anruf" of menu bar 1
end if
end if
end tell
end tell
on error errorMessage number errorNumber
display dialog "ERROR: " & errorMessage
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment