Listener code to add a layer mask does not work...

With the help of Photoshop CC 2014 with all updates. The following script listener code has been saved when I clicked on the button, add a layer mask to add a mask to the active layer. When executeAction is called the script fails with the following error message. Help! How can I add a layer mask to the layer? Thank you.

: Error General Photoshop. Maybe this feature is not available in this version of Photoshop. -The command 'Make' is not currently available.

function addLayerMask() {}

Adds a layer mask to the layer by clicking on the

Add the button layer mask.

var idMk = charIDToTypeID ("Mk");

var desc23 = new ActionDescriptor();

var idNw = charIDToTypeID ('Nw');

var idChnl = charIDToTypeID ('channel');

desc23.putClass (idNw, idChnl);

var idAt = charIDToTypeID ('At');

var ref20 = new ActionReference();

var idChnl = charIDToTypeID ('channel');

var idChnl = charIDToTypeID ('channel');

var idMsk = charIDToTypeID ("Msk");

ref20.putEnumerated (idChnl, idChnl, idMsk);

desc23.putReference (idAt, ref20);

var idUsng = charIDToTypeID ("Usng");

var idUsrM = charIDToTypeID ("rocket");

var idRvlS = charIDToTypeID ("LVR");

desc23.putEnumerated (idUsng, idUsrM, idRvlS);

executeAction (idMk, desc23, DialogModes.NO);

}

This code works if you have an active selection.

function addLayerMask() {}

Adds a layer mask to the layer by clicking on the

Add the button layer mask.

var idMk = charIDToTypeID ("Mk");

var desc23 = new ActionDescriptor();

var idNw = charIDToTypeID ('Nw');

var idChnl = charIDToTypeID ('channel');

desc23.putClass (idNw, idChnl);

var idAt = charIDToTypeID ('At');

var ref20 = new ActionReference();

var idChnl = charIDToTypeID ('channel');

var idChnl = charIDToTypeID ('channel');

var idMsk = charIDToTypeID ("Msk");

ref20.putEnumerated (idChnl, idChnl, idMsk);

desc23.putReference (idAt, ref20);

var idUsng = charIDToTypeID ("Usng");

var idUsrM = charIDToTypeID ("rocket");

var idRvlS = charIDToTypeID ("LVR");

desc23.putEnumerated (idUsng, idUsrM, idRvlS);      reveal selection

executeAction (idMk, desc23, DialogModes.NO);

}

app.activeDocument.selection.selectAll ();

addLayerMask();

To add a layer mask without an active selection is the scriptlistener code you would need

function addLayerMask() {}

var idMk = charIDToTypeID ("Mk");

var desc25 = new ActionDescriptor();

var idNw = charIDToTypeID ('Nw');

var idChnl = charIDToTypeID ('channel');

desc25.putClass (idNw, idChnl);

var idAt = charIDToTypeID ('At');

ref19 var = new ActionReference();

var idChnl = charIDToTypeID ('channel');

var idChnl = charIDToTypeID ('channel');

var idMsk = charIDToTypeID ("Msk");

ref19.putEnumerated (idChnl, idChnl, idMsk);

desc25.putReference (idAt, ref19);

var idUsng = charIDToTypeID ("Usng");

var idUsrM = charIDToTypeID ("rocket");

var idRvlA = charIDToTypeID ("RvlA");

desc25.putEnumerated (idUsng, idUsrM, idRvlA);  reveal all

executeAction (idMk, desc25, DialogModes.NO);

}

addLayerMask()

There are once again hide all

var idMk = charIDToTypeID ("Mk");

var desc33 = new ActionDescriptor();

var idNw = charIDToTypeID ('Nw');

var idChnl = charIDToTypeID ('channel');

desc33.putClass (idNw, idChnl);

var idAt = charIDToTypeID ('At');

var ref27 = new ActionReference();

var idChnl = charIDToTypeID ('channel');

var idChnl = charIDToTypeID ('channel');

var idMsk = charIDToTypeID ("Msk");

ref27.putEnumerated (idChnl, idChnl, idMsk);

desc33.putReference (idAt, ref27);

var idUsng = charIDToTypeID ("Usng");

var idUsrM = charIDToTypeID ("rocket");

var idHdAl = charIDToTypeID ("HdAl");

desc33.putEnumerated (idUsng, idUsrM, idHdAl);     Hide all

executeAction (idMk, desc33, DialogModes.NO);

Tags: Photoshop

