Script to extend or reduce the layers?

Hi all

I saw a little of this topic in the forums but no real resolution it seems? Like many others, whenever I open a file, layers are spread randomly in the layers palette, which is very frustrating and a lot of time to process.

Is it possible to run a script that collapses and/or extends to all the layers?

Thank you very much!

S

Sorry but no, not possible with scripts.

Just note that enlargement is not random, you will have layers will increase if you have a sublayer.

Tags: Illustrator

Similar Questions

  • If my Macbook Pro is under Applecare extended it reduces the cost of replacing the battery?

    If my Macbook Pro is under Applecare extended it reduces the cost of replacing the battery?

    How much is usually charged for the replacement of the battery?   (in the United Kingdom)

    Thank you

    If it's a warranty or Apple Care + the covered replacement instance, it should be free.

    Otherwise:

    Mac Service Pricing - Support Apple laptops

    https://support.Apple.com/en-GB/Mac-notebooks/repair/service/pricing

    13/15 inch MacBook Pro £99 INCLUDING VAT.
  • Extend or reduce the clip all in key early and late keeping images of the

    I make videos of forumalic, using similar effects in each, but the timing is different. For example in a video my video "1 Point" may 1 minute maximum, and in the next video"Point 1" will be 1.5 minutes long.  I have keyframes at the beginning and end of the text overlay that move the text and change its opacity.  Unfortunately when I extend the text clip, keyframes remain where they were and do extend the Summit again.  I got that by chopping the clips in two pieces, a piece of beginning and end and then drag end to the end piece and then bridge the gap with the adjustment tool. It is heavy and requires that replicate the content of the text in the two clips of different text.

    Is it possible to extend or retract a clip while keeping the relative positioning keyframes forward and the end of the clip itself?

    Copy the clip before you change the duration. Once you have extended/shortcut use Paste attributes. You have a possibility to maintain or stretch time.

    May not work for all situations of keyframing.

  • Photoshop script to copy all the layers of close PSD to open the current document

    Hi, I have very limited capacity script so this task is above my pay grade

    I'm looking for a script to read and copy all the layers in a PSD saved file and copy them into the current active document. The two documents have the same size and I need to be able to change text layers after copying. Anyone has any advice or examples of how I might be able to do this?

    Thank you in advance for any help you can offer.

    Kind regards

    Marcus

    Try the script in entry below. You must open the destination file, and you must put in the path and name where your source file. It will not choose a layer from background from the source file.

    #target photoshop
    var sFile = new File('~/desktop/template.psd');//change path to template file
    var doc = activeDocument;
    var sDoc = open(sFile);
    
    var idselectAllLayers = stringIDToTypeID( "selectAllLayers" );
        var desc2 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref1 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref1.putEnumerated( idLyr, idOrdn, idTrgt );
        desc2.putReference( idnull, ref1 );
    executeAction( idselectAllLayers, desc2, DialogModes.NO );
    
    var idDplc = charIDToTypeID( "Dplc" );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref2 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref2.putEnumerated( idLyr, idOrdn, idTrgt );
        desc5.putReference( idnull, ref2 );
        var idT = charIDToTypeID( "T  " );
            var ref3 = new ActionReference();
            var idDcmn = charIDToTypeID( "Dcmn" );
            ref3.putName( idDcmn, doc.name );
        desc5.putReference( idT, ref3 );
        var idVrsn = charIDToTypeID( "Vrsn" );
        desc5.putInteger( idVrsn, 5 );
        var idIdnt = charIDToTypeID( "Idnt" );
            var list1 = new ActionList();
            list1.putInteger( 3 );
            list1.putInteger( 4 );
        desc5.putList( idIdnt, list1 );
    executeAction( idDplc, desc5, DialogModes.NO );
    
  • Interactive PDF layers appear behind the text. A script can move them to the top layer?

    I have created a form in InDesign CC (latest version on a Mac under El Capitan). I export the form in PDF format. There are some interactive tooltips (with suggestions on how to fill in each particular field) implemented as buttons. The control keys are static. When I click on the trigger, the bubble appears, when I click on the bubble, it disappears. The problem is that even if the bubbles are set up on the top layer in InDesign, in many cases they appear behind the text layer.

    Is there a script that I can add to each individual bubble that says "when this bubble is active, move it to the top layer?

    This project took over 3 weeks of troubleshooting. In the end I came up with my own results. The answer was "no, it isn't a script."

    With the help of the Adobe customer service, we found that because in the InDesign file, I had the pop-ups on a different layer than the triggers, it was causing a problem of overlap. I found myself by combining the layers into a single, moving pop ups to the elements high on the page in the layers palette.

    Then I exported (interactive) PDF from InDesign and in the PDF file, in edit mode, in the fields Panel, I've selected all the pop-ups and offers them to at the bottom of each page [z-index property]. A lot of manual labor, but in the end, I got most of the results I wanted.

  • Need help with custom script to rename the layers

    Hello world.

    I need help to write a custom script (because I suck at it) that will allow me to go through all the layers and sous-calques for a specific name ('X') and give it a new specific name ('Y').

    I have had success using the script below, but it does not work on any text layers names where the text layer was previously particularly well-known in 'X' and now changed needs.

    Any help is greatly appreciated.

    * Note: this script was originally used to find any layer with 'Copy' in its name and remove with anything after (to correct the problem of duplication of layers by adding this text).

    This is why the function is named removeCopy. It works for renaming layers also - just not a layer of text unfortunately.

    #target illustrator

    function removeCopy() {}
    If (app.documents.length == 0) return;
    var app.activeDocument = docRef;
    recurseLayers (docRef.layers);
    }
    removeCopy();
    function recurseLayers (objArray) {}
    for (var i = 0; i < objArray.length; i ++) {}
    ObjArr [i] .name = ObjArr [i].name.replace (/ \s*current name\s*\d*/, 'new name');
    If (objArray [i] .layers) recurseLayers (. layers.length > 0 ObjArr [i]);
    }
    }

    I finally found something after searching forums for a week. My confusion was related to the way Illustrator treats real layers against text/path/object "layers." Instead of layers, I had to use the pageItems in the script. The code below works. Thanks to Gustavo for his answer in another thread and Carlos I thank you for this looking too good! You're great to be ready to help models do more advanced things with Illustrator.

    var doc = app.activeDocument;
    var items = doc.pageItems;
    for (var g = 0; g)
        elements [g] .name = elements [g].name.replace ('Century Schoolbook text line', ' MonogramText: Century Schoolbook ");
    };
    App.Redraw ();
  • script or action that removes the invisible layers.

    Hello

    I'm looking to automate deleting weather invisible layers they are in groups or locked.

    I currently have an action that:

    Selects all layers,

    runs a command of 'blocking layer' with all the options to unlock all layers, uncontrolled

    delete hidden layers.

    It works well enough, but the problem is: If there is a closed group, open it all layers command does not work on it and all else fails.

    is there a way to do this with actions?

    and if not I tried to do a rudimentary script for her

    so far, I have this

    for (i = app.activeDocument.layers.length; i > 0; i--)

    {

    if(App.activeDocument.Layers[i-1].allLocked) app.activeDocument.layers [i - 1] .allLocked = false;

    If (! app.activeDocument.layers [i - 1] .visible) app.activeDocument.layers [i-1] .remove ();

    }

    the problem is once again, it's that it doesn't work for the layers within groups.

    I found this thread delete all groups and layers that are turned off, even if they are locked

    and the script in there blocking my photoshop.

    any help would be much appreciated.

    To do this, you need to use recursion when you encounter a group of layers, you must treat its layers.

    processArtLayers (activeDocument);

    ///////////////////////////////////////////////////////////////////////////////

    Function: processsArtLayers

    Entry: document or layer set

    ///////////////////////////////////////////////////////////////////////////////

    function processArtLayers (obj) {}

    for (var i = obj.artLayers.length - 1; 0<= i;="" i--)="">

    try {}

    {if(!obj.artLayers[i].visible)}

    }

    catch (e) {}

    }

    for (var i = obj.layerSets.length - 1; 0<= i;="" i--)="">

    processArtLayers (obj.layerSets [i]);

    }

    }

  • Script to change the selected layer to one of the drop-down list in the layers palette colors

    Hello!

    I was wondering if anyone knows of a script that would allow me to change the selected layers (single or multiple selection) in 'Light Blue' or all the colors in the menu drop-down? (see attached screenshot)

    I found the following but it changes all layers and is the RGB color.

    -----

    say application "Adobe Illustrator"

    set current_Layer in current document

    view the dialog box "in the current document there is" & layersCounter & "layers." & "Recolor label layers?"

    Repeat until (layersCounter = 0)

    set color of layer layersCounter in the current document to {Light Blue}

    set layersCounter to layersCounter - 1

    end Repeat

    end say

    -----

    Screen Shot 2015-06-12 at 10.46.46 AM.png

    I don't know how the script so any help is greatly appreciated. Thank you in advance!

    John

    as far as I can tell this is only possible with a few other modifications... Since 'selected' is not a property of "layers" javascript cannot determine if you see a highlighted layer in the layers panel.

    you could do one of 2 ways. Depending on how many layers you want to change the color, you can either make those visible or hidden (for example, if you want to change to 80% of the layers of a specific color, hide others 20%). and then simply add a clause inside the loop if for.

    var doc = app.activeDocument;

    var layers = doc.layers;

    Blue of var = new RGBColor();

    Blue.Red = 79;

    Blue.Green = 128;

    Blue.Blue = 255;

    for (i = 0; i<>

    If (layers [i] .visible == true) {}

    var = aLay layers [i];

    aLay.color = blue;

    }

    }

  • script to rename the layers in alphabetical order

    Hello world

    I have a name change script that works only on the numbers and I want to make it work for the letters too.

    What I want to achieve is to select a few layers-> load the script-> enter the desired name of the layer and brackets insert the letter of where to start. The script then iterates through the alphabet rename the layers and adding the letter from coresponding to the name and remove the brackets. For example, I select 4 layers, loading the script and when the guest comes on... Enter the name: test [C]. In the end, that I should have renamed layers testC testD, tests, testF

    Any help would be appreciated!

    Thank you

    So what you wanted, it is for renaming selected objects, no layers, right?

    Check this script, I took a different route, I added some comments, if you have problems with it, do not hesitate to ask

    // this script Renames selected Objects with a base name plus an incremental suffix
    // Carlos Canto // 07/03/2013;
    // http://forums.adobe.com/thread/1243774?tstart=0
    
    var doc = app.activeDocument;
    var sel = doc.selection;
    var rename = prompt("Enter the name and ONE character suffix (comma separated, no space):","test,A", "Increment Rename Selected Objects");
    if (rename!=null) {// quit if pressed Cancel
        var nameArray = rename.split(","); 
    
        var base = nameArray[0];
        var suffix = nameArray[1];
    
        var charCode = suffix.charCodeAt (); // convert the suffix character to Unicode
    
        if(sel.length>0){
            for(var z=0;z		   
  • Scripting inDesign: Loop through the layers

    I'm doing a script that will:

    To loop through all the layers in a document.

    Add the layers unlocked in table

    Loop in this table and glue them in place on each layer.

    I don't know how to loop through all the layers.

    Here is my script (I used? to represent where would the loop through all the part of layers):

    JavaScript document

    Set up a table to keep unlocked layers

    var layercollection = [];

    Browse layers and unlocked the layercollection table

    for (i = 0;? i ++) {}

    app.activeDocument.activeLayer = app.activeDocument.layers.itemByName (?);

    If (app.documents [0] .layers.) ([i]). Locked) == false;

    layercollection.push (Layers.itemByName ([i]))

    }

    Loop in table layercollection and paste in place

    for (i = 0; i < layercollection.length; i ++) {}

    app.activeDocument.activeLayer = app.activeDocument.layers.itemByName (tl [i]);

    app.pasteInPlace (); Dough

    }

    Can someone help me complete my script.

    Thank you!

    Did you test them all your solutions in a real world scenario?

    Theoretically, it should work this way (if one ignores that a layer is invisible, too), but even without the problem of invisible layers app.pasteInPlace () prefer to paste into the original layer, if the option "Paste remembers Layers" is checked.

    So I recommend you do the following:

    var oldPasteRem = app.clipboardPreferences.pasteRemembersLayers;
    //uncheck "Paste Remembers Layers"
    app.clipboardPreferences.pasteRemembersLayers = false;
    
    for (i = 0; i < app.activeDocument.layers.length; i++) {
    
        //Maybe the user does not want objects pasted to invisible layers:
        if(app.activeDocument.layers[i].visible == true && app.activeDocument.layers[i].locked == false) {
            app.activeDocument.activeLayer = app.activeDocument.layers[i];
            app.pasteInPlace();
        };
    };
    //Restore the old condition:
    app.clipboardPreferences.pasteRemembersLayers = oldPasteRem;
    

    Uwe

  • Reduce the size of the PDF file after extending player features.

    When you create dynamic PDF form in LiveCycle Designer ES 8.2.x, the size of the file is < 200K. At the opening in Acrobat 9 Pro and extending to the Acrobat Reader, the file size > 1.2 MB. Is it possible to reduce the size of the file?

    Thank you!

    -Christelle

    Hello

    Check out the blog of John Brinkman here, which has several links to other discussions: http://blogs.adobe.com/formfeed/2010/09/xdp-size-matters.html.

    Hope that helps,

    Niall

  • Can there be a script to reduce the images by a percentage?

    Hello

    I'm trying to decrease the file size of a .swf file.  To do this, I'll have to export all images in flash in photoshop, then reduce the size to a certain % to maintain the proportions of the origianl images in the. Fla.  After they have been downsized, I have to then reinsert them into flash and then place them were they should be to ensure that everything is in place correctly.  yeesh.

    So to make my life a little easier, is there a way to set photoshop so that these images (all in a certain folder) can be treated so that they are say, 60% of the original size for each of them?

    Any help would be greatly appreciated.

    If you can create folders on each image that Photoshop should be able to do for you that action of one simple step should you need not a script. Use file menu > Automate > batch Point dialog box to your files and your little batch resize action.  Checking size of Resample image and constrain select the interpolation like Bicubic Sharper method and set the width on the pecent of the initial width like 90%

  • Script: rename the layers?

    Hi, is there a quick way to renumber or rename the lot all the layers in a file so that they would be called the number? Doesn't have to be from the exact number, I was wondering if maybe there's some kind of script that could help me with this? Thank you Pavel

    #target illustrator

    var app.activeDocument = docRef;

    with (docRef) {}

    for (var i = 0; i)< layers.length;="" i++)="">

    layers [i] .name = layers.length - i;

    }

    }

  • After you load a DNG file in the editor, the menus of layers are not active. IM asked to reduce the color depth of 16 to 8 bits/channel. Why? I would like to make a levels adjustment layer. If I directly in the initial layer didn't pronblem

    Does anyone have an explanation?

    Dudocar wrote:

    Does anyone have an explanation?

    Elements does not manage the layers in 16-bit mode.

  • How to copy the name of the track in the layers panel to the center of the path object / in my file HAVE?  Is there a native function or some kinds of scripts that could be done?

    For example, I have a map of the United States.  Each State is a path and was named in the layers panel.  I want now to generate the name of the State in the layers panel is automatically center the text within each State/access path.  Each file will also be saved as an svg once completed.  I want to do this so that it saves me time from having to manually type the name of each State in the State.

    This should help you get started.

    will do most of the work.

    I would just be manually tweaking the position of those who do not look correct.

    function Qwertyfly_name_to_text(){
        var doc = app.activeDocument;
        var sel = doc.selection;
        for(var i=0; i		   

Maybe you are looking for