Last active
March 15, 2017 09:23
-
-
Save stephanschuler/b2ac9318d1d96311a8ef527e441b3950 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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