Script to select a hidden layer (if it)

So I will have two versions, one for the tl; Dr. crowd and for people to attention to detail.

The short version:

Is there a way to make a script that will reveal a hidden layer and select it. For me it would be the next layer to the top of the selected layer - like photoshop select before layer ([option +]), except that the function ignores hidden layers.

The long version:

I have a lot of files having 4 layers of each, and I want to align these 4 layers by hand. First of all, I need the visible 2 background layers to align and then layers #2 and 3, then layers #3 and 4.

I have the upper value difference mode, to align the purposes of fusion. So my workflow is as follows:

(1) align two layers by hand.

(2) change the blending mode of the top layer to difference to normal

(3) make visible the next layer above

(4) select this layer

(5) repeat

I know it's not much, but I do this hundreds of times per session. It would be a huge time saver to automate this process.

I don't know much about scripts, so I'm quite in the dark about how to do this. In the end, would I be able to activate the script with a keyboard shortcut?

Thank you in advance for your help, I hope it all works!

B

I also do a lot of that. Try this:

#target photoshop

var doc = activeDocument;
var cLay = doc.activeLayer;
var layNum

var aLay = new Array()

for(var i=0;i 
         

Tags: Photoshop

Similar Questions

  • Illustrator script to select more than one layer

    I have about 74 layers in illustrator and I want to run a script to select the combination of layers at once.

    Because for example I want 5 layers to be selected and save as a .jpg. So say I want to select other 3 layers to save it as a separate .jpg file. If I do it manually, it is up to 300 000 images.

    Can I create a CSV with all layers to select presented in a row. I need help with command to select 4 or more layers at the same time to tell if I layer1, layer2, Layer 3, layer4 then a command to select the 4 layers and save as a .jpg file.

    Any help will be greatly appreciated.

    Thank you

    H Patel

    PRESIDENT AND CHIEF EXECUTIVE OFFICER

    Data entry India

    Another variant - with the visibility of the layer

    var layerCount;

    layerCount = app.activeDocument.layers.length;

    for (j = 0; j<>

    {

    app.activeDocument.layers [j] .visible = false;

    }

    var County;
    Count = 1;

    var f = new File ("C:\\test.txt");
    f.Open ("r");

    while(!f.EOF)
    {
    c = f.Readln ();

    var arr = c.split(";");

    var len = arr.length;

    for (i = 0; i<>
    {
    throw = app.activeDocument.layers.getByName (arr [i]);

    Lay.Visible = true;
    lay.hasSelectedArtwork = true;
       
    }
    var exportOptions = new ExportOptionsJPEG();
    var type = ExportType.JPEG
    fileSpec var = new File("c:\\"+count+".jpg");
    app.activeDocument.exportFile (fileSpec, exportOptions type);

    for (i = 0; i<>
    {
    app.activeDocument.layers.getByName(arr[i]).hasSelectedArtwork = false;

    app.activeDocument.layers.getByName(arr[i]).visible = false;

    }
    Count ++;

    }

  • How to add (or subtract) a selection to a layer mask existing?

    If I already have a layer mask, I have a selection, and I want to add that selection to the mask layer (I want the layer mask to reveal more), how can I do?

    The way I would do it now (it's too long) is Ctrl + click on the layer mask, add to the selection I want to modify it with, except that the selection, remove the mask layer and create a new layer of the saved selection mask.

    I don't know there must be an easier way. I Googled it and found no answer.

    Thank you!

    Create your first hidden layer (1)

    Click on the mask and draw your second selection to be marked (2)

    Edition > fill and fill it white (3)

    Deselect the selection

  • Replace in selected only layers layer names

    I use this script to find and replace words in layers. (The script targets only particular words, rather than the entire layer name).

    I would like to do so it targets only the selected layers.

    I found this script that loops through the selected only layers, but I don't know how to add search and replace the name functioality layer.

    Thanks for any help that can be offered.

    Big_SmiLe wrote:

    Flipping through the guide, it does not seem to "hasSelectedArtwork", is built in function either. Are there tutorials or guides that explain how to target the selected layers?

    Wrong reference manual, see this one:

    http://www.Adobe.com/content/dam/Adobe/en/DevNet/PDF/Illustrator/scripting/CS6/Illustrator-scripting-r standard - JavaScript.pdf

    Page 91 - CHAPTER 1: JavaScript object reference

    Layer

    Property

    hasSelectedArtwork

    Value type

    Boolean

    What it is

    If true, an object in this layer has been selected; set to false to deselect all objects in the layer.

    So, as I have spoken here:

    W_J_T wrote:

    Fix. Yes there is no direct way unfortunately (like many things through script), that's why I suggested using "hasSelectedArtwork", that might work if you select the target layer in the choice of your layers you want to rename.

    and...

    W_J_T wrote:

    if(layerReferenceString.hasSelectedArtwork == true) {}

    code

    }

    Who would offer a way of knowing whether a layer is selected.

    As far as I know that is the only round about way to know if a layer is selected via the script.

  • a set of scripts which selects raster images.

    I would like to automate a set of scripts that selects a raster image (linked file) which has been grouped with the vector art, and then converts them this selected in a vector (vectorization) raster image

    There is a plug-in which adds the choice to select > menu object (Raster Art is one of the choices), so you should be able to integrate that in action:

    http://RJ-Graffix.com/software/plugins.html#SelectMenu

  • Need a script to display the hidden field if number = 568845

    Hi all

    Using Acrobat Pro 9.1 on iMac with OS 10.6.8

    I am working on a form to fill out and need a script to display a hidden field when a button is clicked.

    I've set up a numeric field to type a number, and the hidden field is "text1".

    Now, I need a script to the button open only the hidden field, if the field number = 568845

    In this way the customer can fill in the code and then show and type in the field.

    Any help would be appreciated.

    Ron

    Given that you use it by a button, you can't use event.value because a button has no value, and in any case, you want to check the value of another field. So this place like your button MouseUp event (of course, you have to adapt the name of the text field...):

    If (this.getField("Text1").value == "568845") {this.getField ("Hidden_Field") .display = display.visible} else {this.getField('Hidden_Field').

    display = display.hidden}

  • Macro/script necessary to appoint automatic layer

    Hello. I'm new to the Forum, but I did a search for this and found something similar, but not quite right. I am looking for a macro (that I have used in the past, so I know it exists) which will unlock and name it background layer after the name of the file that YOU OPEN the file in Photoshop. For example: I'm in the bridge/Finder, and drag a file named 'istock123456.jpg' in Photoshop. As the PS opens the file in its own window, instead of the single layer being locked and called 'Background', he will be unblocked and called "istock123456.jpg". I used this macro before at my old job, and it is very useful for SEO to original files when you need to.

    Can anyone help with this? As I said, I found a similar discussion here, but everything is what script to create a new layer empty with the file name on top of the background layer, and you must run it manually because it is not automatic as I speak here.

    Thanks in advance.

    That should do it...

    activeDocument.activeLayer = activeDocument.layers[activeDocument.layers.length-1];
    if(activeDocument.activeLayer.isBackgroundLayer) activeDocument.activeLayer.name = activeDocument.name;
    

    Define event handler Scripts to call this script on the Open Document.

  • Active script that selects all of the items spread

    I'm trying to find a 'simple' script that selects all elements on the page, either a group or individual items without using a dialog window. Is there a selection simple javascript to select all the objects on a page or spread for InDesign CS3? I'm new to this sort of thing script.

    Hey!

    PankChat is right, but you can't 'see' the selection.

    If you want to 'see' what is selected, try this:

    app.select(app.activeWindow.activePage.allPageItems);
    

    tomaxxi

  • Need a FormCalc script to call a hidden button

    I have a FormCalc script on the sending by the Send button Click event. I need to call a second hidden button that uses a JavaScript when the click on send the form by e-mail.

    Each button is working on its own, but I have a problem with the script to call the hidden button display button.

    Thank you

    MDawn

    You can use the method exeEvent of the hidden button.

    In the example, I am executing the Click of Button1 event from a different control below.

    Replace Button1 with full path of your control and the name of the event.

    Button1.execEvent ("Click");

    Thank you

    Srini

  • Photoshop CC Auto-possibilite select the hidden layers

    Hi, I am not sure if this is a bug or what... When I click on and drag with the move of the automatic selection of the multiple layers tool, it will not select only the layers that I wanted, but also layers hidden in the same area of my selection (or at least, layers, which are in the hidden groups).

    For example, say I have a layer group. I duplicate the group, and then make the original group invisible so that I can create an alternative version. When I clock and drag to select the objects in the new group, the (hidden) in the former group objects get selected as well, so I'm obliged to selection click on every article I want to change... forever.

    This is different from all previous versions of PS and a big trouble.

    If someone else can confirm this bug, or is it just me? Or not consider you this as a bug? I see some specific cases where it can be useful, but I would like to control this behavior as a preferece. Maybe there is already a preference for this problem and I just have not found. Any comments would be more useful

    See you soon,.

    Cory

    Discussing this bug here:

    http://forums.Adobe.com/message/5423270#5423270

  • Problem with script of presence visible/hidden

    This is my first post on this forum. I tried to figure this out on my own, but no solution.

    I created a PDF with LiveCycle Designer ES 8.2 v. and trying to drop-down list and a list of drop-down list display state if U.S. is selected province if the Canada is selected using an 'if, ElseIf' statement.

    My screen opens with the two drop-down lists, hidden and I want to show a list of selection only if the United States or the Canada is chosen.

    Here is my script for when the country is selected in the drop-down list. Can someone understand what is happening?  Drop-down list field names:

    cboCo_Name_Country

    cboCo_Name_State

    cboCo_Name_ProvinceI

    PROBLEM: any country I choose, it always go to the final else statement, where the two are hidden. I know because in troubleshooting, I did initially visible drop-down and any country, I chose, both fields have become hidden.

     form1.sf_Page_1.sf_CompInfo.sf_CustAddress.cboCo_Name_Country::change - (JavaScript, client)
    // Change the presence attribute of the state and province fields. 
    if (this.rawValue == "United States") {                    // If country selected is US,  
        cboCo_Name_State.presence = "visible";          // show US States field,    
        cboCo_Name_Province.presence = "hidden";     // and hide Provinces field.  
        
    }
    else if (this.rawValue == "Canada") {                        // If country selected is Canada,
        cboCo_Name_Province.presence = "visible";        // show Provinces field,
        cboCo_Name_State.presence = "hidden";            // and hide US States field.
        
    }
    else {                                                                      // Otherwise, if any other country is selected   
        cboCo_Name_State.presence = "hidden";              // hide US States field,
        cboCo_Name_Province.presence = "hidden";          // and hide Provinces field.  
        
    }
    
    

    Any help is appreciated.

    I found the problem. The rawValues had to be USA and CA and not 'United States' and 'Canada '. I found it on the connection tab.

  • Triggered by a selection of hidden objects

    How do hide you an object that is seen only when triggered by the selection of another object?  Which means, if I click on the checkbox, then only I see the fields to enter an address?  But if the box is never verified, then this address field is never visible.

    Ah, I see.  My script was using the Javascript syntax.  One option is to modify the scripts of language in the drop down in the JavaScript script editor, which will fix your syntax error.

    Or you can use the script below equivalent which is updated for FormCalc

    If ($.rawValue == '1') then

    TextField10.presence = "visible".

    on the other

    TextField10.presence = "hidden".

    endif

    They are different languages with different syntax.  FormCalc the equivalent of 'this' is ' $'.  Also, you will notice the syntax 'if' requires the keyword "do" and requires closing "endif" keyword as well.

    that should fix things.

    Scott

  • Script to select several tables in indesign and editing

    Hi and I hope you can help.

    I need a script that will select all the tables in a doc great indd with tables imported from word.

    I read another question on here need to select all tables simliar

    but I don't have the knowledge of script to modify it according to my needs. I hope someone can help. Hope also I ask not too much either, but here goes.

    I need to select all the tables and the weight of the 0.25pt race

    Then select the row of the top of each column and fill it with 10% black, and make the top line (or cell heights) 'exactly' (not ' at least') height 5.09 mm

    That would make me really, but is it possible to adjust the width of the columns of these tables too using a script and style of cell?

    It would be rank 1 'exactly' mm 112,956 1 cell (cell style 1) and cell 2 row 1 'exactly' 4,956 (cell 2 style)

    Cell 1 (single cell) line 2 117.912 mm (cell style 3)

    1 (single cell) tier 3 the cell (cell 3 style)

    I really hope you can help, because it will allow me to win a load of time.

    Thank you 1 million - in the meantime I will continue to walk through them all manually hoping someone can help before I did all - but it seems that taking me days.

    Thanks again

    Andy

    Password: (ignore the bit of text that says I Anson v Stuart '-c' is just the beginning of the next table)

    start_zpsiby9gwys.jpg

    Finished format:

    finished%20look_zpsjukz9xeo.jpg

    I added the number 2 in the second row of cell 1 all on my own

    Hello

    Use the update below for the height of the top row.

    app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().bottomEdgeStrokeWeight = "0.25pt";
    app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().topEdgeStrokeWeight = "0.25pt";
    app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().leftEdgeStrokeWeight = "0.25pt";
    app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().rightEdgeStrokeWeight = "0.25pt";
    try
    {
    app.activeDocument.colors.item("Black10%").name;
    }
    catch (e){
    app.activeDocument.colors.add({name:"Black10%", model:ColorModel.process, colorValue:[0, 0, 0, 10]});
    }
    app.activeDocument.stories.everyItem().tables.everyItem().rows[0].fillColor = "Black10%";
    app.activeDocument.stories.everyItem().tables.everyItem().rows[0].properties = {autoGrow:false, minimumHeight:"5.09mm", maximumHeight:"5.09mm"};
    

    Thank you

    Kitty

  • Multiple selections on a layer of multiple layers

    I have several objects on a layer, I chose. . How can I have photoshop create a new layer for each selection at the same time? I know I did years ago, but don't remember how...

    file > automate > crop and straighten the will put each in a separate file. You can then use the files load in layers to make each its own layer in a single file.

  • text of the hidden layer disappears

    I'm working on a program for one of my organizations.  The document has two layers.  One contains a content and a hidden on top of this layer contains text boxes used for a table of contents.  The document was designed years ago and has been used successfully through CS5 and CS6.  When I upgraded to CC my text boxes started acting weird and the table of contents does not see the text. It is true that when a text box is on a piece of content.  It does not have the same behavior with residence in a white space.  Video of deliverance can be seen here, InDesign CC problem - YouTube.  Any help appreciated.

    Kevin

    watching the video, I see the symbol in excess, it seems so that objects on which place you the text has simply wrapping applied. Turn off text dressed for this picure.

    Or sekect the blue text frame, choose object / text block Options and check ignore skin.

Maybe you are looking for