• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Applescript and Photoshop Artboards

New Here ,
Apr 04, 2019 Apr 04, 2019

Copy link to clipboard

Copied

I'm just beginning to learn how to script for Photoshop, and I'm running into an issue I can't find an answer to anywhere. I'm using Applescript, since I'm a scripting novice. The problem is that I can't get scripts to work if the target layer is contained within an artboard. For example, take the following simple test script that hides any layer named "Test":

tell application "Adobe Photoshop CC 2019"

  set myDoc to current document

  tell myDoc

  set the properties of (every art layer whose name is "Test") to {visible:false}

  end tell

end tell

My test file has one "Test" layer inside an artboard, and two outside. As you can see below, only the two outside the artboard were modified.

Screen Shot 2019-04-04 at 3.51.01 PM.png

Is it possible to tell Photoshop to look inside artboards with Applescript?

Moved to Scripting forum. [Moderator]

TOPICS
Actions and scripting

Views

351

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Apr 04, 2019 Apr 04, 2019

Copy link to clipboard

Copied

If you're just starting scripting, I would suggest to use javascript, as more people know that and can help you, and it's cross platform.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

not exactly the answer he was looking for yes java scripting is very helpful but... Can this be done useing Applescript. I have a simmlar question that involves how to manuver through artboards and layer groups. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

LATEST

I believe that the original 2019 post went unanswered due to the very reasons mentioned by Chuck.

 

Perhaps check on the MacScripter site:

https://www.macscripter.net/tag/adobe

 

Without reading the AS ref guide, I would guess that layers within groups are navigated in a similar way to JS.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Agreed Chuck, IMHO these points are more crucial than the touted "simplicity" of AppleScript vs ExtendScript/JavaScript.

 

Additionally, sometimes one has to inject Action Manager JS code into the AS code to work around limitations with the DOM.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines