September 23, 2009

AppleScript compatibility with Photoshop on Snow Leopard

Photoshop scripting expert Jeff Tranberry has passed along some useful info:

If you’re using AppleScript to automate Photoshop on Mac OS X 10.6 (Snow Leopard), you’ll want to update the Adobe Unit Types.osax scripting addition.

The Adobe Unit Types.osax file that ships with Photoshop CS4 and CS3 is a 32-bit component. Snow Leopard requires some scripting environments to be 64-bit.

Please see the following Knowledge Base article for additional details: Error about unit type conversion occurs when you run an AppleScript in Photoshop (Mac OS X 10.6)

Posted by John Nack at 7:12 AM on September 23, 2009

Comments

  • yung kim — 1:45 PM on September 23, 2009

    apple user must be retarded to play this game.
    any other intelligent people would leave the playground.

  • Caleb Clauset — 3:05 PM on September 23, 2009

    As I commented in the actual technote, why isn’t replacing the osax file the first suggested solution? And someone needs to correct the spelling (“authenticate” not “authente”).
    [Thanks for the catch. Doc now updated. 9 minutes from comment to fix! :-) –J.]

  • jeffrey Tranberry — 8:28 PM on September 23, 2009

    We also added a note that a restart of the computer is necessary for the change to take affect.

  • Kevin — 6:07 AM on September 24, 2009

    Is this related to these error messages I get in system.log on 10.6:
    Sep 24 08:43:28 osascript[30432]: Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:\n /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
    I’m not using any applescript with PS….but I randomly get this error showing up in Console.
    -Kevin

  • Mario — 6:37 AM on September 24, 2009

    @Adobe: Millions dollar with adobe products are earned. What all day long do the programmers make? A dishonor is that. I say it reluctantly, but that is not which I of adobe would have expected. You should you being ashamed!
    And which is with applescript? Hey, I wants to work on pictures and any scripte not start before I CS4 starts!

  • James Hastings-Trew — 6:23 PM on January 05, 2010

    I’ve replaced the Adobe Unit Types.osax file with the 64bit one, and now a different error shows up when I run any applescriptable application “Cannot find executable for CFBundle 0xxxxxxx (not loaded)” and then a second error saying it “declares no loadable handlers.”
    What are the ramifications of simply creating the symlink to dev/null ? Does something in Photoshop break?

    • Jonathan Morgan — 10:41 AM on October 30, 2010

      Hello,

      I ran into the same problems. In my case, the issue was with the extended attributes, ownership, and permissions on the updated ScriptingAddition. If you go to /Library/ScriptingAdditions:

      1) do an ls -al to check if the quarantine attribute is set (you’ll see an “@” after the permissions).
      – if so do ls -al@e to see if the attribute is com.apple.quarantine
      – if so, run this:
      sudo xattr -d com.apple.quarantine ./Adobe\ Unit\ Types.osax/

      2) check ownership. Should be owned by your user and group of admin. If not:
      sudo chown -R Adobe\ Unit\ Types.osax/

      3) check permissions. Should be 775. If not:
      sudo chmod -R 775 Adobe\ Unit\ Types.osax/

      After getting attributes, permissions, and ownership set up right, I stopped having problems, didn’t have to remove or /dev/null the addition.

      Jonathan Morgan

      • Jonathan Morgan — 10:42 AM on October 30, 2010

        in the above, vsudo chown -R Adobe\ Unit\ Types.osax/

        Should read

        sudo chown -R your_user Adobe\ Unit\ Types.osax/

        I put it in greater-than and less-than and it got stripped out as an HTML tag.

        • N Furia — 9:44 AM on May 09, 2011

          In the step 1 above, it is safer to remove the com.apple.quarantine attribute from all the directory (recursively):

          sudo xattr -d -r com.apple.quarantine ./Adobe\ Unit\ Types.osax/

  • bryan — 6:00 PM on January 30, 2010

    1/30/10 3:12:27 PM osascript[44397] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
    /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper

    i get this same error ALL THE TIME, when i don’t even have any CS4 apps open, and i’m using programs completely unrelated to Adobe. i’m running 10.6.2, and i’m not [consciously] running any scripts that would trigger it.
    any suggestions would be MUCH appreciated. :)

  • Paul F — 10:22 PM on February 08, 2010

    You don’t need to create a symlink to disable it; just trash it.
    The ramifications of doing so would be to break most or any applescriptable functionality from Adobe applications, but as the scripting extensions are not loading anyway, the net effect will just be the warnings go away.
    This warning will occur if anything Applescript happens regardless of it having to do with the Adobe extensions or not.

Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use | Privacy Policy and Cookies (Updated)