Last active
October 12, 2015 02:08
-
-
Save aaroneaton/3955567 to your computer and use it in GitHub Desktop.
AppleScript:Become avaliable on Microsoft Lync
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
-- Save your current application | |
tell application "System Events" | |
set currentApp to name of 1st process whose frontmost is true | |
end tell | |
-- Bring Lync to the front so we can use the menu | |
tell application "Microsoft Lync" | |
activate | |
end tell | |
-- Set your status to 'Available' | |
tell application "System Events" | |
tell process "Microsoft Lync" | |
tell menu bar 1 | |
tell menu bar item "Status" | |
tell menu "Status" | |
click menu item "Available" | |
end tell | |
end tell | |
end tell | |
end tell | |
end tell | |
-- Return to your previous application | |
tell application currentApp | |
activate | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment