Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is it possible to have app launcher(Alfred or Spotlight) to launch a new instance of an app(Finder, Terminal) instead of taking me to existing instance?

I know this question: How to make clicking on icon in dock == open new instance addressed an issue for the Dock, but is there a way to achieve the same with app launchers?

share|improve this question
1  
Finder is a "special" app and I doubt you'll want to get two running even of it works from terminal, but the general case is amenable to scripting open -n app. Does that suit your needs? –  bmike Sep 2 '12 at 9:51

1 Answer 1

up vote 3 down vote accepted

Windows of applications aren't normally called instances on OS X. You can open new instances with open -n, but there's no way to do that from the UI. Applications with multiple instances also have multiple Dock icons.

If you actually meant that, you could add an action for it in Alfred:

There's no standard way to open a new window with open or AppleScript though. You'd have to use different terminology for each application.

on alfred_script(q)
    tell application (q as text)
        activate
        if number of windows is 0 then
            reopen
        else
            if name is "TextEdit" then
                tell application "TextEdit" to make new document
            else if name is "Finder" then
                tell application "Finder" to make new Finder window
            else if name is "Safari" then
                tell application "Safari" to make new document at beginning with properties {URL:"about:blank"}
            end if
        end if
    end tell
end alfred_script
share|improve this answer
    
Thank you for the explanation :) and for the awesome script! –  Alex N. Sep 2 '12 at 15:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.