How to launch a single instance of an external application


#1

I’m trying to open multiple files in multiple calls to a single instance of the same application. For example, I’m launching Photoshop and specifying the file to open and then later, open a different file with Photoshop. I’ve been using execFile, but each call of execFile creates a new instance of the same external application. How do I get to use the currently executing external application to open the next file?


#2

I think the classic solution to this kind of problem is to use an external tool to do the right thing. On a mac it’d probably be something like

open -a Photoshop <path to file>

And the OS/application would sort out the right behavior. Another concrete example:

atom <directory or file>

on the mac will use the same instance of atom as is already open. So I kinda don’t think this is so much an Atom/node issue…