2 ## this scirpt works together with Quicksilver
3 ## copy/link this file to ~/Library/Application Support/Quicksilver/Action
4 ## and set a toggle event on Quicksilver preference
5 #tell application "System Events"
6 # tell application process "Emacs"
11 # tell application "Emacs" to activate
16 ## http://brettterpstra.com/2011/01/22/quick-tip-applescript-application-toggle/
17 set appName to "Emacs"
19 tell application "System Events"
20 if not (exists process appName) then
22 else if frontmost of process appName then
23 set visible of process appName to false
25 set frontmost of process appName to true
29 tell application appName to activate