Similar Questions

  • Layer mask does not work correctly.

    My normal layer mask does not work correctly.  When I click on add a layer mask, I get this instead.  I change a setting by chance?  He won't let me see where my traditional black and white mask.

    Screen Shot 2015-11-16 at 2.20.47 PM copy.png

    Hello

    In the layers panel, click the dropdown menu, click on Options in the Panel and select one thumbnail size other than None.

  • Paste an image into a layer mask does not work even after several approaches

    I can't paste an image into a layer mask. I tried to keep 'option' by clicking on the layer mask (to activate the white), then "Control + V" to paste the image but it still places the image in a new layer. I tried to paste through the Palette layers without success (pasta in a new layer). I tried to use past special from the Edit menu, but the past command is grayed out. Any ideas for why it does not work for me?

    I tried to keep 'option' by clicking on the layer mask (to activate the white), then "Control + V" to paste the image

    Did you select > all and edit > copy the image you want to put in the mask?

  • Paint on layer masks does not work?

    Hi, I'm working on a work of Digital Art classes... Deadline tomorrow, I left it quite late because I knew what to do, and he was out in my head on how to do it. And behold, I encountered a problem with paint on a layer mask.

    I did a form (Magenta, so I know I paint on the correct layer) and have selected layer mask, but when I try to paint black on it to give it a bit of shading is as if she is wiping out so I can see the layer behind it, even though I see that it is indeed drawing anywhere in the mask layer in the layers panel anyway?

    Until something happens, I'll just go try and find an alternative

    (Photoshop CS6)

    Screenshot 2014-03-19 20.58.06.pngScreenshot 2014-03-19 20.57.44.png

    Any help is appreciated!

    Painting on the layer mask with black going to 'clear' of the image.  That's the whole point of a layer mask.  If you want to shade it (non-distructively) then create a new layer above that layer and hang it on her, pressing alt/opt clicking on between the layers in the layer panel.  Then you can paint black on the new layer, and it will be displayed only when the lower layer's pixels.  You can then change it without messing up the base layer.

  • Works writing Maske in swf and video - Datei nicht fonts mask does not work in the swf and video files

    Hallo,

    ICH habe eine writing-Maske standing. In der Voransicht auf der Zeitleiste looks man die Maske,.

    Wie sie richtig should be.

    Aber in exportierten und swf videos. Dateien wird die Maske non dub.

    Was mache ich please.


    Hello

    I created a signature mask. In the Preview on the timeline, you can see the mask,
    as it should be correct.
    But in exported swf videos. files the mask does not work.

    What I am doing wrong.



    ocak.jpgtest1.jpg

    I don't see anything that looks like a mask on your stage effect.

    in general, I think the image hidden (below OCAKBAŞI) is visible and nothing else.  you have two other visible layers makes it difficult to see what you are trying to demonstrate.

    text mask problems generally, because the text is not broken down into vector shapes (by clicking on edit > to break > to break).

  • White color on the layer mask does not

    Well, I have a problem... Each setting is fine, but when I open the layer mask on a layer, and if I have the black brush, it works very well, BUT if I brush white, it does not work. It's like the color white is on 0% opacity. It shows me an action in "history, but it's like I'm not even brushing."
    Now, when I want white brush, I switched layer mask, brush black and then I reverse again, because as I said, the white color just doesn't work...
    -Colours btw, work not in a layer mask

    Is the Mode in the Options bar to brush on something other than normal?

  • Layer mask does not

    Everything is set to normal and the brush is set on what it is supposed to. I changed nothing, but I did accidentally hold shift and alt and right-click on the photo. After that, I couldn't have the under layer. I even restarted Photoshop and it still does not work.

    I got it to work. The color has been reversed. You can close this thread. Thank you

  • CS5 64-bit masking does not work

    Strange problem in 64 bit layer masking doesn't work not correctly.  White reveals the bottom layer when using Brush tool.  Black does not paint it.  Is not white working backwards?  I use Win 7 core I7 processor with 12gig of ram.

    CS5 in 32-bit works very well so far.

    Any suggestions?

    Thank you

    Dave

    .

    Ensure that your brush is not set on something other than the painting of the Normal"" mode.

    However, in a white layer mask should cause the opacity and show what is on the layer itself, black should allow what is lower to show through.

    Choose Edition - Preferences - Performanceand temporarily disable the Drawing OpenGL .  If this is useful, see if there is an update to the video driver on the web site of the manufacturer of your particular graphics card.

    -Christmas

  • Trimming layer shortcut does not work

    Hi, I am a beginner but...

    I do not understand what I did wrong, but shortened trimming layer does not work.

    "option + [or]".

    I use the keyboard of the Sweden, macpro and after effects cc

    TNX

    Well, I guess that the key can be different on a Swedish keyboard. If AE is installed in English, I'm guessing that she would expect that an American or British keyboard. I don't know how you figure that the right key is in this scenario. I hope someone will have a suggestion.

  • ALT-click the icon layer adjustment does not work

    Hello

    It drives me crazy, I would be like Alt + click on the adjustment layer down in the layers panel to open the dialog window when you create a new adjustment layer. But it does not work. Sometimes the adjustment layer puffs a few options for a very short period of time, but nothing's going on time.

    No idea if something is wrong with my keyboard shortcuts?

    Thanks in advance

    Alex

    Try CTRL + ALT who should work.  According to me, told me it was a bug that was going to be fixed, but has not been yet.

  • Arbitrary mask does not work on Mac

    Hi all

    I would ask why the mask of arbitrary to customize the phone, I created numbers, postal codes, currency in my form fields don't work on Mac? I use Adobe Pro XI and in the environment of Windows 8. It works perfectly on windows, but when I checked in the mask, the fields with arbitrary mask do not work. Please help me. I'm a newbie using the pdf, I get on the net but I can't find a solution to this problem. Thank you in advance.

    What happens if you take the same file that is located on the Mac and try it on Windows? It must be the same file and not another copy.

    This fact that it works on Windows indicates that the arbitrary mask is configured correctly, this isn't a problem with the way in which it was saved. If there is that chance was already open in preview, then it is possible that JavaScript is disabled in Reader. You can check by selecting: Adobe Reader > Preferences > JavaScript > enable Acrobat JavaScript

    The fact that the arbitrary mask is not now set up makes me suspect a corrupted extract it.

  • Code Insight in pkb-open files does not work

    If I open the body of package oracle under the Packages node, and then open editor allows me to use the code Insight.
    If I open pkb-file by double clicking it, compiling successfully against the connected database and try to use the preview of code, so it does not work. No semiautomatic aid work there.
    How can I use autocomplete in pkb-files?

    --
    Version 2.1.0.63

    Base PL/SQL development file is not yet the way it is supposed to be. Current ETA is by v3.0.
    FWIW, I confirmed it in section 2.1.1.

    Sorry,
    K.

  • Layer mask does not properly clear?

    something is wrong w my layer mask. I maybe had clicked on something while doing some graphic but I'm pretty sure.

    When clear it was beautiful,

    exbhtA.jpg

    the problem is when I want to recover the pieces that I deleted. It becomes translucent (or less opacity) rather than its original T ^ T

    If someone knows how to fix this please tell me! I use layer mask forever and I always use it, this isn't the same without it working properly T ^ T

    exbhtb.jpgexbhtc.jpg

    My first idea, see these differences: black and gray?

    Have you applied with a gray brush and the other with a black brush?

  • CC 2015 Photoshop layer mask does not?

    I've recently updated to CC in Photoshop, but I have problems with layer masks, I created the mask layer, and when I paint with my black brush, it does not block the area completely, it will leave the remains of the image essentially, it leaves an opaque shape. I check that my brush is set to normal and my layer is set to normal. I have reset the brushes, I tried implementing new photoshop documents, but it makes no difference. Can anyone help please see the example below, the Red is a layer below the layer of the image that has applied the layer mask.

    Screen Shot 2015-08-23 at 20.56.32.png

    Reset preferences: opt-cmd-shift at the start of the PS.

  • 'Add files to download' does not work for my custom css file...?

    From now on, I have several snippets of CSS stylesheet in the HEAD of various pages tag, but I want to combine them all into a single file "custom.css" and it just a link to specific pages. So I have created "custom.css" in my 'active' projects folder and want to add it then my site by 'Add files to download' under the menu 'File' in MUSE. But I always get the message

    The X:\xxx\xxx\xxx\Assets\custom.css file is not a supported file format


    Is this possible? I think that used to work some time ago, I had a model that uses custom css files... Why is a css file not supported? Does not make much sense to me...

    I CAN add files jpg or svg to png oder so it doesn't seem to be a problem...?

    Thank you!

    Custom CSS in Muse can be placed at the head of each page.

    It there's no way that Muse can locate the css custom code in an active file and apply it to a specific page.

    Muse export all css on each page and stores it in a separate css file.

Maybe you are looking for

  • Why I can't post in the forums with Firefox 20?

    I tried to post in this forum http://www.renderosity.com/mod/forumpro/index.php , but for some reason any that is not letting me. I can post with other browsers, but not with my browser Firefox 20.0. Y at - it tips or advice I can try? I tried to cle

  • Bandwidth sharing

    Hello, y at - it a router that can automatically share the bandwidth? We have a small company with about 10-20 connections using connection ADSL2 +. When a person uses dropbox, everyone elses internet slows down to a crawl!

  • How to change the background color in the Solitaire game

    I would like to know if there is a way to extend the colors for the SOLITAIRE game? My father detects the colors of the background and maps are too hard and they appear blurry to me and him also. He wondered if we could add more colors in order to ge

  • How to install silverlight/mac

    Try to get NetFlix to work on my computer

  • How can I change windows xp home to windows xp professional

    I have windows xp home edition, but it is recommended that I use another program of windows xp instead, what are my options