• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

app.system: Is there a way to retrieve the results, the stdout, of this command

Enthusiast ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

I ran the following JSX from a Mac OS Photoshop custom HTML extension panel

function RunSomeCli(Cmd){

  return(app.system(Cmd));

}

//Run some PHP and retrieve the results:

RunSomeCLi("curl -A 'UserAgent' -d 'ThisParam=ThatValue' '[Path-To-Hosted-Php]'");

//Returns 0.  That's it.

//Then ran a test whether app.system works at all with this curl to download a file

RunSomeCli("curl -A 'UserAgent' -o '/[PathToLocalDestFile].txt' 'http://[PathToHostedFile].txt'");

//also Returns 0, but executes the download successfully.

So the app.system works, and I'm able to run CLI commands, but thus far unable to retrieve stdout results.

Views

394

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 07, 2017 Apr 07, 2017

Ask in this in Photoshop Scripting

Votes

Translate

Translate
Adobe
Community Expert ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

Ask in this in Photoshop Scripting

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines