I have an AppleScript that does a simple "mouse" click on the Dropbox menu bar icon (Menu Extra or Menulet). It works well.
tell application "System Events"
tell UI element "Dropbox"
tell menu bar item 1 of menu bar 2
perform action "AXPress"
end tell
end tell
end tell
I want to edit this code so the action that will be performed is a click while the Option (alt / ⌥) is pressed down.
I've done an extensive search for a solution but didn't find any.
Thanks in advance.
Best Answer
Using terms from the (FREE) AppleScript Toolbox scripting addition, this code will handle your question.
The code in this updated answer will automatically get the coordinates of the DROPBOX icon in the status bar... Whether it's location stays the same or changes
UPDATE
This is following version of the code will return the mouse to where its original location was before clicking on the Dropbox status menu icon