Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tell application "System Events"
- tell (first process whose frontmost is true)
- set helpMenuItem to menu bar item "Help" of menu bar 1
- click helpMenuItem
- end tell
- end tell
- tell application "System Events"
- tell (first process whose frontmost is true)
- set helpMenuItem to menu bar item "Help" of menu bar 1
- set searchBox to menu item 1 of menu of helpMenuItem
- if (searchBox's focused) = true then
- key code 53 -- type esc
- else
- click helpMenuItem
- end if
- end tell
- end tell
- tell application "System Events"
- tell (first process whose frontmost is true)
- set helpMenuItem to menu bar item "Help" of menu bar 1
- -- Use reference form to avoid building intermediate object specifiers, which Accessibility apparently isn't good at resolving after the fact.
- set searchBox to a reference to menu item 1 of menu of helpMenuItem
- set searchField to a reference to text field 1 of searchBox
- if searchField's focused is true then
- key code 53 -- type esc
- else
- click helpMenuItem
- end if
- end tell
- end tell
- tell application "Adobe Illustrator"
- activate
- tell application "System Events"
- tell process "Illustrator"
- set frontmost to true
- set activeMenuItem to enabled of menu item "Unlock All" of menu "Object" of menu bar item "Object" of menu bar 1
- if activeMenuItem is true then
- tell me to beep 3
- else
- tell me to beep 2
- end if
- end tell
- end tell
- end tell
Add Comment
Please, Sign In to add comment