3 Replies Latest reply on Apr 18, 2017 2:26 AM by Mikaeru69

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

    Premiopolis Level 2

      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.