Copy link to clipboard
Copied
Hi,
Using Extendscript, how do you execute an external executable with arguments?
var myFile = new File("Path to app/app.exe 'arg1' 'arg2'"):
myFile.execute();
It doesn't seem to be supported.
Thanx
tm
Copy link to clipboard
Copied
File() isn't for executing other applications.
https://www.google.com/search?client=firefox-b-d&q=javascript+execute+exe+with+arguments
Or maybe it is possible to use File():
https://www.ps-scripts.com/viewtopic.php?p=138643&sid=be944028500c9f098ea14b19c48ebe77#p138643
Sorry, I'm not JS guy.
Copy link to clipboard
Copied
Possibly with bridgetalk, although I think that is specifically for Adobe products.
If you are on an apple machine, it might be possible by calling an applescript that then calls the executable.
Copy link to clipboard
Copied
Hi @tmmls , Do you mean you want to open a file in another Adobe application? If that‘s the case you would have to use a BridgeTalk object as @John D Herzog suggests.
Copy link to clipboard
Copied
If you don't mind technology hopping, you can take advantage of InDesign's VBscript:
ExtendScript >> VBScript >> Windows Script Host >> app.exe
E.g. to show a file in Explorer (that would be the external executable).
I wrote this for CS3 and haven't tested it in a while.
Otherwise, your File() could be a shell script or alike that passes on the parameters. Likely that would involve ugly terminal windows, though.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now