Copy link to clipboard
Copied
I ran the following JSX from a Mac OS Photoshop custom HTML extension panel
So the app.system works, and I'm able to run CLI commands, but thus far unable to retrieve stdout results.
Copy link to clipboard
Copied
Run Your binaries from HTML panel as standard NodeJS chidprocesses. Leave that old mastodon .jsx for the unavoidable tasks.
Copy link to clipboard
Copied
Yes, works great, but was curious if there might also be an option in the JSX/ExtendScript context.
Copy link to clipboard
Copied
Please try this, from: Re: Change foreground color according to clipboard
function getSystemCommandStdout (command)
{
var stdout = "";
var tempFile = new File (Folder.temp + "/temp.txt");
app.system (command + " > " + tempFile.fsName);
if (tempFile.open ("r"))
{
stdout = tempFile.read ();
tempFile.close ();
tempFile.remove ();
}
return stdout;
}
var result = getSystemCommandStdout ("curl -A 'UserAgent' -d 'ThisParam=ThatValue' '[Path-To-Hosted-Php]'";
$.write (result);
HTH,
--Mikaeru