Skip to content

Instantly share code, notes, and snippets.

@jwalanta
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwalanta/eb45147bdcba413ee4bb to your computer and use it in GitHub Desktop.
Save jwalanta/eb45147bdcba413ee4bb to your computer and use it in GitHub Desktop.
Applescript to get Microsoft Lync Status
--
-- Microsoft Lync Status
-- - Returns current Microsoft Lync status, if running
--
-- @author Jwalanta Shrestha <jwalanta@gmail.com>
--
if application "Microsoft Lync" is running then
tell application "System Events"
tell process "Microsoft Lync"
# loop through all possible windows
repeat with x from 1 to 100
try
set status to title of menu button 1 of window x
return status
on error errMsg
# pass
end try
end repeat
end tell
end tell
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment