Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A better way to activate menu items from AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A better way to activate menu items from AppleScript
Authored by: dcottle on Nov 30, '10 12:05:38PM

Wonderful hint.

How would you indicate the Finder's Apple menu? I've been looking for a way to engage the recent items for quite some time.

Also, when running

tell application "Finder" to activate
tell application "System Events"
click menu item "Size" of ((process Finder)'s (menu bar 1)'s
(menu bar item "View")'s (menu "View")'s
(menu item "Arrange By")'s (menu "Arrange By"))
end tell

I get this error: The Variable "Finder" is not defined. Should it be in Quotes?

Also, this code:

tell application "System Events"
click menu item "Size" ¬
in menu "Arrange By" of menu item "Arrange By" ¬
in menu "View" of menu bar item "View" ¬
in menu bar 1 of process "Finder"
end tell

gives an error for ";". Is this a typo?



[ Reply to This | # ]