toledorodney

Applescript: Set Lync to 'available'

Aug 16th, 2015
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. -- Save your current application
  2. tell application "System Events"
  3. set currentApp to name of 1st process whose frontmost is true
  4. end tell
  5.  
  6. -- Bring Lync to the front so we can use the menu
  7. tell application "Microsoft Lync"
  8. activate
  9. end tell
  10.  
  11. -- Set your status to 'Available'
  12. tell application "System Events"
  13. tell process "Microsoft Lync"
  14. tell menu bar 1
  15. tell menu bar item "Status"
  16. tell menu "Status"
  17. click menu item "Available"
  18. end tell
  19. end tell
  20. end tell
  21. end tell
  22. end tell
  23.  
  24. -- Return to your previous application
  25. tell application currentApp
  26. activate
  27. end tell
Advertisement
Add Comment
Please, Sign In to add comment