Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Remote photoshop scripting over SSH

$
0
0

I'm trying to get AppleScript scripts to execute on a remote rendering server over SSH (using the osascript command line utility). However, whenever I try to do most anything, I get various Photoshop and/or AppleScript errors that I never get when trying to run the exact same scripts locally. Ultimately, I'm trying to execute a JavaScript file passing JSON arguments from Applescript, called over SSH. Please forgive the verbosity introduced by the simple initial example.

 

Server: OS X 10.8.5

Photoshop: CC 2014

 

I see the same type of errors whether I SSH into a server and do the following manually in a shell after logging in, or feed a command to SSH to execute directly (e.g., ssh user@host 'osascript /path/to/script.scpt'). Starting from a basic example, I tried running the following AppleScript snippet. I tried entering it into osascript by hand via stdin, as well as writing it out to a file and calling it remotely. Both resulted in no new file being created, but a success message.

tell application "Adobe Photoshop CC 2014"

     make new document

end tell

No matter how I try to run this remotely, I get the response "document Untitled" from osascript, and Photoshop pops up an error dialog: "Could not complete your request because of a program error."

 

More specific to what I'm trying to do, I've got the following code:

tell application "Adobe Photoshop CC 2014"

     with timeout of 30 seconds

          do javascript("/path/to/local/file.js") with arguments ({"{\"json\": \"document\", ...}"})

     end timeout

end tell

When I try to run this locally, I never have a problem. But when I run it over ssh (again, either from the command line or by passing the command directly to ssh), I always get the following:

script error: Expected end of line but found identifier. (-2741)

In addition to osascript stopping with that error, Photoshop also pops up the same error dialog: "Could not complete your request because of a program error."

 

Anyone have any suggestions or thoughts with regard to how I can get all this working?

 

Thanks,

Brian


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>