Programatically open file in already running application

Hi. I’m frequently opening aseprite files through the command line. But if i open multiple files it will also create multiple aseprite processes. Is it possible to tell an already running process to open another file?

Thx so much for the help!

Not sure if it helps, but you can open multiple files with aseprite by using this:

aseprite “File 01.ase” “File 02.ase”

And they will be opened in just one instance of the program.

Anyway, I’m also interested in what lazybensch asked, so if any kind soul could tell us I’d be grateful :slight_smile:

Edit: Are you using Windows?

1 Like

Thx for the help so far. I am on Mac but I’m writing a unity plugin that I would like to work on all platforms. One feature of that plugin is that you can open .ase files from within the unity editor but the way i currently do it, it always opens another instance of aseprite.

When you use the “aseprite” command, that launches the aseprite process, that’s just how command line stuff works. Although it is possible for Aseprite to include code to auto-merge multiple instances, if you just need to open an .ase file, then asking the OS to open it with the program associated with it (by launching the file itself from the CLI) would probably be better, as it would allow the user’s OS and Aseprite preferences to determine the behaviour (e.g. if they prefer to use another program to open .ase file), rather than your preferences.

1 Like