Skip to content

Instantly share code, notes, and snippets.

@aaroneaton
Last active October 12, 2015 02:08
Show Gist options
  • Save aaroneaton/3955567 to your computer and use it in GitHub Desktop.
Save aaroneaton/3955567 to your computer and use it in GitHub Desktop.
AppleScript:Become avaliable on Microsoft Lync
-- 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