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)

11 thoughts on “AppleScript compatibility with Photoshop on Snow Leopard

  1. 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.]

  2. 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

  3. @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!

  4. 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?

    1. 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

      1. 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.

        1. 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/

  5. 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. 🙂

  6. 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.

Leave a Reply

Your email address will not be published.