Duplicate the layer to the different document with a new name for the layer.

I'm trying to reproduce the function of 'Double layer' Photoshop where I can take a layer of an active document and duplicate to a target document, AND set the name of the new layer once it is copied.

JavaScript is the language.

CS4 Windows if it's important.

All suggested code snippets?

Thank you

-Mike

Sorry, I missed the doc 'target' in your question.

app.activeDocument.activeLayer.duplicate (app.documents.getByName('ProofMaster.psd'));// dupe the layer
app.activeDocument = app.documents.getByName('ProofMaster.psd');// switch to master doc
app.activeDocument.activeLayer.name = 'Whatever';// the active layer is the one justed dupped so rename

Tags: Photoshop

Similar Questions

  • Help! Resizing the different documents with different resolutions?

    Hello!

    Please help me with my situation:

    I tried to do an action that will shrink by 1 inch to all parts of my document (the document had 12 x 36 inches) and, hopefully, to other documents.  I don't want to crop the image, I want to just resize the entire image to 10 x 24 inches, leaving a transparent border of 1 inch (the grey and white checkerboard) to my document. I started to resize manually, but it was a lot of time so I tried to take action, as I said above. I expected that he would spend a proportional 1 inch upper, lower, left and right other documents, but he did not. Any procedure for that happen in different documents with different sizes and resolutions?

    PS: All the documents I will resize itself would be finally printed (I don't know if it would help).

    Thank you very much for your help!

    Read the Action reinforced via the script Photoshop functions.txt file it tell you the function run each script.  Most script will retrieve things like the width and height of thay are used all the time. Look at the file size of the JSX file. Read more small there's no much too small should be easy to read and understand.  Orient.jsx and RotatePortrait.jsx will for sure get the width and height and SaveAndRestoreResolution.jsx will get the resolution.

    var orig_ruler_units = app.preferences.rulerUnits;

    app.preferences.rulerUnits = Units.PIXELS;

    get the height and width in pixels

    var width = app.activeDocument.width;

    var height = app.activeDocument.height;

    var RES = app.activeDocument.resolution;

  • How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?

    How can I select the files in a folder with the help of a list with the files you want and after that rename only the files using another list with desired new names?

    I have only:
    D: / images (where are necessary + not need files)
    -a list with only the necessary files
    -a list with new names for the files needed
    Thank you.

    Hi Pustiu,

    Thanks for posting in the Microsoft Community.

    You want to know how to select the files in a folder using a list with the files you want and after that rename only the files using another list with desired new names.

    I would have you post your query in the TechNet forums because it caters to an audience of it professionals.

    Your query will be better addressed there.

    Check out the link-

    http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/threads

    We know if you need help. We will be happy to help you. We, at tender Microsoft to excellence.

    Thank you.

  • Restore the backup with a new name and a different location on the same server

    Hi all

    I did a complete backup of my current PROD. Is it possible to restore the database on the same server, but with a different instance name, db_name and on another location?

    PRM says:
    Hi all

    I did a complete backup of my current PROD. Is it possible to restore the database on the same server, but with a different instance name, db_name and on another location?

    If you use RMAN my awnser is not.

    You cannot change the name of the database before open resetlog.

    But you can make this work without problem using the same server.

    You will need to change some parameters.

    Create a PFILE from SPFILE (prod) change parameter 'db_unique_name' file new name (ex TEST).

    Change all the value of PROD TEST except db_name parameter must be PROD.

    CREATE a SPFILE from this PFILE (spfileTEST.ora)
    Create a new password file (orapwTEST)

    So you can start this new Instance_name (TEST).

    Restore the PROD to TEST instance database, you will need use set new name to the file data or database (depends on which version you use)

    Retrieve the instance PROD database (TEST)

    It is time to open resetlogs...
    !!!!!!!!!!!!!!!!!!!!!!!!!!!! ATTENTION HERE!

    You need change redo log location before open resetlogs, you must query v$ logfile member column and change it to another location.

    After change you can open resetlog.

    Now its time to change name of database.

    Stop and start Mount

    Use the NEST

    NEST target=sys/password@instance DBNAME = TEST

    When this process is complete, NEST will be closing database.

    So you will need to start with nmount change db_name to the TEST and reset the parameter 'db_unique_name' (alter system reset db_unique_name)

    Then stop and start upstairs question OPEN DATABASE RESETLOGS and is done.

    HTH,
    Levi Pereira

    Published by: Levi Pereira on August 27, 2012 13:09

  • "Any new name for the program" has encountered a problem and needs to close. Sorry for the inconvience

    Whenever we try to install something new, that settles it, but when we get the same error message

    "the new name of the program" has encountered a problem and needs to close.  Sorry for the inconvience

    We can't get anything to run now

    Hello

    1 is this problem limited only when installing an application?
    2. what application are you trying to install?

    Method 1.
    I recommend you to reregister the Installer engine.
    Here's how:
    a. Click Start, click Accessories and then click command prompt.
    b. at the command prompt, type the following and press ENTER after each line:

    MSIExec /Unregister
     
    MSIExec/regserver

    Method 2.
    For other methods, see the article below.
    How to troubleshoot issues that may occur when you install, uninstall, or upgrade one program on a Windows computer
    http://support.Microsoft.com/kb/2438651/en-us

    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • So close but need help to compare strings in different subforms with loop - Livecycle ARE for

    For some reason, I wasn't able to do this post in the forum of Livecycle ES, even though I posted it there often in the past.

    I've created a form that I almost work and I hope that someone can help me.

    We have eight teams billing in our society and each team works anywhere from 1 to 4 different clients. The form is used to track, by the representative of billing, the number of shipments that every billing r5ep works every day. What I need to add at the bottom is a subform that performs the totals by customer. So, I try to get the form to loop through all existing subforms (and subforms in their breast) and compare a cell in the subform from bottom for a cell in other subforms, which are added dynamically, and then total ONLY items. My script does not work however.

    What I have now is:

    var repCount is form1. P1._rep. Count

    var itemCount is form1. P1. Rep._ItemSet.count

    for (x = 0; x < repCount; x ++)

    {

    for (i = 0; i < itemCount; i ++)

    {

    If (clientName.rawValue is P1.rep [x]. ItemSet [i].client.rawValue)

    {

    this.rawValue is this.rawValue + P1.rep [x]. Itemset [i].corresp.rawValue;

    }

    }

    }

    It seems like it should work, but I get the following error:

    P1. Rep [x] is undefined


    So what it looks like, is that miss me is the right way to reference objects in these subforms.

    Form is here: https://Acrobat.com/#d=20gWXZ4sBm4OPV6oO76zSg

    If someone could take a look, I would be very grateful.

    Thank you

    JO

    I don't know anyone else will ever I had a similar problem, but I thought I would go ahead and post the solution, just in case...

    The error I received (P1.resolveNode ("rep [" + j + "].")) (("Set [' + i + '"] ') is nothing) was occurring because the variable itemCount needed to be referenced in the repCount of loops. I also need to resolve the node for itemCount, that I was not doing.

    So... my old code was this:

    var repCount = P1._rep.count;

    var itemCount = P1.rep._ItemSet.count;   //this part threw the error. Use resolveNode... and should not declare the variable until, within the first loop of For.

    nTotal var = 0;

    for (var j = 0; j)

    for (var i = 0; i)

    If (P1.resolveNode ("rep [" + j + "].")) ("Set [" + i + "]"). client.rawValue == clientName.rawValue) {}

    nTotal = nTotal + P1.resolveNode ("rep [" + j + "].") ("Set [" + i + "]"). corresp.rawValue;

    }

    }

    }

    this.rawValue = nTotal;

    .. .who wasn't because he was trying County of itemset right up front... goal, it was expected that within the first iteration of subfields repCount reference... AND that it was necessary to have used resolveNode.

    The corrected code is:

    var repCount = P1._rep.count;

    this.rawValue = 0;

    for (var j = 0; j)

    var itemCount = P1.resolveNode("rep["+j+"]")._ItemSet.count;  //corrected code... node is resolved and the variable is declared in the first subform repCount.

    for (var i = 0; i)

    If (P1.resolveNode ("rep [" + j + "].")) ("Set [" + i + "]"). client.rawValue == clientName.rawValue) {}

    this.rawValue = this.rawValue + P1.resolveNode ("rep [" + j + "].") ("Set [" + i + "]"). corresp.rawValue;

    }

    }

    }

    .. who works now perfectly... and I throw a party to celebrate! Laughing out loud

    JO

  • On adding folder items to get the new name for the item?

    I really have no idea what I'm doing but I'm trying to capitalize on the addition of items in folder / about items in folders to follow or not removing a specific directory exists but cannot for the life of find me a way. Basically I want it to look in /Volumes to see if a particular drive is connected or removed and launch/exit an application accordingly. Any help would be greatly appreciated. Thank you!

    What follows is no what you have in mind?

    say application "Finder" to the disks of the get of the alias "Macintosh HD:Volumes:

    or even better:

    say application "Finder" to get records of ((path to the bootdisk as text) & "Volumes:" as alias)

  • How many custom viewers, I can create with a new subscription for professional DPS?

    Hello world.

    I am new professional DPS text. My company has different educational programs (Intelligence, FInance, technology, etc.), we need a viewer customized for each program.

    I was Diggin ' arround and I can't undesrstand if I can do a lot of viewers like my different educational programs, each with an account of the application (Adobe ID) or just a single acount application and a kiosk for all our publications with this subscription.

    Thank you for your support.

    You can create custom platforms viewers, we support (iOS, Android, and Windows) for a title/publication with a Bachelor of DPS.

    Neil

  • BlackBerry smartphones, I'm completely lost with this new BBM ' for everything! (via BB9900)

    Well, I'm sorry for the confusion on my part.

    It really seems that this craze "each with an iPhone can now use BBM" all came from absolutely nowhere.

    If anyone can help with this scenario:

    I use BB990, the ORDINARY mail service, NO BBM surveys. My friend, Rob, using an iPhone, but decide BBM of envy that he on his iPhone. He neglected to tell me that it is and begins to use it. I don't have their PIN - OH DEAR - whatever that means for me?

    Made text messages? I don't understand. If I pass and that everyone can they not me message more?

    Help... Please?

    mike90 wrote:

    What I meant by is so good Yes "performed texts".

    I use the service of messagins regular blackberyy (I assume that the default, a regular that comes with the phone?) - no BBM surveys.

    Hello

    So I guess you're referring to text messages or SMS services.

    mike90 wrote:

    If someone, a friend, decides that they want to use BBM on their iPhone, which seems to be a request, they can still text me to it even if I do not use BBM?

    Yes... It will be able to text you. BBM is an Instant messaging application that is now available for users of iphone and android, if a friend you installed and use BBM on devices out there and you don't have these data plan that allow BBM on your BlackBerry only BBM will be affected, but not the other messaging services, it may be whatsapp, viber etc.

    mike90 wrote:

    I guess I wonder if once he becomes their only means of communication, that they connect to.

    In a certain way: you're right! Your friend will surely like BBM and I have no doubt that, after using BBM on the iphone there are BBM be only way to Instant Messaging, because it is the best IM in my opinion. In such a situation, you should

    mike90 wrote:

    Or is it like facebook, a separate application where add someones 'pine' is similar to the addition of a "friend"? Laughing out loud

    You are right... BBM is an application that depends only on PIN, each user will have there own PIN and adding that the PIN is of course like adding a friend on BBM contacts list.

  • The name 'Player' should be retained or a new name better?

    I think of a new name for the 'Player', since it is much more than a humble Player version 3.

    I'm a big fan of VMWare 'Player', but I think his name is a little different when I look at its capabilities. He deserves a 'better' name in accordance with its capabilities.

    Version 1.x and 2.x 'Player' was a simple player, because it is only able to run or play already created and modified VMWare sessions. That's all.

    Now, the 'player' has got a lot of additional features:

    a. creating and editing of the VM sessions with many options

    b. inclusion of VMWare Tools (for download within the application)

    (c) manipulation of the Image of basic disk (shrink, defragment)

    d. basic network configuration

    e. the unit Mode

    f. improved video performance

    g. driverless printing features

    h. shared folders

    A new name for the 'Player' could be 'VMWare Workstation Express' or "VMWare Workstation Home". This version is more suitable for personal use, or home. My reason is that the new 'player' is much more than a simple 'player'.

    However the product with the name "Workstation" should also be a candidate for a name change, because its capabilities become really great. His name could be extended with 'Professional' or 'ultimate '. This version is more suitable for professional use.

    Please don't suggest another rebranding action - if VMware is really starting to find a new name, the result will probably be something as boring as vPlayer or cloud-player

    Moreover - the best VMplayer is Workstation-lite - just install Workstation and do not uninstall it after the trial expires.

    ___________________________________

    VMX-settings- WS FAQ -[MOAcd | http://sanbarrow.com/moa241.html]- VMDK-manual

  • Hello publication with my domain name on adobe cataltst

    Do you speak french?

    I created a new site but if I want to publish it with a new name of area it opens not on google search engines and yes I soumisa google new domain name

    go to this site must go by the name of the interim site Adobe catalyst to pay

    me I want to educational with www.eddy.be

    the domain name to saved summer

    Thank you for your help I did not despite all the explanations on the technical sheets normal adobe

    Hello

    * Please note that we generally do not have English translation services, but will try my best pay you first aid.

    Field to add eddy.be to your site BC, pour you sleepers need to follow the instructions in the article of field adds.

    First, you must add the domain name in the Panel BC admin via the site settings-> add domain. Then, go to your domain registrar and update the DNS settings.

    Reference: http://helpx.adobe.com/business-catalyst/using/change-site-domain.html

    Hope this helps!

    -Sidney

  • How to take a column of duplicate names and fill a different column with the same names, excluding duplicates?

    How to take a column of duplicate names and fill a different column with the same names, excluding duplicates?

    I find easier to use this copy separate Automator Service (download Dropbox).

    To install in your numbers > Services, double-click menu just the package downloaded .workflow and if necessary give permissions in system preferences > security & privacy.

    To use, just:

    1. Select the cells in the column with duplicate names.
    2. Choose separate copy in numbers > Services menu.
    3. Click once in the upper cell where you want the deduplicated values appear.
    4. Command-v to paste.

    SG

  • I say 6 layers of an interior of the Hall and the only difference between them is that I'm in different places on the pictures to illuminate different areas with a flash.  I thought that I could retire to each image using a layer mask but it doesn, t seem

    I say 6 layers of an interior of the Hall and the only difference between them is that I'm in different places on the pictures to illuminate different areas with a flash.  I thought that I could retire to each image using a layer mask but it doesn, t seem to work... any suggestions please

    Try this automatic method

    http://phlearn.com/automatically-remove-objects-photos-Photoshop

  • How to set a fixed length scheme, composed of several documents of different types, with details of the header and footer in points 22 and 23, namely having 10 for 20 for detail header and 30 for the footer

    How to set a fixed length scheme, composed of several documents of different types, with details of the header and footer in points 22 and 23, namely having 10 for header, 20 for retail and 30 for the footer.

    Here is the sample file

    DDWTYBILL13092502572 1000000112\\NHLSFS\ORACLE\ORACLE\BILLING\VERIFY\ 2013/09/25 01:19:08 BILLEND

    DDWTYBILL13092502572 2000000212PRIVATE PRIVATE STY5572142 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT NNM DIMPHANA, CN, CELESTE NERINA 9 January 1964 TYG A2 DR OF PREEZ 5602181 63301345 TB731543 Suspect 91TB? (AC) EMPIEEM A2 Z03.0 05-AUG-201305-AUG-201324-SEP Z03.9 - 2013FEND 113,60 TYGERBERG HOSPITAL Ward

    DDWTYBILL13092502572 2000000312PRIVATE PRIVATE STY5572149 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNM DIMPHANA, CN, CELESTE NERINA 9 January 1964 TYG A2 DR OF PREEZ 5602181 63301345 TB731548 empyema GMP A2 Z03.9 05-AUG-201305-AUG-201324-SEP Z03.9 - 2013FEND 113,60 TYGERBERG HOSPITAL Ward

    DDWTYBILL13092502572 2000000412PRIVATE PRIVATE STY5572351 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT NNM DIMPHANA, CN, CELESTE NERINA 9 January 1964 TYG A2 DR OF PREEZ 5602181 63301345 TB731584 Suspect 91TB? EMPIEEM? CA Ward HOSPITAL TYGERBERG Z03.0 Z03.9 A2 05-AUG-201305-AUG-201324-SEP-2013FEND 113,60

    DDWTYBILL13092502572 2000000512PRIVATE PRIVATE STY5572352 010700 INV 12STYD000789 02-AUG-20130000010472 STY STY 1100611006MGIT NNM DIMPHANA, CN, CELESTE NERINA 9 January 1964 TYG A2 DR OF PREEZ 5602181 63301345 TB731585 Suspect 91TB? EMPIEEM? CA Ward HOSPITAL TYGERBERG Z03.0 Z03.9 A2 05-AUG-201305-AUG-201324-SEP-2013FEND 113,60

    DDWTYBILL13092502572 2000000612MAJOR MAJOR STY5577530 010700 INV 12ZTYG000009 02-AUG-20130000010472 STY STY 1100611006MGIT 91 NNS ZOZI, S, SIYAMBONGA 27 March 2010 TYG D3 DR MARCELIN 5602181 113799662 TB731663 lymphadenitis Ward D3 TYGERBERG HOSPITAL I88.9 Z03.9 07-AUG-201307-AUG-201324-SEP H1 - 2013MEND 58,52

    DDWTYBILL13092502572 2000000712MAJOR STY5577537 MAJOR 010700 INV 12ZTYG000009 06-AUG-20130000010472 STY STY 1100611006MGIT 91 NNS DLAMINI, N, SIMON TYG 9 October 1976 F1 DR WZESE 5602181 135524676 TB731666 Suspect Ward TB F1 TYGERBERG HOSPITAL Z03.0 Z03.9 H1 07-AUG-201314-AUG-201324-SEP - 2013MEND 58,52

    DDWTYBILL13092502572 30003034120000003032END

    You can create a nXSD the use of the Native Format generator and advanced search attribute is used to read values to a specific position and use it as the choice. You can find an example here

    http://docs.Oracle.com/CD/E11036_01/integrate.1013/b28994/NFB.htm#BGBBAJFD

  • JS - selection of the center of the artboard / New Document with some dimensions of the artboard

    TL; DR:

    How do I Center my current selection to the artboard?

    as well as hitting the "align horizontal center" and the «align vertical center» buttons

    Hello

    I searched for the last two hours and before my head hit the keyboard I wanted to ask for help.

    What I am struggling with:

    in my init function, I create a new document and then copy all the layers of the previous document step by step to the new document and then save it as SVG.

    Init

    (function() {}

    Destination = Folder.selectDialog ("selecting a folder for files SVG.', docPath");

    If (! destination) {return ;}

    holderDoc = app.documents.add ();

    stepThroughAndExportLayers (docRef.layers);

    }());

    My problem is that holderDoc = app.documents.add (); always creates a document that is not the same size as my original document where the layers are copied from.

    so, I want the same artboard size as in my original document.

    I am fine with the fact that fixed values or directly take the values of the initial RFSO.

    I tried this on the segment where I create the new document:

    Init

    (function() {}

    Destination = Folder.selectDialog ("selecting a folder for files SVG.', docPath");

    If (! destination) {return ;}

    holderDoc = app.documents.add ();

    holderDoc.artboards [0] .artboardRect = [0,0,128,128];

    stepThroughAndExportLayers (docRef.layers);

    }());

    and receive this error message:

    "Error 1200: Illustrator error: 1346458189 ("PARM").

    Online: 83

    -> holderDoc.artboards [0] .artboardRect = [0,0,128,128]; »

    what I read on the web means that illustrator does not know what to choose document. but I called him directly. so, what could be the problem?

    to clearify: I don't want to adapt to the artboard for the images/layer. the work plan must always be a certain size. (for me 128px by 128px)

    Thank you for helping me to each fixing of my approach highly or offer a completely new.

    Thank you very much in advance.

    Edit: workaround solution


    (function() {}

    Destination = Folder.selectDialog ("selecting a folder for files SVG.', docPath");

    If (! destination) {return ;}

    var activeArtboard = app.activeDocument.artboards [app.activeDocument.artboards.getActiveArtboardIndex ()];

    var ABRect = activeArtboard.artboardRect;

    holderDoc = app.documents.add ();

    holderDoc.artboards.add (ABRect);

    holderDoc.artboards.remove (0);

    holderDoc.artboards.setActiveArtboardIndex (0);

    stepThroughAndExportLayers (docRef.layers);

    }());

    now, I added a new work plan to the new document with the same size as the work plan on the original document.

    I have remove the work plan predefined on the new doc and the new work plan as active.

    BUT!

    now, the work plan is not centered in the window. Illustrator that allows to place my image with ctrl + c-> ctrl + v somewhere outside the artboard.

    Now I need to align my selection in the center of the artboard. but I can't find any reference on how to Center a selection to the artboard.

    I don't know if I understand you right.

    If you want to create a new document with a fixed width and height, you can do this:

    var doc = app.documents.add(DocumentColorSpace.RGB, new UnitValue ("128", "px"), new UnitValue ("128", "px"));
    

    If you want to only align your objects selected on the artboard, you can try this:

    Note that the result may be different, if the clipping masks are exist in the document.

    Please test it first on copies of your documents. Use it at your own risk.

    // ArtboardCenterAroundSelectedPaths.jsx
    // works with CS5
    // http://forums.adobe.com/thread/1336506?tstart=0
    // (title: script to align selected objects to artboard)
    // quick & dirty, all selected items will be centered at the active artboard
    // (include clipping paths  !visible result can be different)
    
    // regards pixxxelschubser  19.Nov. 2013
    
    var aDoc = app.activeDocument;
    var Sel = aDoc.selection;
    
    if (Sel.length >0 ) {
        var abIdx = aDoc.artboards.getActiveArtboardIndex();
        var actAbBds = aDoc.artboards[abIdx].artboardRect;
    
        var vBounds = Sel[0].visibleBounds;
        vBounds_Li = vBounds[0];
        vBounds_Ob = vBounds[1];
        vBounds_Re = vBounds[2];
        vBounds_Un = vBounds[3];
    
    if (Sel.length >1 ) {
        for (i=1; i vBdsI[0] ) {vBounds_Li = vBdsI[0]};
            if( vBounds_Ob < vBdsI[1] ) {vBounds_Ob = vBdsI[1]};
            if( vBounds_Re < vBdsI[2] ) {vBounds_Re = vBdsI[2]};
            if( vBounds_Un > vBdsI[3] ) {vBounds_Un = vBdsI[3]};
            }
    
        aDoc.artboards[abIdx].artboardRect = [vBounds_Li +((vBounds_Re - vBounds_Li)/2-(actAbBds[2]-actAbBds[0])/2), vBounds_Ob -((vBounds_Ob - vBounds_Un)/2+(actAbBds[3]-actAbBds[1])/2), vBounds_Li +((vBounds_Re - vBounds_Li)/2-(actAbBds[2]-actAbBds[0])/2)+(actAbBds[2]-actAbBds[0]), vBounds_Ob -((vBounds_Ob - vBounds_Un)/2+(actAbBds[3]-actAbBds[1])/2)+(actAbBds[3]-actAbBds[1])];
        }
        } else {
            alert ("No selection");
            }
    

    Hope this is useful for you.

    Have fun

Maybe you are looking for