Prefix to the names of layers

Hi, I'm not very good at java scripts so I was wondering if you could help.

I would like to be able to select a group of layers in photoshop and run a script that could precede all layer names with what I choose in the script.

I don't want any UI, I just that it adds the prefix and do it, no questions asked. I'll edit the script to edit the text in the correct prefix. It must affect only the selected layers OR layers in a selected folder.

I know it's probably stupid simple.

Thanks in advance.

Ian

Well Yes simple...

#target photoshop;
app.bringToFront();
if(documents.length){
var prefix = "my new prefix-"
var selLayers = getSelectedLayersIdx();
for (var a in selLayers){
    selectLayerByIndex(selLayers[a]);
    activeDocument.activeLayer.name = prefix + activeDocument.activeLayer.name;
    }
}
function selectLayerByIndex(index,add){
var ref = new ActionReference();
ref.putIndex(charIDToTypeID("Lyr "), index);
var desc = new ActionDescriptor();
desc.putReference(charIDToTypeID("null"), ref );
if(add) desc.putEnumerated( stringIDToTypeID( "selectionModifier" ), stringIDToTypeID( "selectionModifierType" ), stringIDToTypeID( "addToSelection" ) );
desc.putBoolean( charIDToTypeID( "MkVs" ), false );
try{
executeAction(charIDToTypeID("slct"), desc, DialogModes.NO );
}catch(e){}
};
function getSelectedLayersIdx(){
      var selectedLayers = new Array;
      var ref = new ActionReference();
      ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
      var desc = executeActionGet(ref);
      if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
         desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
          var c = desc.count
          var selectedLayers = new Array();
          for(var i=0;i 
         

Tags: Photoshop

Similar Questions

  • Script Help: The names of layers from the Excel data

    Hello!

    I'm a noob script and have tried to learn, but unfortunately I just haven't the time. Projects at work keep me in the Bay. In any case, here's my scenario and I hope someone can guide me.

    I want a script that would look at a database (XML, CSV, excel or anything that works) and create separate layers in illustrator based on the data.

    Example: description and part number comes from a database. Name of the Illustrator layer is what I want the automation script. The reason for this request is a 200 point that I don't want to retype.

    Part numberDescriptionName of the Illustrator layer
    33456Point 133456_Item 1
    33457Point 233457_Item 2
    33458Point 333458_Item 3
    33459Point 433459_Item 4
    33460Point 533460_Item 5
    33461Item 633461_Item 6
    33462Point 733462_Item 7
    33463Item 833463_Item 8

    After that, I have all my items, with correct layer names, I export each layer as a separate PDF file. The name of the export file would be identical to the layer name with "_1up" appended to the end. For example, 33456_Item 1_1up.ai.

    I would have a separate illustrator file that contains all the same name of the layer as above and then I place the exported file, he respected the layer. This is where the script of another would be great. Is it possible to make a script that will place an image on a layer that has similar naming structures (the only differences would be the name of the layer would not "_1up")?

    I hope this makes sense and I know that I ask a lot. I thank very you much in advance!

    still not sure why export you all the layers to separate the files only to place them all back again?

    but this will get your layers created.

    var line,lay,myLayers = [];
    var csvFile = File('e:/csv.csv');
    csvFile.open( 'r' );
    while(!csvFile.eof){
        line = csvFile.readln();
        line = line.replace(',','_');
        myLayers.push(line);
    }
    csvFile.close();
    var doc = app.activeDocument;
    for(var i = myLayers.length - 1; i > 0; i--){
        lay = doc.layers.add();
        lay.name = myLayers[i];
    }
    var oldLayer = doc.layers.getByName('Layer 1');
    oldLayer.remove();
    

    CSV should simply be:

    33456, point 1

    33457, point 2

    ...

  • Make a text file, xls or a doc in the names of layers in Illustrator

    I make medical graphics.

    The doctor sent a spreadsheet with 1000 points and I need to draw.

    I would like to import its terms in layers, so I need to cut and paste 1 K things.

    Y at - it an existing script that can do this?

    (I have almost zero coding skills)

    ImportFileNames.png

    Thank you!

    Ensure that:

    function LayersFromColumns() {}

    var doc = app.activeDocument;

    var src = File.openDialog ("select a .txt file only column");

    if(SRC == null) {}

    return;

    }

    content of the var;

    CBC. Open ('r');

    content = src.read ();

    CBC. Close();

    var layerNames = contents.split(/\n/g);

    var thisLayer;

    for (var i = 0; i)

    thisLayer = doc.layers.add ();

    thisLayer.name = layerNames [i];

    };

    };

    LayersFromColumns();

    It is very basic, so you really need to remove the default layer in a new document, or all in force layers if you already had some - because this thing will simply add new layers.

  • Changing all the names of layers in capital letters

    I tried to clean the layers in a document (s) with the following script.  Everything works except for the line in capital LETTERS.

    Someone at - it ideas?

    function standardizeLayerNames()

    {

    var myDoc7 = app.activeDocument

    var myLayerCount7 = myDoc7.layers.length

    for (var myCounter7 = 0; myCounter7 < myLayerCount7; myCounter7 ++) {}

    var selectLayer7 = myDoc7.layers [myCounter7]

    selectLayer7.visible = true

    selectLayer7.locked = false

    selectLayer7.name = selectLayer7.name.replace (' '-', '_')

    selectLayer7.name = selectLayer7.name.replace ("", "_")

    selectLayer7.name = selectLayer7.name.CaseChangeType.UPPERCASE

    }

    }

    function standardizeLayerNames() {
              var myDoc7 = app.activeDocument;
              var myLayerCount7 = myDoc7.layers.length;
              for (var myCounter7 = 0; myCounter7 < myLayerCount7; myCounter7++) {
                        var selectLayer7 = myDoc7.layers[myCounter7];
                        selectLayer7.visible = true;
                        selectLayer7.locked = false;
                        selectLayer7.name = selectLayer7.name.replace(/[- ]/g, "_").toUpperCase();
              }
    }
    
  • Reg: Get the character of prefix in the name of the attachment

    Hi all

    E-mail using burst works very well... But faced with a problem with a future prefix character, as well as the PDF output.

    How to solve this problem?

    for example:

    Instead of Purchase_Order_12345.pdf, his coming as xdo1purchaseOrder_12345.pdf

    Use control file was: -.

    * <? XML version = "1.0" encoding = "UTF-8"? > *.
    * < xapi:requestset xmlns:xapi = "http://xmlns.oracle.com/oxp/xapi" > *.
    * < xapi:globalData location = 'flow' > *.
    * < / xapi:globalData > *.
    * < select xapi:request = ' / UPOXPRPOP/LIST_G_MANUAL_PO_NUM_TYPE/G_MANUAL_PO_NUM_TYPE/LIST_G_CF_PO_TYPE/G_CF_PO_TYPE ' > *.
    * < xapi:delivery > *.
    * < xapi:email server = "xxxx" port = "25" = "[email protected]" reply-to = "[email protected]" > *.
    * < xapi:message id = "123" to = "[email protected]" cc = "" attachment = "true" content-type = "text/html" subject = "order form ${POH_PO_NUM}" > * "

    * You will find attached Purchase Order Number ${POH_PO_NUM}. *

    * < / xapi:message > *.
    * < / xapi:email > *.
    * < / xapi:delivery > *.
    * < xapi:document key = output type to "purchase Order_ # ${POH_PO_NUM}" = 'pdf' flow '123' = > *.
    * < xapi:template type = "rtf" location = "xdo://PO. MOPTPOXML_US_EMAIL.en.us/? GetSource = true' > *.

    * < / xapi:template > *.
    * < / xapi:document > *.
    * < / xapi:request > *.
    * < / xapi:requestset > *.
    Thanks in advance

    Published by: happy King Gold on October 3, 2010 22:15

    The output attribute seems to be absent from the document element.

    Try to change...

    ... to ...

    ... and see if it makes a difference.

  • dynamically change the name of the step

    Hello

    I'm trying to find how to change the name of the step.

    The problem is: when I call a sequence several times, I can find the names of the steps in the report for about 50 times.

    So, what I want to do is: I want a prefix for the name of the step of the call sequence and add this prefix in the name of each step.

    Do you have any idea how to do that?

    Thank you very much

    Meike

    Hi Meike

    Try to make it public static.

    Do not use Step.Name on the right side, use a local instead.

    Step.Name = Parameters.sCallerSequence + Local.strName

    If this will not help there is another way to rename StepNames to report, renaming the ResultList.

    but you need an additional step.

    Jürgen

  • Is it possible to customize the name of the worksheet to Capture?

    Capture Version: 11.1.1.8.0

    I set an Import job processor to read documents sent to e-mail, to end of Capture and Imaging.

    I am able to nominate the lot with a prefix, but seek to appoint the batch to include the id of the sender mail for example. Is this Possible?

    Use case:

    1 import work processor document & creates a batch.

    2. to from now on, I'm going with a prefix for the name of the journal,

    3. but to include other identifier for the name of the sheet as

    BATCH_PREFIX_MAIL1_XXX (if the number of sender e-mail is [email protected]( )

    BATCH_PREFIX_MAIL2_XXX (if the number of sender e-mail is [email protected]) or something like that.

    Any info on this will be very useful.

    Thank you

    Abhishek k

    This should help you close to what you want:

    var fromAddress;
    
    function newMessage(ctx, emailCtx) { // ImportProcessorContext, EmailSourceContext
        // Get the first From address from the message and save it for later
        fromAddress = getFirstFromAddress(emailCtx.getMessage().getFrom());
    }
    
    function getFirstFromAddress(addresses) {
        var fromAddress = "UNKNOWN";
        if (addresses == null)
            return fromAddress;
    
        var numAddresses = addresses.length;
        for (var addressIdx = 0; addressIdx < numAddresses; addressIdx++) {
            var address = addresses[addressIdx];
            if (address != null && address instanceof javax.mail.internet.InternetAddress) {
                var addressString = address.getAddress();
                if (addressString != null && !addressString.isEmpty()) {
                    fromAddress = addressString;
                    break;
                }
            }
        }
        return fromAddress;
    }
    
    function postImportFile(ctx) { // ImportProcessorContext
        // Get a reference to the batch
        var batch = ctx.getBatchLock().getBatch();
    
        // Do nothing if this is not the first file imported into the batch
        if (batch.getItemCount() > 1)
            return;
    
        // Set the batch name to be the orginal batch name + "_" +
        // the name of the file being imported
        batch.setBatchName(batch.getBatchName() + "_" + fromAddress);
    }
    
  • Script to add keywords in Bridge based on the name of the file

    I'm working on a script that adds keywords based on the name of the image file. So, if the name of the file is AG123456 (08_16) .tif, this script would add "Agriculture", "123456" and "8/16" as keywords in bridge. "" I have a small sample of the part that retrieves the name of the file written in AppleScript below of each keyword. I know that I need to write the part that actually adds the keywords in Bridge in JavaScript, because the bridge is not capable of AppleScript. I have trouble finding the JavaScript code, I need to add the keyword. If someone could help me with this, I would really appreciate it.

    I would like to call the JavaScript code to in AppleScript instead of writing all the code in JavaScript. (The full version of it's longer, it would be a lot of code to change in JavaScript).

    on Open of droppedfiles

    with timeout of 900 seconds -> Changing timeout to 15 minutes. Default value is 2 minutes.

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

    -GET THE CHARACTERS OF THE FILE name

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

    Repeat with aFile in droppedfiles

    say application 'Finder '.

    the value file name to name of aFile

    end say

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

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

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

    -ADDED a KEYWORD FOR EACH PREFIX

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

    -Find the prefix in the name of the file

    if text 1 thru 2 of file name contains "AG" then

    the value prefixKeyword to 'Agriculture '.

    else if text 1 thru 2 of file name contains "To THE" then

    the value prefixKeyword to "Automobile".

    on the other

    the value prefixKeyword to "Need to prefix".

    end if

    -Adding the prefix as a keyword

    display dialog prefixKeyword string

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

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

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

    -ADDED a KEYWORD FOR EACH SKU NUMBER

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

    -Creating a list of all single digit numbers

    the value numberList to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}

    -Looking FOR THE SKU NUMBER

    -Looking for a six-digit number that starts on the third character of the file name

    if numberList contains (text 3 of file name) et numberList contains (text 4 of the file name) et numberList contains (text 5 of filename) et numberList contains (text 6 of file name) et numberList contains (text 7 of file name) then

    if numberList does not work contain the text 9 of file name and then

    if numberList contains (text 8 of the file name) then

    the value skuNumber to of 3 to 8 text filename

    the value skuNumberOffset to 8

    end if

    end if

    -Searching for a six-digit number that begins on the fourth character of the file name

    else if numberList contains (text 4 of the file name) et numberList contains (text 5 of filename) et numberList contains (text 6 of file name) et numberList contains (text 7 of file name) et numberList contains (text 8 of the file name) then

    if numberList does not work contain the 10 text of file name and then

    if numberList contains (text 9 of file name) then

    the value skuNumber to text 4 to 9 of file name

    the value skuNumberOffset to 9

    end if

    end if

    -Defining the SKU number to alert keyword keyword the user can search the

    on the other

    the value skuNumber to "Need SKU number.

    set skuNumberOffset to 0

    end if

    -ADDING THE SKU AS NUMBER one keyword

    display dialog skuNumber string

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

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

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

    -DATE ADDITION OF FILE name

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

    if file name contains "(" et nom de fichier contient ")" then "

    set leftParen to "("

    set rightParen to ")"

    -Obtain the month of the file name

    set monthOffset of (offset of leftParen in fileName) + 1 -> character returns immediately after)

    set fileNameMonth to character of filename monthOffset

    -Get all the numbers of the year of the file name

    set fileNameYearOffset1 to (offset of leftParen in file name) + 3

    set fileNameYearOffset2 to (offset of rightParen in file name)-1

    set fileNameYear1 to character of filename fileNameYearOffset1

    set fileNameYear2 to character of filename fileNameYearOffset2

    set of characters fileNameYear fileNameYearOffset1 to fileNameYearOffset2 of file name

    set dateKeyword to fileNameMonth & "/" & fileNameYear

    -ADDING THE SKU AS NUMBER one keyword

    display dialog dateKeyword string

    end if

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

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

    fin Repeat

    end timeout

    end open

    Here's an example of adding of keywords in a file, the code can be used in Bridge or Photoshop.

    var Keys = ["keyword1","keyword2","keyword3"];
    var file = File (Folder.desktop + "/zz.jpg");
    if(file.exists) setKeyword( file,Keys);
    
    function setKeyword( file,Keys){
    if ( !ExternalObject.AdobeXMPScript ) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
            var xmpf = new XMPFile( File(file).fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE );
            var xmp = xmpf.getXMP();
            for(var s in Keys){
            xmp.appendArrayItem(XMPConst.NS_DC, "subject", Keys[s], 0,XMPConst.PROP_IS_ARRAY);
        }
          if (xmpf.canPutXMP( xmp )) {
             xmpf.putXMP( xmp );
          }
          xmpf.closeFile( XMPConst.CLOSE_UPDATE_SAFELY );
    };
    
  • Select the symbol on the artboard and copy the name of symbol on behalf of the Board of Directors art

    I'm generating icons in AI CS6

    I have files WITH 100 work plans

    Some Arts Councils are still empty, just underway.

    On the artboard, I gross and paths on a separate layer called symbols with a symbol only.

    The symbol layer could be the layer is visible.

    100 symbols in the document.

    Now, I want to copy these names for the names of art Council for export and a text box on the art map for an overview of printing.

    I found a script to rename a layer in its content - but it does not recognize the symbols

    I found a script to rename a work plan in a layer

    I found a script to place a text box with the name of Council of art on the art map.

    I can't combine them, please help!

    I can make applescript and Filemaker scripts, but I'm new to Javascript.

    Rename the layer to the content - does not recognize symbols!

    function LayerNameMatch() {}

    If (app.documents.length == 0) {}

    Alert ("No. Open/Active Document Found");

    } else {}

    var doc, i, l, ab, salt, n;

    doc = app.activeDocument;

    for (i = 0, l = doc.artboards.length; i < l; i ++) {}

    AB = doc.artboards [i];

    doc.artboards.setActiveArtboardIndex (i);

    doc.selectObjectsOnActiveArtboard ();

    Salt = doc.selection [0];

    sel.parent.Name = sel.name;

    doc. Selection = false;

    }

    }

    }

    LayerNameMatch();

    Work plan and rename the layer name:

    If (app.documents.length == 0) {}

    Alert ("No. Open/Active Document Found");

    } else {}

    var doc = app.activeDocument;

    If (doc.artboards.length == doc.layers.length & & doc.layers.length == doc.artboards.length) {}

    for (var i = 0, l = doc.artboards.length; i < l; i ++) {}

    var ab = doc.artboards [i];

    AB. Name = doc.layers [i] .name;

    }

    Alert ("completed: \nRenaming work plans to match the names of layers is finished");

    } else {}

    Alert ("OPPS: it won't work!") \n the number of layers and work plans do not match");

    }

    }

    Make a Textbox containing the name of art Council

    This script takes the names of artboard to a document and print them in each work plan.

    Tell the script to operate only on the document open and targeted

    myDocument var = app.activeDocument;

    IDoc var = app.activeDocument;

    ilayer var = idoc.layers.add ();

    ILayer.Name = "0 SeitenName";

    STEP 1: create labels for each work plan

    Grab a hold of work plans

    for (var i = 0; i < app.activeDocument.artboards.length; i ++)

    {

    Board graph var = app.activeDocument.artboards [i];

    For each work plan, add a new text block

    myLabel var = myDocument.textFrames.add ();

     

    fill it with the name of the artboard

    myLabel.contents = artboard.name;

    This line controls the font size

    myLabel.textRange.characterAttributes.size = 12;

    This line positions the text against each work plan

    myLabel.position = [artboard.artboardRect [0], artboard.artboardRect [1]];

    }

    You can use this:

    #target illustrator
    function test(){
        var doc = app.activeDocument;
        doc.selection = null;
        for(var i=0; i		   
  • name of layers to export to an external file

    Hi all

    is it possible to export the names of layers ( this.getOCGs () [i] .name ) using JS in an external file (csv, xml, etc.) in order to place the names in an excel file?

    Thank you and best regards,

    Alex

    Sure. Have a look at the createDataObject and exportDataObject methods.

  • 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		   
  • Stack the images in layers with the name of the layer

    Hello

    One allows to stack several images in layers of a particular folder with the name of the layer.

    Example:

    I have 3 layers, and each layer is referred to as a1, a2, and a3. I need a script to take a1 file from a folder (to office) and places it in the layer of a1 and the same need to repeat for the rest.

    So I'll get image layer a1 a1, a2 image layer in a2...

    Thanks in advance

    Does that help?

    replace the layers of a certain name with

    2014, use it at your own risk.

    #target "photoshop - 70.032»

    If (app.documents.length > 0) {}

    Download the file;

    Var folder = Folder.selectDialog ("select folder");

    If (Folder) {var uses = theFolder.getFiles (/ \.)} (jpg) | TIF | EPS | {(psd) / $i)};

    var theseFiles = new Array;

    for (var n = 0; n)< thefiles.length;="" n++)="">

    theseFiles.push ([uses [n].name.match (/(.*)-.)]) [ ^\.] (+_$/) [1], theFiles [n]])

    };

    Here are the files;

    If (theseFiles.length > 0) {app.activeDocument.suspendHistory ("replace", "main()")};

    };

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

    int main() {}

    the file;

    var originalUnits = app.preferences.rulerUnits;

    app.preferences.rulerUnits = Units.PIXELS;

    myDocument var = app.activeDocument;

    get the number of layers;

    Var ref = new ActionReference();

    ref.putEnumerated (charIDToTypeID ("Dcmn"), charIDToTypeID ("Ordn"), charIDToTypeID ("Trgt"));

    var applicationDesc = executeActionGet (ref);

    var number = applicationDesc.getInteger (stringIDToTypeID ("numberOfLayers"));

    treat the layers;

    var theLayers = new Array;

    for (var m = 0; m<= thenumber;="" m++)="">

    try {}

    Var ref = new ActionReference();

    ref.putIndex (charIDToTypeID ("Lyr"), m);

    var layerDesc = executeActionGet (ref);

    var layerSet is typeIDToStringID (layerDesc.getEnumerationValue (stringIDToTypeID ("layerSection")));.

    isBackground var = layerDesc.getBoolean (stringIDToTypeID ('background'));

    If the layer group not collect values;

    If (layerSet! = "layerSectionEnd" & layerSet! = "layerSectionStart" & isBackground! = true) {}

    theName var = layerDesc.getString (stringIDToTypeID ('name'));

    theID var = layerDesc.getInteger (stringIDToTypeID ('layerID'));

    theLayers.push ([theName, theID])

    / * If (theName == searchName) {}

    var boundsDesc = layerDesc.getObjectValue (stringIDToTypeID ('bounds'));

    Top var = boundsDesc.getUnitDoubleValue (stringIDToTypeID ('top'));

    var theLeft = boundsDesc.getUnitDoubleValue (stringIDToTypeID ('left'));

    var theWidth = boundsDesc.getUnitDoubleValue (stringIDToTypeID ('width'));

    var theHeight = boundsDesc.getUnitDoubleValue (stringIDToTypeID ('height'));

    Var Center = [theLeft theWidth/2, Top + theHeight/2];

    selectLayerByIndex (m, false);

    theArray.push ([myDocument.activeLayer, Center, theWidth, theHeight])

    };*/

    };

    }

    catch (e) {};

    };

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

    for (var o = 0; o)< thelayers.length;="" o++)="">

    var thisLayer = theLayers [o];

    for (variety p = 0; p)< thesefiles.length;="" p++)="">

    {If (theseFiles [p] [0] == {thisLayer [0]})}

    selectLayerByID(thisLayer[1],false);

    var removeLayer = myDocument.activeLayer;

    var theBounds = removeLayer.bounds;

    var theSO = placeScaleRotateFile (theseFiles [p] [1], 0, 0, 100, 100, 0);

    If (Number(theBounds[0]) == 0 & Number(theBounds[2]) == 0) {}

    else {removeLayer.remove ;})

    }

    }

    };

    restoration;

    app.preferences.rulerUnits = originalUnits;

    };

    by mike hale, through paul riggott.

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

    function selectLayerByIndex (index, add) {}

    Add = undefined? Add = false: Add

    Var ref = new ActionReference();

    ref.putIndex (charIDToTypeID ("Lyr"), index);

    var / / desc = new ActionDescriptor();

    desc.putReference (charIDToTypeID ("null"), ref);

    If (Add) desc.putEnumerated (stringIDToTypeID ("selectionModifier"), stringIDToTypeID ("selectionModifierType"), stringIDToTypeID ("addToSelection'));

    desc.putBoolean (charIDToTypeID ("MKV"), false);

    try {}

    executeAction (charIDToTypeID ("slct"), desc, DialogModes.NO);

    } catch (e) {}

    Alert (e.message);

    }

    };

    based on the code from mike hale, through paul riggott.

    function selectLayerByID (id, add) {}

    Add = undefined? Add = false: Add

    Var ref = new ActionReference();

    ref.putIdentifier (charIDToTypeID ("Lyr"), id);

    var / / desc = new ActionDescriptor();

    desc.putReference (charIDToTypeID ("null"), ref);

    If (Add) desc.putEnumerated (stringIDToTypeID ("selectionModifier"), stringIDToTypeID ("selectionModifierType"), stringIDToTypeID ("addToSelection'));

    desc.putBoolean (charIDToTypeID ("MKV"), false);

    try {}

    executeAction (charIDToTypeID ("slct"), desc, DialogModes.NO);

    } catch (e) {}

    Alert (e.message);

    }

    };

    place.

    function placeScaleRotateFile (file, x_offset, decalage_y, theXScale, theYScale, theAngle) {}

    // =======================================================

    var idPlc = charIDToTypeID ("Plc");

    var desc5 = new ActionDescriptor();

    var idnull = charIDToTypeID ("null");

    Desc5.putPath (idnull, new (file));

    var idFTcs = charIDToTypeID ("CIE");

    var idQCSt = charIDToTypeID ("QCSt");

    var idQcsa = charIDToTypeID ("Qcsa");

    Desc5.putEnumerated (idFTcs, idQCSt, idQcsa);

    var idOfst = charIDToTypeID ("Ofst");

    var desc6 = new ActionDescriptor();

    var idHrzn = charIDToTypeID ("Hrzn");

    var idPxl = charIDToTypeID ("#Pxl");

    desc6.putUnitDouble (idHrzn, idPxl, x_offset);

    var idVrtc = charIDToTypeID ("Vrtc");

    var idPxl = charIDToTypeID ("#Pxl");

    desc6.putUnitDouble (idVrtc, idPxl, decalage_y);

    var idOfst = charIDToTypeID ("Ofst");

    Desc5.putObject (idOfst, idOfst, desc6);

    var idWdth = charIDToTypeID ("Wdth");

    var idPrc = charIDToTypeID ("#Prc");

    Desc5.putUnitDouble (idWdth, idPrc, theYScale);

    var idHght = charIDToTypeID ("Hght");

    var idPrc = charIDToTypeID ("#Prc");

    Desc5.putUnitDouble (idHght, idPrc, theXScale);

    var idAngl = charIDToTypeID ("Marko");

    Bryan var = charIDToTypeID ("#Ang");

    Desc5.putUnitDouble (idAngl, Bryan, theAngle);

    var idLnkd = charIDToTypeID ("Lnkd");

    Desc5.putBoolean (idLnkd, true);

    executeAction (idPlc, desc5, DialogModes.NO);

    Return app.activeDocument.activeLayer;

    };

  • Open a new file in photoshopcc and the name of the file is displayed but no Web white work. You can see it as a layer in the layers panel and if I pull on the grey area I see int on the layer, but not on the main screen.

    Open a new file in photoshop cc and the name of the file is displayed but no Web white work. You can see it as a layer in the layers panel and if I pull on the grey area I see int on the layer, but not on the main screen.

    Nice day!

    Could you please post a screenshot with the relevant panels visible?

    Not turning off"use graphics processor" in the Performance preference and restarting Photoshop have a bearing on the issue.

    Kind regards

    Pfaffenbichler

  • Does anyone know how to remove all words of 'copy' of the name line HAVE layers?

    I downloaded a script PSD which automatically delete the word "copy" of all layers. Inside of GOT it, I can't do this. Can someone help me? Here's the script jsx PSD file:

    ----------

    ///////////////////////////////////////////////////////////////////////////////
    Script name: RenameLayers.jsx
    Version: 1.0
    Date: 27/02/08
    "Use: Removes ' copy 1, copy 2, etc." in the name of all the layers
    ///////////////////////////////////////////////////////////////////////////////

    #target photoshop
    $.localize = true;
    var displayDialogMode = app.displayDialogs;

    app.bringToFront ();
    app.bringToFront ();
    app.displayDialogs = DialogModes.NO;

    processObjects (app.documents processDocument, function () {alert ("you have no open documents")})
    app.displayDialogs = displayDialogMode;

    ///////////////////////////////////////////////////////////////////////////////
    Function: processObjects
    Use: Work theMainFunction on each object in the list theObjects
    Entry: The list of objects (documents, layers, etc.), function to run on each object, function to run on parent, if there is no object
    Return: value returned by the function used
    ///////////////////////////////////////////////////////////////////////////////
    function processObjects (theObjects, theMainFunction, theAlternateFunction) {}
    var returnValue = null;
    If (theObjects.length == 0) {}
    If (!) () theAlternateFunction == undefined) & &! (theAlternateFunction == null) & &! (theAlternateFunction == "")) {
    returnValue = theAlternateFunction (theObjects.parent);
    }
    } else {}
    If (!) () theMainFunction == undefined) & &! (theMainFunction == null) & &! (theMainFunction == "")) {
    for (var i = theObjects.length - 1; i > - 1; i--) {}
    returnValue = theMainFunction (theObjects [i], i);
    }
    }
    }
    return returnValue;
    }

    ///////////////////////////////////////////////////////////////////////////////
    Function: processDocument
    Use: Treat the layers in the document with the function 'processLayer '.
    Entry: Document subject of Document index object
    Back: no
    ///////////////////////////////////////////////////////////////////////////////
    function-processDocument (objectRef, i) {}
    app.activeDocument = objectRef
    processObjects (objectRef.layers, processLayer, null);
    }

    ///////////////////////////////////////////////////////////////////////////////
    Function: processLayer
    Usage: Delete "copy" of the name of layer (Layer content Set of processes)
    Entry: Object layer Layer object index
    Back: no
    ///////////////////////////////////////////////////////////////////////////////
    function processLayer (objectRef, i) {}
    If (objectRef.typename == 'LayerSet') {}
    var layerCount = processObjects (objectRef.layers, processLayer);
    }
    renameLayer (objectRef)
    Returns 0
    }

    ///////////////////////////////////////////////////////////////////////////////
    Function: renameLayer
    Usage: Delete "copy" of the name of layer (Layer content Set of processes)
    Entry: Object layer Layer object index
    Back: no
    ///////////////////////////////////////////////////////////////////////////////
    function renameLayer (objectRef) {}
    var theRegEx = new RegExp (/ (\s*copy\s*\d*) + $/)

    If (theRegEx.test (objectRef.name)) {}
    Save the State of the layer (visible or invisible)
    var layerVisible = objectRef.visible
    var numero_index = 0
    numero_index = objectRef.name.indexOf ("copy")
    objectRef.name = objectRef.name.substr(0,indexnumber)
    objectRef.visible = layerVisible
    }
    Returns 0
    }


    ----------

    Anyone?

    I wrote the original code you have several years ago, I did a quick check and if you change the first lines of what follows, it should work:

    #target illustrator
    $.localize = true;
    var displayDialogMode = app.displayDialogs;

    app.bringToFront ();
    app.bringToFront ();
    app.displayDialogs = DialogModes.NO;

    processObjects (app.documents processDocument, function () {alert ("you have no open documents")})
    app.displayDialogs = displayDialogMode;

    The code has been mistake out on the lines that changed the displayDialogMode and who brought the application forward, so I have commented out them. I don't have time now to see that needs to be done to ensure that this work (if they can), but it should work for you.

  • ID edge include the name of the element prefixed with Stage_.  Why isn't it documented?

    Suppose that there is a symbol with the name 'mySymbol' with a text called 'text' element it contains.  To change the value of the 'text' element, the documentation would he do in this way:


    sym.getSymbol("mySymbol").$("text").html ('new world');

    Using 'Stage_' rating, the text element can also be changed as well:


    $("#Stage_mySymbol_text").html ("new world")

    Note the underscore (_) between "'Stage_mySymbol ' and the element of text." This creates a kind of notation 'dot '. Instead, underscore 'point' is used.  "Stage_mySymbol" represents the symbol "mySymbol" and "_text" the text element it contains.

    For me, on the conceptual level, using "Stage_" is better and seems closer to the syntax of jquery.

    Since it is not mentioned in the documentation, I'm afraid that it could become obsolete.

    Any ideas why "Stage_" notation for IDs is not documented?

    Is there a chance that it will become obsolete?

    Thanks a lot for your answer. You are absolutely right. Apparently, you can't get an answer from Adobe support on this forum so I called 1-800-833-6687 and was able to get help free well as them. Their response has been almost exactly yours. They plan no change in this. If by chance slim there is a change, they do things backward compatible.

    Thanks again,

    Mark

Maybe you are looking for

  • I installed the new Skype and now she wants money, what's happening

    Installed the new Skype and now he wants the money, it won't make a video call

  • Ethernet not working not not on desktop slimline

    Hello. I have a HP Pavillion Slimline S5310y I had a power surge, the PSU burnt and a few weeks ago. I replaced it with ATHENA AP-MTFX-30 and authorities on the good and everything works. However, I couldn't connect to the internet. It connects using

  • Satellite L300-1f8 - need Vista drivers

    Please I need all the drivers PC laptop Toshiba L300-1f8 I tried several times but I managed.

  • Run remote help

    Hello! Can you suggest me a solution for my problem? I have 2 PCs. The first image is sent to the 2nd. I'll do a method on image processing image and return to the 1st. one. Image processing method can be chosen to clinet side. I tested the executed

  • "Could access the Windows service install.

    "Could access the Windows service install" is the message that I get when I try to install itunes.  I had difficulties to install other programs as well.  If windows install is a program, how can I fix it?