Test mask visibility in pscc 2014

I have heard good comments about indesign scripting community.
It occurred to ask a Photoshop scripting question here given the good reputation of this community.
The photoshop document has a layer with a layer mask.
Using the extended script or javascript,
How would I test if the layer mask is visible or hidden?
Trying to create a script that toggles the visibility of a layer mask.
So far the script can call the showMask or hideMask functions independently.
The next step is to test for the mask visibility and call the corresponding function.
I believe this can be achieved with an if statement.
// if mask visible
     call hideMask()
// if mask not visible
     call showMask()
#target photoshop
//Make Photoshop the formost Application
app.bringToFront();
//Test for open document
if(app.documents.length > 0){
        //Select mask layer 255 fill
        var docRef = app.activeDocument;
        var layerRef=docRef.layers.getByName("255 fill");      //"Layer Name" 
        docRef.activeLayer=layerRef;
        // call showMask function
        //showMask ();
        // call hideMask function
        //hideMask ();
        //toggle mask visibility              
else {
    alert("No documents are open");
// FUNCTIONS
function showHideMask () {
    // showMask
    // =======================================================
    var idslct = charIDToTypeID( "slct" );
        var desc21 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref21 = new ActionReference();
            var idChnl = charIDToTypeID( "Chnl" );
            var idChnl = charIDToTypeID( "Chnl" );
            var idMsk = charIDToTypeID( "Msk " );
            ref21.putEnumerated( idChnl, idChnl, idMsk );
        desc21.putReference( idnull, ref21 );
        var idMkVs = charIDToTypeID( "MkVs" );
        desc21.putBoolean( idMkVs, true );
    executeAction( idslct, desc21, DialogModes.NO );
function hideMask () {
    // hideMask
    // =======================================================
        var idslct = charIDToTypeID( "slct" );
            var desc22 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref22 = new ActionReference();
                var idChnl = charIDToTypeID( "Chnl" );
                var idChnl = charIDToTypeID( "Chnl" );
                var idRGB = charIDToTypeID( "RGB " );
                ref22.putEnumerated( idChnl, idChnl, idRGB );
            desc22.putReference( idnull, ref22 );
            var idMkVs = charIDToTypeID( "MkVs" );
            desc22.putBoolean( idMkVs, false );
        executeAction( idslct, desc22, DialogModes.NO );

There have been a couple of threads on this and apparently people at Adobe are aware that the feature has been broken.
Re: I updated photoshop CC to 2014 version and the photomerge fuction does not work as the previous version, it is worse. When blending images it crops with nearly strait line, without considering image items. At the previous version croping was much more

Similar Messages

  • How do I get Extensions to Show in PSCC 2014?

    Almost none of my Extensions show in PSCC 2014.  They show as installed and enabled for PSCC 2014 in my Extension Manager.  I have Uninstalled and Reinstalled everything, including PSCC 2014, my Extension Manager, Creative Cloud and my Extensions.  When I go to Adobe Photoshop CC 2014>Plug-ins>Panels, they all show up in a Folder in Panels.  However nothing will get them to show in PSCC 2014 itself.  What do I do?  (PS - Chat Tech Help did nothing to help me.  In fact they created problems and left me to solve them on my own.  They said, Call in Monday.)

    Flash based extensions are not supported by PS CC 2014 anymore. Please refer to http://blogs.adobe.com/photoshopdotcom/2014/04/photoshop-spring-cleaning.html, http://blogs.adobe.com/jkost/2014/06/installing-the-2014-release-of-creative-cloud.html
    And http://blogs.adobe.com/crawlspace/2014/06/2014-release-of-photoshop-cc-faq.html#plugins (scroll down to "Why don’t my 3rd Panels show up in the 2014 release of Photoshop CC? What happened to Oil Paint, Mini-Bridge & Kuler?”)
    There is a new Kuler HTML5 panel available on Add Ons: http://adobe.ly/UgxQSN
    If some extensions are not supported by PS CC 2014, you have to continue to use them in PS CC until their HTML based counterparts become available.

  • "Toggle mask visibility" shortcut?

    Is there a keyboard shortcut for "Toggle mask visibility"? I can do this by ALT-clicking on the layer's mask, but I would like to assign a shortcut for this on a button on my Wacom Intuos 4 drawing tablet. So far I haven't found a menu shortcut for it, nor have I found a way to add my own (Edit-Keyboard shortcuts) as the function isn't listed there.

    There are some big difference between  (Alt+Click) on the Layer's Layer Mask Icon in the Layer palette. There does not have to be a current target the cursor position sets the target. And (Alt-Click) is a toggle.   An Action step "Select mask channel is quite different.  If nothing is targeted. If the top layer has a layer mask it will become the Photoshop target and be displayed grayscale in the image window.  If there is a currently targeted layer that has a layer mask that layer's layer mask will become the Photoshop target and it will be displayed grayscale in the image window. For any other document state that step will fail with an error message like its  not a currently available option.  The step is also not a toggle.
    To tell the truth I do understand why the op ask the question.  For the toggle requires a mouse position and a click.  With their Wacom Intuos4 they can set a express key to Alt.  The tablet may even be come configured the way. When they press the express and click the pen it will be a toggled.  In Any case there needs to be a mouse position and a click to set the target weather they use the (Alt-Click) toggle or they use an action to display a Layer mask in the image window grayscale.  Something has to target a layer with a layer mask.  In an action that state may exist as a result of prior steps.  An action with "Select mask channel"  as the first step can easily fail for the current Photoshop target may not a the requited layer mask.

  • Photoshop PSCC 2014 stops responding with NIK Collection Plugins and when loading from Lightroom 5

    I have lost the ability to be productive since purchasing the photographers CC plan and installing Photoshop CC 2014.
    1. Send photo from Lightroom 5.7 to PSCC 2014 then edit using photoshop and NIK collection plugin. Photo begins to loads into PSCC2014 then hang-up and PSCC stops responding causing me to force quit PSCC or photo loads into NIK Collection Plugin without any issues, editing is performed, but when I click "OK" the program hangs up, ( photoshop stops responding), resulting in a Force Quit and loss of all work.
    2. Send image from Lightroom 5.7 to Photoshop CC 2014 using "Edit In". PSCC2014 hangs up while loading image and has to be forced to quit or it loads photo, work is preformed and after clicking "SAVE" to return to LR 5.7 photoshop hangs up and stops responding, causing loss of all edited work.
    I have uninstalled PSCC 2014 along with presets and then reinstalled. No change in outcomes! I have updated and reinstalled the NIK Collection Plugin with no change in outcome. I am unable to get any work done for the last 4 days. I am considering canceling my CC account and trying to return to working with LR 5.7 and Photoshop CS6 as I had before purchasing CC photographers plan providing I can with success return to that configuration.
    Can anyone help? I sure hope so.
    Thanks… gwj

    Benjamin,
    Sorry it took so long to respond to your suggestion. Long work schedules doing video production have kept me away from my home base.
    I did as you suggested in you're reply and photoshop cc worked without issue and returned the photo work back to LR normally. So, I assume by this, that the issue is
    the NIK plug-in? Do you now what I can do to get the plug-in working correctly? Perhaps contacting Google/NIK for a solution?
    Any additional suggestions and knowledge you can pass along related to the issue at hand is greatly appreciated.

  • How do I install filters into PSCC 2014?

    How do I install my filters from PS6 into PSCC 2014?  I know you can't just drag and drop them.  That caused all kinds of problems with PSCC.  I would like to do PSCC 2014 the right way to avoid problems.  The filters are from many different developers and not all are still available but they work fine in PS6.

    Most likely you install each the same way you installed each in Photoshop CS6.  If any of you filters also used a panel created with Adobe Configurator.  They will not be able to be installed. For Photoshop CC 2014 does not support Flash Panels which are the kind of Panels that Configurator created.

  • Getting Adobe Extensions and 3rd Party Plug-ins into PSCC 2014; how do I do it?

    How do I get my Adobe Extensions and my 3rd party plug-ins into PSCC 2014?

    According to what it says in Why is everything new apps in 2014 update? you need NEW, since the format is different

  • Layer mask visibility

    Hi, I am trying to figure out how to set the mask visibility in Elements 9. If I create a mask, it sometimes comes in handy to see where you have been. In other programs I use you can turn the mask red for instance. Can't find that feature in pse 9 When a mask is turned red it would also be easier to see the different shades and oppacities you use.
    Thanks a million

    In pse9 you can use the backslash key to show the red overlay.
    (the key just below the backspace key)
    You can also change the mask overlay color or opacity by right clicking
    on the layer mask and choosing Mask Options.
    To show the mask as black and white you can Alt click on the layer mask.
    MTSTUNER

  • My Extensions Don't Show up in PSCC 2014

    Almost none of my Extensions show up in PSCC 2014.  The Extension Manager shows that these Extensions are installed for PSCC2014, but they don't show up in the Application.  I have reinstalled them and they show as being installed, but they don't show up.  I have Uninstalled PSCC 2014 and Reinstalled it.  I have restarted my computer several times.  Nothing works.

    I found the answer. Go to the following link for detailed instructions:
    http://support.apple.com/kb/HT1848

  • Is it possible to have two testing servers in Dreamweaver CC 2014?

    Hi,
    Is it possible to set up Dreamweaver CC 2014 so that there are two Remote servers and one Testing server? I know how to set it up with 1 of each but I have two live servers running the same site (for business reasons).
    Thanks in advance
    Ben

    Sure. I really wanted two remote servers. We have a live and "backup live" server operational inside and outside of China. We do need to switch between them relatively frequently e.g. this week, external access to Hong Kong servers has been severely restricted, so we switch to a godaddy-hosted solution. But we also want a live testing server / development environment where we can build. Completed solutions get deployed to both live servers.
    I can work around it, but am just being lazy really. And Dreamweaver seems to make lots of other things quicker, so I thought I'd ask

  • Can see pen mask tool in premiere 2014

    I have just updated to premiere 2014, when I add and fx to shot, then I go to fx opacity I only see the circle and rectangle shaoe masks, there is no freehand pen tool for mask. Has anyone else encounters this issue.
    Thanks

    Open the About Adobe Premiere Pro window
    What release does it say?
    It should say 2014.1
    and at the bottom: 8.1.0 (81) build.

  • Adding Nik filters to pscc 2014 from pscc

    I have copied Nik from pscc and pasted them in pscc2014 but they do not appear in the new cc2014. What to do?

    Most likely you install each the same way you installed each in Photoshop CS6.  If any of you filters also used a panel created with Adobe Configurator.  They will not be able to be installed. For Photoshop CC 2014 does not support Flash Panels which are the kind of Panels that Configurator created.

  • Test for visible GUI

    I want to test (in a shell script) whether my GUI is visible. The test should return false if I’m not logged in, or the screen saver is running, the login window is showing, another user has the display, etc. How can I do this?

    I found a hack that accomplishes the goal, but it's not a very good solution. There must be a much better way.
    The hack uses the screencapture utility. If the login window is showing or another user has the GUI, then screencapture will not generate an output file. It does not output an error message or return an error status; it just silently fails, so you have to test for the file's existence.
    For example:
    #!/bin/bash
    rm -f myscreen.png
    screencapture -x myscreen.png
    if test -f myscreen.png
    then
    echo "I have the screen."
    rm -f myscreen.png
    else
    echo "I don't have the screen."
    fi
    It's not clean or efficient, but it works, except for the case where my screen saver is running. In that case, this test indicates that I have the screen, although my desktop is not visible. So in addition to the test above, I'd also have to test whether I have a ScreenSaverEngine process that does not have the -background flag.
    All in all, it's probably not a practical solution, but at least it demonstrates what I am trying to accomplish.

  • I upgraded to PsCC 2014, but Select Focus Area is not available. Why?

    I upgraded to 2014, but none of the new features seem available from my menus. In particular, I wanted to use the Focus Area feature, but it is not available from the Select Menu. Is this a common problem?

    Sorry. It didn't occur to me that Adobe would install a complete new version on my hard drive. I found it. It works so far. Sorry for the waste of time.

  • 3D ground plane grid not visible in CC 2014.0.0

    Hi,
    i am a Creative Cloud member and since the 2014.0.0 CC version, i am not able to show anymore the 3D ground plane grid.
    I use a MacBook Pro Retina (Half 2012), with a NVIDIA GeForce GT 650M (1024 Mo) and OS X 10.9.4.
    Regards.

    I have the same question. Adobe is really dropping the ball on this one. I've seen this question asked in multiple places with no response and no answer.

  • Guide Box Visible with New 2014.1 Version

    Guide Box lines will show up after installing new 2014.1 version. I have tried the transparency and tried hiding the guides. Nothing has worked.
    Can someone help me out with this?
    Thank you!

    Have you re-published to Tulsa Web Design | Website Design | Creating Dynamic Websites? The home page there continues to have a drop shadow on the page object.
    With nothing selected when you go to the Shadow panel of the Effects panel what's displayed?

Maybe you are looking for

  • Einen zweiten Adobe PDF Drucker einrichten

    Hallo, ich habe hier ein Problem, bei dem ich nicht mehr weiter weiß. Wir haben Adobe Acrobat 7.0.0 Prof. im Einsatz. Da wir aber mehrere Programme (z.B. Datenbanken) haben, die auf den PDF Drucker zugreifen, benötigen wir mehrere Adobe PDF Drucker m

  • Asset used by two cost centers

    Hi, Can some one please explain me if one asset is related to more than one cost center, how the expencess and depriciation is allocated to all related cost centers? I believe In asset master we can give only one cost center. Will there be a split en

  • Export iMovie 9.0.9 movies to iMovie Theatre?

    I have given up on version 10, but really like the iMovie Theatre concept. Works nicely with the AppleTV and my iOS devices. Is there a way to export from iMovie 9 to iMovie Theatre (without lots of hastle of importing into iMovie 10 etc....) ?

  • Setting Control-Flow- Case on java class/method

    hello All :D i have little problem about control flow case, in my case i've 2 page where before load to the page i'wanna make condition (if-else) when the user choose the field, the java class get the value for make true condition. In this case, i wa

  • Implement a table menu using ALV

    Hi, I was wondering if its possible to implement a standard sap table menu bar into WDA using ALV? is there a doc that explains that? I'm looking for something similar to this [screenshot|http://www.mypicx.com/02202009/menubar/] Thanks in advance.