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

Photoshop 26.1.1 - ExtendScript Error 8800: "Make" command unavailable for Layer Mask creation

Community Beginner ,
May 15, 2025 May 15, 2025

Hi everyone,
I'm encountering a persistent issue with ExtendScript in Photoshop 26.1.1 when trying to create a layer mask. Any attempt to add a "Reveal All" layer mask to a newly created layer via Action Manager (executeAction) results in the following

 

error:
Error 8800: A general Photoshop error occurred. This function may not be available in this version of Photoshop.
- The 'Make' command is currently unavailable.
This happens consistently, even with a very minimal test script. My Photoshop version is 26.1.1 (Please specify your Operating System here, e.g., on macOS Sonoma 14.5 / on Windows 11 Pro 23H2).

 

Goal of the original script:
My initial goal was to create a script that adds a "grain layer" (a new layer filled with 50% gray, noise filter applied, and set to Overlay blend mode) and then add a layer mask to it, which would later be modified using "Apply Image". However, I'm stuck at the very first step of adding the layer mask.

 

Minimal Test Script that reproduces the error:
The following simple script consistently fails with Error 8800 when trying to execute the "Make" event for the layer mask:

 

#target photoshop

if (app.documents.length > 0) {
var doc = app.activeDocument;
var testLayer = null;

try {
// 1. Create a new layer
testLayer = doc.artLayers.add();
testLayer.name = "Test Mask Layer";
// alert("New layer 'Test Mask Layer' created. Attempting to add mask..."); // For debugging

// 2. Attempt to add a "Reveal All" layer mask
var idMk = charIDToTypeID("Mk "); // "Mk" with two trailing spaces
var descMask = new ActionDescriptor();

var refChannel_Null = new ActionReference();
refChannel_Null.putClass(charIDToTypeID("Chnl"));
descMask.putReference(charIDToTypeID("null"), refChannel_Null);

var refChannel_At = new ActionReference();
refChannel_At.putEnumerated(charIDToTypeID("Chnl"), charIDToTypeID("Chnl"), charIDToTypeID("Msk "));
descMask.putReference(charIDToTypeID("At "), refChannel_At); // "At" with two trailing spaces

descMask.putEnumerated(charIDToTypeID("Usng"), charIDToTypeID("UsrM"), charIDToTypeID("RvlA")); // Using UserMask, RevealAll

executeAction(idMk, descMask, DialogModes.NO); // This line triggers Error 8800

// alert("Layer mask added successfully."); // This is never reached

} catch (e) {
alert("Error during test mask creation:\n" + e); // This shows the Error 8800
} finally {
// Optionally remove the test layer
// if (testLayer) {
// try { testLayer.remove(); } catch (e2) {}
// }
}
} else {
alert("Please open a document before running this script.");
}

 

 

Things I've tried:
* Using charIDToTypeID("Mk ") for the "Make" event as shown in the script above (this is common in ScriptingListener logs).
* Using stringIDToTypeID("make") for the event, and corresponding stringIDToTypeID for keys like "channel", "mask", "at", "using", "userMask", "revealAll". This also resulted in the same Error 8800.
The error occurs specifically when executeAction is called to create the mask. The layer "Test Mask Layer" (or "Grain Layer" in my original script) is successfully created and is the active layer.
Questions for the community:
* Is this a known issue, bug, or regression in Photoshop 26.1.1 (or recent Photoshop 2025 releases)?
* Are there any documented changes to how layer masks should be programmatically created via Action Manager in this version?
* If the standard "Make" event for layer masks is indeed "unavailable" as the error suggests, are there any confirmed working alternative methods or workarounds in ExtendScript to add a "Reveal All" layer mask to a layer in Photoshop 26.1.1?
Any insights or suggestions would be greatly appreciated. I've previously encountered difficulties scripting complex adjustment layer properties (like applying 3D LUTs to Color Lookup layers) which felt like API limitations, and I'm concerned this might be a similar situation with a more fundamental feature.


Thank you for your time and help!

TOPICS
macOS , Windows
168
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 Beginner , Jun 11, 2025 Jun 11, 2025

Just to follow up — I found a workaround that works reliably in UXP scripts.

Instead of using executeAction with "Mk" (which still gave me Error 8800 in PS 26.1.1), I switched to using batchPlay with hideSelection, which works perfectly:

await action.batchPlay([{
  _obj: "make",
  new: { _class: "channel" },
  at: [{ _ref: "layer", _enum: "ordinal", _value: "targetEnum" }],
  using: { _enum: "userMaskEnabled", _value: "hideSelection" }
}], { synchronousExecution: true });

Thanks again to everyone f

...
Translate
Adobe
Community Expert ,
May 24, 2025 May 24, 2025

@novy_jp have you updated to PS 26.7? 

