0
votes

I get a very strange behavior with a very simple Applescript, attempting to run a JavaScript in Photoshop CC 2014. the script reads:

tell application "Adobe Photoshop CC 2014"
    activate
    do javascript "/Applications/Adobe Photoshop CC 2014/Presets/Scripts/scalefile.jsx"  with arguments {"1000", "true"}
end tell

On one machine, running OSX 10.10.5, I get a compile error "Expected end of line, etc. but found identifier", and none of the tricks I found online got to fix it.

On another machine, running OSX 10.9.5, the same script compiled without complaints.

Am I missing something, or is the installation on the 10.10.5 machine somehow messed up?

Any hint and advice on how to rectify this situation is highly appreciated.

1

1 Answers

0
votes

If you are compiling the same AppleScript code on different versions of OS X, you are using a different version of the AppleScript compiler in each case, and therefore you are going to see different bugs as the different compiler interacts with the same AppleScript code and the same Photoshop 2014. It is very common for an operating system upgrade to break the AppleScript in a Mac app, especially an Adobe app, which is primarily a cross-platform Adobe app and only a Mac app as an afterthought.

The actual solution to this is “use OS X 10.9.5 with your Photoshop 2014.” Ideally, you would only use your Adobe software on the specific version of Mac OS X for which it was designed and upon which it was tested. It would be nice if Adobe software was higher-quality than that, but it is not, and it has not been since at least the Macromedia acquisition. If you are dedicating a Mac to run Adobe software, don’t think of it as a Mac — think of it as an Adobe Creative Cloud computer that happens to use a particular version of Mac OS X as its bridge to the hardware. Instead of upgrading the OS when a new OS is available, upgrade the CC and the OS together when a new CC is available. In short: if you are an Adobe CC user, follow Adobe CC upgrade timing, not Apple or OS X timing. Or you have to put up with these kinds of bugs in AppleScript, in UI, in Java-related stuff. That is very common with Adobe software.

Historically, the above is what has been done not only in graphics studios but also music studios and video studios. If you have a Photoshop workstation or Pro Tools workstation or Final Cut workstation, the operating system that they are running should be the one that specific version of Photoshop or Pro Tools or Final Cut specifically wants. Because even small bugs can be catastrophic time-sinks in a studio setting, and an operating system upgrade is equivalent to destroying the entire computer and building a new computer using the hardware parts of the old computer and the installer for the new OS. What you get at the end of that is anybody’s guess. Apple doesn’t know. Adobe doesn’t know. And we are right now in a time when Apple is having massive software quality problems as well, and Yosemite is the most unreliable version of OS X ever. So there has never been a better time to be conservative about OS upgrades.