|
|
Updated for 10.6
I could not get any of the posted solutions to work in 10.6, but the following modified AppleScript Service works for me.
Start Automator, choose Service and set it to receive "no input" in "any application". Paste the following into the script editor:
It should be obvious how to modify the script to deal with programs where the menu item is not called "Open Recent", or where it is not located in the "File" menu.Add a shortcut for the service and you are good to go!
Updated for 10.6
In 10.6, the following more congenial script seems to work:
Updated for 10.6
Thanks for the reply, yours is a much more elegant solution. But I had to use
instead of
Otherwise the script just activates "Recent Items" in all programs. Unfortunately, this breaks the desired behavior in Finder (and also in a different application I use often, which has two different open recent items). But this should be easily fixed with an exception for these two programs.
Updated for 10.6
I'm confused - every app I've tried this on returns only one item (either 'open recent', 'recent items', or in the Finder's case 'recent folders'). what app has more than one of these?
Updated for 10.6
When I execute the script as you wrote it, it just activates "Recent Items" (located under the menu with the logo). Maybe this menu item has a different name on your machine? If you use a non-english localized this might be the explanation.
Updated for 10.6
Ah, I get it. I have Recent Items disabled in my Apple menu, so I forgot it was there. That's easily fixed, however. just change line 5 to say:
repeat with idx from 2 to count of itemList The '2' causes the script to skip over the Apple menu and start with the first application-specific menu. You could even use '3' if you wanted (a recent items list is not likely to occur before the File menu).
Updated for 10.6
Thanks, it works great now!
In the script I use, I will probably also add an exception to TextMate, since for some strange reason it takes the script about 5 seconds to locate the open recent item in the menu bar (I had this issue with my original script as well). So for users of TextMate, I would suggest adding the following
It ins't pretty, but beats waiting for 5 seconds.
Updated for 10.6
That's interesting: I wonder what causes that delay? you might try adding the line <tt>set quit delay to 0</tt> somewhere in the System Events tell block - that tells System Events to stay open all the time so that you don't get startup delays on the next invocation.
Updated for 10.6
Adding "set quit delay to 0" didn't change the behavior. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|