Equivalent script Cntl-Click layer thumbnail

Object kind of says all this, but I'm looking for the script equivalent call to control-click on the thumbnail of the layer, where he selects all the pixels on that layer. Any thoughts?

= Code Scriptlisener =.

var idsetd = charIDToTypeID ("setd");

var desc8 = new ActionDescriptor();

var idnull = charIDToTypeID ("null");

ref4 var = new ActionReference();

var idChnl = charIDToTypeID ('channel');

var idfsel = charIDToTypeID ("FSC");

ref4.putProperty (idChnl, idfsel);

desc8.putReference (idnull, ref4);

idT var = charIDToTypeID ("T");

ref5 var = new ActionReference();

var idChnl = charIDToTypeID ('channel');

var idChnl = charIDToTypeID ('channel');

var idTrsp = charIDToTypeID ("TN");

ref5.putEnumerated (idChnl, idChnl, idTrsp);

desc8.putReference (idT, ref5);

executeAction (idsetd, desc8, DialogModes.NO);

Tags: Photoshop

Similar Questions

  • Run a script by clicking on a button panel

    Hello

    I am very new scripting in after effects and in general.
    Several months ago I write several small scripts to speed my work flow. I have run it through the "Launching pad" script Panel.
    Now, I have my scripts in my own panel but miss me properties to bind the part "script" and the "part of the group.

    For the Panel, I have (just one button for now):

    ---------------

    win = new window ('window', 'new project', [0,0,500,500], {Center:true,});})

    but_1 is Win.Add ("Button", [33,16,103,36], "Sharpen3Way");.

    Win.Center ();

    Win.Show ();

    ------------------

    and my previous script that operate independently.

    ----------------

    myComp = app.project.activeItem;Select the composition active

    app.beginUndoGroup ("sharpness 3 Way");Starting group Undo

    mySolid01 = myComp.layers.addSolid ([100,100,100], "Whet", myComp.width, myComp.height, 1);   Layer of United Nations Adds solid

    mySolid01.adjustmentLayer = true;En transforms the solid layer of setting
    mySolid01.label = 5;Sets the color of a layer of setting
    mySolid01.opacity.setValue (40);Change the opacity of the layer

    myEffect = mySolid01.property("Effects").addProperty ("Unsharp Mask") .name = "Unsharp Mask wide";Adds an effect on this layer

    myEffect = mySolid01.Effects.property ("Unsharp Mask Large") (1) .setValue (10);

    myEffect = mySolid01.Effects.property ("Unsharp Mask Large") (2) .setValue (40);

    myEffect = mySolid01.property("Effects").addProperty ("Unsharp Mask") .name = "Unsharp Mask Medium";Adds an effect on this layer

    myEffect = mySolid01.Effects.property ("Unsharp Mask Medium") (1) .setValue (65);

    myEffect = mySolid01.Effects.property ("Unsharp Mask Medium") (2) .setValue (1);

    myEffect = mySolid01.property("Effects").addProperty ("Unsharp Mask") .name = "Unsharp Mask Fine";Adds an effect on this layer

    myEffect = mySolid01.Effects.property ('Unsharp Mask Fine') (1) .setValue (95);

    myEffect = mySolid01.Effects.property ('Unsharp Mask Fine') (2) .setValue (0.5);

    app.endUndoGroup ();Dispose of end group

    ---------------------------

    How the relationship to run the script, when I click on the but_1 ("Sharpen3Way")

    Thank you.

    Hello

    If you have a lot of paperwork and they are short like that, you can turn them into functions and in, click events, the function is called.

    A little off topic but I think it is important, to (1) avoid type windows showcase, pallets are better, (2) you must use the keyword "var" in the declaration of new variables,

    (3) to make attachable take a look at the tutorials from David Torno ([tutorial] after effects ExtendScript written Script).

    Edit: And also (4), you must use matchNames (or index) return to properties, not English name. If you give this script to someone who doesn't have an AE I English, this probably will not work

    For example myEffect should be instead: myEffect = mySolid01.property("ADBE_Effect_Parade").addProperty ("ADBE blur Mask2");

    Xavier.

    (function(){
    
        var win, but_1, but_2;
    
        win = new Window("palette","new project",[0,0,500,500],{resizeable:true,});
        but_1=win.add("button",[33,16,103,36],"Sharpen3Ways");
        but_2=win.add("button",[33+100,16,103+100,36],"Sharpen0Way");
        but_1.onClick = sharpen3Ways;
        but_2.onClick = sharpen0Way;
        win.center();
        win.show();
    
        function sharpen3Ways(){
    
            var myComp, mySolid, myEffect;
    
            // Selectionne la composition active
            myComp = app.project.activeItem;
    
            if (myComp instanceof CompItem){
                app.beginUndoGroup("Sharpen 3 Way");                  // Start Undo Group
    
                // Ajoute un layer Solid
                mySolid01 = myComp.layers.addSolid([100,100,100], "Sharpen", myComp.width, myComp.height,1);
                mySolid01.adjustmentLayer = true;                                                                                                      // Transforme le Solid en Adjustement Layer
                mySolid01.label = 5;                                                                                                                            // Attribue la couleur d'un Adjustement Layer
                mySolid01.transform.opacity.setValue(40);                                                                                                          //  Change l'opacité du Layer
    
                // Ajoute un effet  sur ce calque (unsharp mask)
                myEffect = mySolid01.property("Effects").addProperty("Unsharp Mask");
                myEffect.name = "Unsharp Mask Large";
                myEffect(1).setValue(10);
                myEffect(2).setValue(40);
    
                // Ajoute un effet  sur ce calque (unsharp mask)
                myEffect = mySolid01.property("Effects").addProperty("Unsharp Mask");
                myEffect.name = "Unsharp Mask Medium";
                myEffect(1).setValue(65);
                myEffect(2).setValue(1);
    
                // Ajoute un effet  sur ce calque (unsharp mask)
                myEffect = mySolid01.property("Effects").addProperty("Unsharp Mask");
                myEffect.name = "Unsharp Mask Fine";
                myEffect(1).setValue(95);
                myEffect(2).setValue(0.5);
    
                app.endUndoGroup();                // End Undo Group
                }
            else{
                // ignore or send some alert
                };
            return;
            };
    
        function sharpen0Way(){
            alert("About to do something, ... dont know yet what.");
            };
    
        return;
        })();
    
  • Script: A single layer to set the opacity of the other layers?

    Hello

    I have a lot of layers in my computer whose name begins with "POINTER_".

    I need these layers to falter at the same time.

    But I can't the subcomp or use stencil alpha.

    I don't know that it is possible to make a script on an adjustment layer that would do just that.

    All he needs to do is to allow me to make keyframes this adjustment layer opacity associated then with the opacity of each layer starting by 'POINTER_ '.

    I'm not a guy of script, so it would be great if someone could show me how to do this.

    Thank you very much!

    see you soon,

    Chris

    You don't need a script to do this; you need an expression.

    You can easily bind properties between layers with expressions. In this case, you apply an effect cursor Expression to your layer zero (or just use the property opacity of an adjustment layer). ALT-click on the opacity for one of your layers property then use the pick whip to choose cursor effect or the property opacity of your layer of control. Now, when you change the value of a single layer, the others follow. You can copy and paste the expression resulting from your icon from selection for the other layers. (You can even choose to copy expression only and then paste that to the rest of the layers).

  • Photoshop, lack a right-click Layer point: "new Smart object via copy.

    I'm going crazy, or has this command who found by right-clicking on a layer of object dynamic and is titled 'new Smart Object via Copy' gone?

    I use this command almost every day! Help!

    I can still see it. Is your converted layer?

  • Is there an equivalent for Photoshop adjustment layer masks After Effects?

    I have a clip showing the clouds in a blue sky and the Valley in the bluish shade, and I want to darken the blues of the sky without affecting the Valley. Effects such as Hue/Saturation or curves produce good results on the sky, but apply to the entire composition.

    In Photoshop I would just do something like painting a gradient on the adjustment layer mask, but I don't see an equivalent in after effects CC2015.2 and wonder if I forgot something. Pointers?

    John

    Mast track controls are in the Modes Panel. The second icon in the lower left corner of the timeline will reveal the switches and modes column in the timeline panel, or you can press F4 to switch between them. If the second icon is not selected, then you should also see a switch at the bottom of the column switches switches/Modes.

    Here's how I would setup a colour correction in this train yard shot to put a glance Kodachrome faded on the bottom of the frame without turning the yellow sky.

    If you look very carefully between the cars, you can see the start and the end points for my gradient.

  • Need a written conditional script which involves layer styles and pixelation. Possible payment may be negotiated.

    I am a freelance illustrator who uses extensively layer styles in my workflow.  As the pixelation and the implementation of a new layer style is constant and ongoing, I would like a way to rationalize the actions of 3-4 that I use currently in a single conditional script.  I am currently using CS6.  Here's the description detailed of how I want the script to run:

    (1) is the selected layer named "layer magic 1"?  Otherwise, go to the #2 line.  If Yes, go to the #8 line.

    (2) is the selected layer named "magic layer 2?  Otherwise, go to the #3 line.  If Yes, go to the #8 line.

    (3) is the selected layer named "layer Magic 3"?  Otherwise, go to the #4 line.  If Yes, go to the #8 line.

    (4) is the selected layer named "layer Magic 4?  Otherwise, go to line 5-7 bolt torque.  If Yes, go to the #8 line.

    (5) make the new layer.

    (6) new name "Layer1" layer magic

    (7) add the layer style (also nominated) "magical layer1.  Script concludes.

    (8) the layer is empty?  If Yes, go to the #9 line.  Otherwise, go to line 10-12 bolt torque.

    (9) queue dialog box: "the end of magic layers?  with the choice of the 'yes' or 'no '.

    • If "Yes" is selected, the layer is removed.  Script concludes.

    • If "no" is selected, the layer is kept (no change).  Script concludes.

    (10) rasterize layer.

    (11) rename the layer 'layer of paint '.

    (12) merge the layer down.  Go to the line of 5-7 bolt torque.

    I would prefer if possible javascript, because I will need for the script between my Mac desktop and my Windows Tablet of the Cintiq based on the port.  Any help would be greatly appreciated; It took me some time to try to learn the writing of scripts, but between labor day and the night in freelance, I managed only by creating extreme levels of frustration!  Laughing out loud!  PLEASE AND THANK YOU!

    Good guys, has been able to play a bit with what I learned between both of you and others and come to this:

    (1) function main() {}

    2)

    (3) var __indexOf = [] .indexOf | function (Item) {for (var i = 0, l = this.length; i)}< l;="" i++)="" {="" if="" (i="" in="" this="" &&="" this[i]="==" item)="" return="" i;="" }="" return="" -1;="">

    4)

    (5) var makeNewLayer = function() {}

    (6) var newLayer = doc.artLayers.add ();

    (7) newLayer.name = 'magic layer1.

    (8) newLayer.applyStyle('magic layer1');

    (9) doc.activeLayer = newLayer;

    10)            }

    11)

    (12) var doc = app.activeDocument;

    (13) lay = doc.activeLayer,

    (14) names = ['magic layer1',

    "(15) ' magical layer2.

    (16) ' magical layer3.

    ["(17) ' magic layer4"];

    18)

    (19) if (__indexOf.call (name, lay.name)< 0="" )="">

    (20) newLayer = doc.artLayers.add ();

    (21) makeNewLayer();

    (22) return;

    23)            }

    24)

    (25) if (doc.activeLayer.kind == LayerKind.NORMAL & doc.activeLayer.bounds [2] == 0 & doc.activeLayer.bounds [3] == 0) {}

    (26) var dialog = confirm (the ' magical sleep end? ");

    (27) if (dialogue) {}

    (28) app.activeDocument.activeLayer.remove ();

    29)                }

    (30) return;

    31)            }

    (32) var idrasterizeLayer = stringIDToTypeID ("rasterizeLayer");

    (33) var desc5 = new ActionDescriptor();

    (34) var idnull = charIDToTypeID ("null");

    (35) ref4 var = new ActionReference();

    (36) var idLyr = charIDToTypeID ("Lyr");

    (37) var idOrdn = charIDToTypeID ('Ordn');

    (38) var idTrgt = charIDToTypeID ("Trgt");

    (39) ref4.putEnumerated (idLyr, idOrdn, idTrgt);

    (40) desc5.putReference (idnull, ref4);

    (41) var idWhat = charIDToTypeID ('what');

    (42) var idrasterizeItem = stringIDToTypeID ("rasterizeItem");

    (43) var idlayerStyle = stringIDToTypeID ("layerStyle");

    (44) desc5.putEnumerated (idWhat, idrasterizeItem, idlayerStyle);

    (45) executeAction (idrasterizeLayer, desc5, DialogModes.NO);

    46)

    (47) doc.activeLayer.merge ();

    (48) doc.activeLayer.name = 'base paint layer;

    (49) makeNewLayer();

    (50) return;

    51)

    52)        }

    53)

    (54) main();

    I know it's a little ugly code lines 32-45, but (through other channels, thank you JJMack & c.pfaffenbichler!), I realized that there is no way to script, the rasterization of a "layer Style" others that using ScriptingListener.plugin.  DBarranca  Yes... I realized a little I "screwed the dog" on the diaper change after that I played with him for a while.  Also a little, visited account that the "new layer" you were a little enough to add was not going to solve my problem. ended up having to add a "new layer" on line 20.  Everything seems to work exactly as I intended at the moment.  I DO, however, like the idea of having an error message "cannot find the magic layer1 Style".  How would I want to add that in?

    Thanks again,

    -Eric P

  • Script to change layer opacity

    Hello!

    I want to create a script that reduces current layer opacity by 5. Here's what I have now:

    app.activeDocument.activeLayer.opacity -= 5;
    

    The problem is, when I map the script to a shortcut key and press the key several times (for example to set the opacity to 50%), it's normal from 100 to 95, 95-90 and so on up to 75%. Since then, he's going to 69% (70%). Then it proceeds as it should (69-64, 64 - > 59 >).

    He breaks also with 24% (24-18 >), if that matters.

    I use Adobe Photoshop CS6 8.1 Windows (x 64).

    Why what is happening (decrease by 6 when I have 5 in my code)? I'm doing something wrong? Sorry if this question is stupid, I'm brand new to Photoshop scripts...

    ahawktom,

    the opacity is not a rounded value and opacity works with percent.

    Try something like this:

    if (app.activeDocument.activeLayer.opacity > 5) {
        app.activeDocument.activeLayer.opacity = Math.round(app.activeDocument.activeLayer.opacity) -5;
        }
    

    Have fun

  • FX disappear when I double-click Layer?

    I have a publication with about 8 layers on a layer .avi. The upper layers are effects of light and the update.

    I double-clicked on my .avi accidentally layer, and now the FX appear on video. I checked the eye icons and FX boxes to make sure that everything is turned on and they are all.

    I guess that by double-clicking a layer it shows individually and 'cut' on the other layers. However, how can I get the entire Composition to redisplay all of the layers and effects?

    Thanks for the help!

    Double click on a layer of film opens the film. Only, the effects are applied in a composition. If you want a layer, you can see the FX in the window of only this layer solo composition. If you open the film window, you can see, well, just images. It is completely logical. Simply close the window film or switch to the compose window to view your project.

    Here are the basics. Please go through the help files to learn more about the different panels in AE and what they do.

  • Script to copy layer in another open Document/group?

    Hi, I know that this topic has been covered several times before. But to clarify, here's what I asked:

    Copy the active layer/group into another document opened in Photoshop. The easiest way is to go to the «layer/double layer...» ». But it is very tedious. To begin with, when you choose this method and then select the document you want to copy in the menu drop-down, successfully, copy the layer/group for this document, but it is not auto-switch (unlock) in the document, he just copied in. You have to hit 'Ok', and then manually search through the open documents list via (window / * choose your document *) to get there. It is a nightmare when you try to do several times.

    Here's what I asked:

    It is possible to:

    (a) copy the active layer/group in the Clipboard/memory

    (b) switch to another document in Photoshop * via a personalized menu * which shows all existing documents

    (c) one time positioned on the new document, paste this layer/group from the Clipboard into this document

    .. is this possible?

    At the very least, is there scripts that anyone knows of that allows the user to switch between existing documents via a custom instead of going to the window menu / * choose your document *?

    Hi @boo radley 2013.

    do you mean something like this?

    // LayerPaste2anotherDoc.jsx
    // https://forums.adobe.com/thread/1496531
    
    // regards pixxxelschubser
    
    var aDoc = app.activeDocument;
    var AllDocs = app.documents;
    var actLay = aDoc.activeLayer;
    
    if (AllDocs.length > 1) {
    var itemDoc = null;
    actLay.copy ();
    
    var win = new Window("dialog","Copy the active layer");
    this.windowRef = win;
    win.Txt1 = win.add ("statictext", undefined, "Paste in which open document?");
    win.NewList=win.add ("dropdownlist", undefined, AllDocs);
    
    win.NewList.selection = 0;
    itemDoc = win.NewList.selection.index;
    
    win.cancelBtn = win.add("button", undefined, "Abbruch");
    win.quitBtn = win.add("button", undefined, "Ok");
    win.defaultElement = win.quitBtn;
    win.cancelElement = win.cancelBtn;
    win.quitBtn.onClick = function() {
    win.close();
    }
    
    win.NewList.onChange= function () {
        itemDoc = win.NewList.selection.index;
        return itemDoc;
        }
    
    win.show();
    
    app.activeDocument = app.documents[itemDoc];
    app.activeDocument.paste();
    app.refresh();
    } else {
        alert ("No other documents open")
        }
    

    Have fun

  • Photoshop CS6 [command + click] layer selection "Problem" solved

    Good afternoon fellas,.


    I recently noticed something rare when working with Photoshop CS6 under Mac OS X 10.8.x.
    When I tried of course select a layer by the [command + click] (say) shortened, it failed. This little thing was driving me crazy, and I don't know that he must do some people without hair, too.

    Anyway (s), looking at another thread to read-only, I noticed the problem has not been resolved and received pretty lame recommendations. Luckily, I finally found the solution and was able to solve this small inconvenience that maybe we've all experienced. So here's the workaround solution, then maybe you never will consider downgraded to 5.5 again as I was thinking:

    (1) in Photoshop, make sure that the move tool is activated by pressing "V";
    (2) in the submenu of the tool, forget the selection/marking 'automatic selection '. I know that sounds nonsense, believe me;

    (3) Although, sure of 'sex' is selected next to the 'Automatic Selection' button and you should be as I am.

    I hope this can help some people! I would be very happy to know, since I just created this account to help you guys.
    I don't know if this problem has been resolved and already posted, I'm sorry. I want to just make sure that we will all be happy!

    See you soon,.
    "Let him go, Jack."

    I was wrong! The Cmd key override to always activate the automatic selection. She calls the opposite behavior from the setting.

    If the box is checked, Cmd will disable temporarily Autoselect.

    If the check box is cleared, Cmd will temporarily allow automatic selection.

  • Script triggers multi-layer Document as PDF

    I have a PDF form that has a total of 5 pages with text fields and the navigation buttons. I would like the form to hide/show pages based on user input. For example, the user will start on page 1. Once the user fills all fields on page 1 that the user clicks on a button that I placed on the button of the page titled "Next", and at this stage of a validation script should be triggered when the clicks from users on the button to make sure that all fields are completed before displaying the information on Page 2. Basically, I would like my form to guide the user to the next page until the previous mandatory fields are completed before the next page appears (not hidden). If the previous page fields are not met, then the next page (s) will stay hidden.

    How can I go on my form design to do? All your advice, the entry and help is greatly apreciated!

    You can use templates for that:

    http://livedocs.Adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/common/HTML/wwhel p.htm? context = Acrobat9_HTMLHelp & file = JS_Dev_Templates.80.1.html

  • Command-mouse click Layer groups now moves instead of specific layers? Why?

    Adobe,

    Please, help - it's really affecting workflow. Before the version 2015.1 allowing you to be able to hold the command + mouse on a layer to the specific content movement which layer. Now, you do the same and it selects the layer, but when you move it, then moves the top layer of parent GROUP. I really need to move a single layer only. It's touching things so that it is now unusably slow workflow-wise for people who know the shortcuts. Help, please!

    Is the whole of the move tool for 'Automatic 'group' Selection' or 'Layer' in the Options bar?

    Could you please after screenshots (with the Panel visible layers) to illustrate the question?

  • Is there an equivalent to a click for a DataGridColumn event?

    I wanted to call a function when some a column has been enabled in a DataGrid control. However, before completion of Flex seems to show that there are only two events available for a DataGridColumn: turn on and off. There is no event not called 'click' or something similar listed.

    I know that by clicking on a column called the function of sorting on this column, so is there something that can be done with it? What I basically want to do is is clicked on a column every time I want a global variable (let's call it "clickedColumn") to change the ID of the column that was clicked.

    Is there a property "this.id" is told in the way that I can use; It would make my life a little more convenient too.

    Here's the solution that worked for me, for someone who is interested:

    http://StackOverflow.com/questions/3447279/Flex-question-about-the-sortcomparefunction-of-de the datagridcolumn

  • IDOC equivalent Script PHP $_POST and $_GET

    I did a few shallow Google research on this issue and I turned up without relevant discussions.

    I know that Idoc was probably not designed to allow such client-server interactions, but query to the server and receive answers would greatly stimulate my development capabilities without having to develop custom components.

    No, the concept is a bit different.  No matter if the variable is in the query string (' $_GET ') or in a form field (' $_POST '), once it is passed to the content server, it is all present in the local data.  One thing to know is that several variables with the same name are met ('name' is your case), said the last instance of the variable is located in the local data.

    To convert this

    <>

    If ($_POST ["name"] == "Bob") {}

    echo "Hello, Bob."

    }

    else {}

    echo "you aren't Bob.";

    }

    $>

    to IDOC

    <$if strequals(#local.name,"bob")$="">

    Hello, Bob

    <$else$>

    You aren't Bob

    <$endif$>

  • layer dimensions/dimensions - where to find in CS6?

    Hopefully not a stupid question, but where to find the dimensions of the layer for each layer in CS6?  for example I could have a table overlaid on the background image but want the pixcel based on the dimensions of the table?

    Cmd-click Layer thumbnail to select its pixels. Info panel indicates the width and height of the rectangle enclosing.

Maybe you are looking for