System() command Dragging a file into another

Ok so Im trying to Auto run a photoshop droplet. I know the system() command is evil but its going to be used by me only.

I need it to work with WINDOWS

What I want to do is emulate draging fileA.psd onto fileB.exe
 
  system(" start test.psd test.exe");


That doesnt work.

I found that it is possible on MacOS(I want windows) with Ruby as seen from another thread on the internet

 
system("open -a fileB.exe fileA.exe")


Does anyone know how to do this? Ive searched high and low and found nothing :(
Last edited on
"test.exe test.psd"
Tried that it doesnt work :/

actually it seems that its a problem with photoshop after all Thanks.
Last edited on
LOL. That is how it works. When you drag a file onto an executable, the executable is launched with the file's full path as argument (as in, command line argument).

PhotoShop (and many, many other programs) know how to launch themselves and open the file given as argument.

I don't know what your "test.exe" is, but there is no magical ability given to executables to open random files. Just like, if you drag and drop a Word file on PhotoShop, it won't work, since PS doesn't know how to open Word files.

It also doesn't work if your program doesn't bother to understand command-line arguments.
I couldn't understand what you want but you can simply open .PSD file in windows if photoshop is already install it will be open.
If you want to open .JPG file in photoshop, first you choose the photoshop as a default program for .JPG

1
2
3
4
5
6
7
using namespace std;
#include <iostream>

main()
{
	system("c:\\123.psd"); // path of file in quotes
}


If you are looking anything else just tell me clearly.
Last edited on
Its based on droplets which require you to drag and drop a file onto it to execute a automated program.

Duoas even if that is how it works it doesnt work. Like I said in my post it might be a PS issue it throws a file not found error after PS launches it doesnt do this for png files.
Topic archived. No new replies allowed.