
Oct 14, '09 07:30:04AM • Contributed by: DarthMagnus
tell application "System Events"
key code 99 using control down -- ctl-F3 to focus on Dock
keystroke "Applications" -- should take focus to Applications folder
key code 36 -- hit Return to open stack
end tell
Once the Stack opens, you can type in the first few letters of an application and hit return to launch it. The script itself is fully compatible with 10.5 as well, but assigning it to a keyboard shortcut natively is not. The following bit is 10.6 only.Now open Automator and make a new Service. Select no input from the 'Services receives' drop-down menu. Drag in the Run AppleScript action, paste in the above code, and save. You can assign your new Service a keyboard shortcut under System Preferences » Keyboard » Keyboard Shortcuts » Services; it should be listed under the General section.
There are a couple of drawbacks to this method. First, it's not quite as fast as I would like (Automator seems to slow things down for some reason), and also, you have to be sure to release the keyboard after you enter the shortcut, or the keys you are holding down will affect the script. Fairly obviously, it doesn't replace most of the functionality that Butler and Quicksilver have, just a small portion of it.
You can use this for any stack in the Dock. Just keep in mind that the Stack has to have a unique name, since AppleScript is typing the name of the folder to access it. So if you had a Stack called Mail, the script would open the Mail application (if you have it in the Dock) instead. Hope this helps some people while we wait for our favorite launchers to catch up to 10.6