How can I get an dock icon to launch a program multiple times?

3

2

I want to launch a program (Eclipse IDE, in this case), but I want to be able to launch multiple instances of it. I'm running Mac OS X 10.5.

I can add a script to the dock, which does this, but it has 2 drawbacks

  • it opens a console
  • it doesn't have the right icon.

How can I go about this, either fixing those drawbacks or by configuring the application better?

mike g

Posted 2009-11-07T16:34:34.017

Reputation: 133

Answers

2

You can get info on Eclipse, click on the icon, copy it, get info on your script, click on the icon and paste.

As for your script opening console that sounds like you have a shell script saved as a command file. You can use AppleScript to call a shell script, and then save that AppleScript as an application which you can drop in the dock.

Using pkaeding's command, your entire applescript would be:

do shell script "open -n /Applications/eclipse/Eclipse.app"

You can also just open an existing shell script file (.sh) from Applescript which will have the same effect. More here.

ridogi

Posted 2009-11-07T16:34:34.017

Reputation: 2 787

1

I'm not sure about a dock icon, but when I need to open two instances of Eclipse, I use the following command in a terminal window:

open -n /Applications/eclipse/Eclipse.app

The -n flag says to open a new instance, rather than switch to the currently running one.

pkaeding

Posted 2009-11-07T16:34:34.017

Reputation: 1 420