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


Click here to return to the 'Updated for 10.6' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Updated for 10.6
Authored by: troelssj on Nov 04, '10 02:49:58AM
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

if (frontApp is equal to "TextMate") then
	tell process frontApp
		key code 120 using control down
		key code 124
		key code 124
		key code 125
		key code 125
		key code 125
		key code 125
		key code 125
		key code 124
	end tell
end if
It ins't pretty, but beats waiting for 5 seconds.

[ Reply to This | # ]
Updated for 10.6
Authored by: tedw on Nov 04, '10 08:21:56AM

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.



[ Reply to This | # ]
Updated for 10.6
Authored by: troelssj on Nov 04, '10 03:08:23PM

Adding "set quit delay to 0" didn't change the behavior.

I have noticed that after a few seconds, a rotating gear appears in the right side of the menu bar - where the wi-fi, bluetooth and speaker icons are located. I am guessing it indicates that the script is waiting for something to complete. Now that I think of it, TextMate has a rather complicated menu structure - one menu item has more than 40 subitems, all of which have many subsubitems. To make things worse, these items are related to various bundles, which can be changed by the user, so TextMate might have to rebuild the menu bar when the script asks for items containing the word "recent".



[ Reply to This | # ]