1 #tell application "System Events"
2 # tell application process "Emacs"
7 # tell application "Emacs" to activate
12 ## http://brettterpstra.com/2011/01/22/quick-tip-applescript-application-toggle/
13 set appName to "Emacs"
15 tell application "System Events"
16 if not (exists process appName) then
18 else if frontmost of process appName then
19 set visible of process appName to false
21 set frontmost of process appName to true
25 tell application appName to activate