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

Create new Hue/saturation layer by script

Explorer ,
Feb 11, 2025 Feb 11, 2025

hi all,

i want to create a hue/saturation adjustment layer.

i tried the following commands but failed:

app.activeDocument.artLayers.addAdjustment("Hue/Saturation");
app.activeDocument.layers.addAdjustment("Hue/Saturation");

 

please guide me the exact command.

TOPICS
Actions and scripting
128
Translate
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

correct answers 1 Correct answer

Community Expert , Feb 11, 2025 Feb 11, 2025

@powerful_Zephyr5EF9 

 

I believe that you will need AM code for that:

 

var s2t = function (s) {
    return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
var descriptor2 = new ActionDescriptor();
var reference = new ActionReference();
reference.putClass(s2t("contentLayer"));
descriptor.putReference(s2t("null"), reference);
descriptor2.putClass(s2t("type"), s2t("hueSaturation"));
descriptor.putObject(s2t("using"), s2t("contentLayer"), descriptor2);
executeAction(s2t("make"
...
Translate
Adobe
Community Expert ,
Feb 11, 2025 Feb 11, 2025

@powerful_Zephyr5EF9 

 

I believe that you will need AM code for that:

 

var s2t = function (s) {
    return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
var descriptor2 = new ActionDescriptor();
var reference = new ActionReference();
reference.putClass(s2t("contentLayer"));
descriptor.putReference(s2t("null"), reference);
descriptor2.putClass(s2t("type"), s2t("hueSaturation"));
descriptor.putObject(s2t("using"), s2t("contentLayer"), descriptor2);
executeAction(s2t("make"), descriptor, DialogModes.NO);
Translate
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
Explorer ,
Feb 11, 2025 Feb 11, 2025

thank you, it's work perfect.

Translate
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 11, 2025 Feb 11, 2025
LATEST

You're welcome, happy to help.

Translate
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