7 Replies Latest reply on Sep 9, 2010 12:16 AM by Muppet Mark-QAl63s

    Basic AppleScript Question


      I have a PhotoShop file that I'm trying to script. There are multiple layers and I'm trying to select a certain layers but I'm just starting to use ApplScript with PhotoShop. There are very few examples of code and I need some help.


      tell application "Adobe Photoshop CS4"


      set docref to the current document

      tell docref

      set current layer to layer "bg"

      end tell

      end tell

      When I try to run the script above I get the following error:
      Adobe Photoshop CS4 got an error: Can’t set current layer of document "posters.psd" to layer "bg" of document "posters.psd".
      I have a layer called bg, why am I getting an error? I'm sure it's something simple, but the Abode scripting guide is no help.