creativeexplorer_0-1748154858221.png
From what I can gathered from your post, it sounds like you've run into a frustrating bug in Photoshop 26.1.1 (Photoshop 2025) where using Action Manager to create a "Reveal All" layer mask results in a "Make command is currently unavailable" error. This specific error, especially with a fundamental action like making a layer mask, points to a regression or bug in that particular Photoshop version's ExtendScript API, rather than an issue with your script's logic. Given that you've tested a minimal script and reset preferences, it's highly likely a software-level problem Adobe needs to address, as similar API limitations have been noted in recent Photoshop versions—hence why I asked, have you tried to uploaded to PS 26.7?

 

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 Beginner ,
Jun 08, 2025 Jun 08, 2025

Hi, sorry for the very late reply — and thank you so much for your patience.

I really appreciate the detailed explanation you provided — it helped me a lot to understand that this is likely a version-related bug rather than an issue with my script.

I haven’t updated to PS 26.7 yet, but based on your advice I’ll try upgrading and test the script again in that version.
I’ll follow up here with the results once I’ve had a chance to check.

Thanks again for your kind support and your patience — it was very helpful!

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 ,
Jun 08, 2025 Jun 08, 2025

@novy_jp 

 

Does this function work for you?

addMask();

function addMask(){
    var idMk = charIDToTypeID( "Mk  " );
        var desc2 = new ActionDescriptor();
        var idNw = charIDToTypeID( "Nw  " );
        var idChnl = charIDToTypeID( "Chnl" );
        desc2.putClass( idNw, idChnl );
        var idAt = charIDToTypeID( "At  " );
            var ref1 = new ActionReference();
            var idChnl = charIDToTypeID( "Chnl" );
            var idChnl = charIDToTypeID( "Chnl" );
            var idMsk = charIDToTypeID( "Msk " );
            ref1.putEnumerated( idChnl, idChnl, idMsk );
        desc2.putReference( idAt, ref1 );
        var idUsng = charIDToTypeID( "Usng" );
        var idUsrM = charIDToTypeID( "UsrM" );
        var idRvlA = charIDToTypeID( "RvlA" );
        desc2.putEnumerated( idUsng, idUsrM, idRvlA );
    executeAction( idMk, desc2, DialogModes.NO );
    }

 

Or:

 

addMask();

function addMask() {
	var c2t = function (s) {
		return app.charIDToTypeID(s);
	};
	var s2t = function (s) {
		return app.stringIDToTypeID(s);
	};
	var descriptor = new ActionDescriptor();
	var reference = new ActionReference();
	descriptor.putClass( s2t( "new" ), s2t( "channel" ));
	reference.putEnumerated( s2t( "channel" ), s2t( "channel" ), s2t( "mask" ));
	descriptor.putReference( s2t( "at" ), reference );
	descriptor.putEnumerated( s2t( "using" ), c2t( "UsrM" ), s2t( "revealAll" ));
	executeAction( s2t( "make" ), descriptor, DialogModes.NO );
}

 

P.S. Please use the forum software  </>  button to paste code so that errors aren't introduced.

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 Beginner ,
Jun 11, 2025 Jun 11, 2025

Hi, sorry for the late reply — and thank you so much for your helpful answer!
I’ll try your example and see how it works.
Also, thanks for the tip about using the </> button — I’ll make sure to do that next time!

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 ,
Jun 11, 2025 Jun 11, 2025
quote

Hi, sorry for the late reply — and thank you so much for your helpful answer!
I’ll try your example and see how it works.
Also, thanks for the tip about using the </> button — I’ll make sure to do that next time!


By @novy_jp

 

You're welcome!

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 Beginner ,
Jun 11, 2025 Jun 11, 2025

Just to follow up — I found a workaround that works reliably in UXP scripts.

Instead of using executeAction with "Mk" (which still gave me Error 8800 in PS 26.1.1), I switched to using batchPlay with hideSelection, which works perfectly:

await action.batchPlay([{
  _obj: "make",
  new: { _class: "channel" },
  at: [{ _ref: "layer", _enum: "ordinal", _value: "targetEnum" }],
  using: { _enum: "userMaskEnabled", _value: "hideSelection" }
}], { synchronousExecution: true });

Thanks again to everyone for the help, and also for the tip about using the </> button — I’ll be sure to do that from now on!

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 ,
Jun 11, 2025 Jun 11, 2025
LATEST
quote

Just to follow up — I found a workaround that works reliably in UXP scripts.

Instead of using executeAction with "Mk" (which still gave me Error 8800 in PS 26.1.1), I switched to using batchPlay with hideSelection, which works perfectly:

await action.batchPlay([{
  _obj: "make",
  new: { _class: "channel" },
  at: [{ _ref: "layer", _enum: "ordinal", _value: "targetEnum" }],
  using: { _enum: "userMaskEnabled", _value: "hideSelection" }
}], { synchronousExecution: true });

Thanks again to everyone for the help, and also for the tip about using the </> button — I’ll be sure to do that from now on!


By @novy_jp

 

Yes, those four character charIDToTypeID codes can be tricky with the padding "Mk" vs. "Mk  " and if not using the </> button the forum software may remove multiple white space characters, breaking the code.

 

Your original code example used ExtendScript/Action Manager code. I did test my two code examples in different versions of Photoshop without error. They should have worked for you too.

 

Thanks for posting the UXP/BatchPlay alternative!

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