How to move a layer over another layer uisng jsx?

Hello guys,.

can some tell me how do to move a layer to the top another layer using jsx script?

Hi John,.

Try this Code...

var doc=app.activeDocument;
var moveLayer = doc.activeLayer;
var targetLayer = doc.layers[0];//say topmost layer;
moveLayer.move(targetLayer,ElementPlacement.PLACEBEFORE);
doc.activeLayer=targetLayer;
//SelectionLayer;
var laySB=doc.activeLayer.bounds;
doc.selection.select([[laySB[0],laySB[1]],[laySB[2],laySB[1]],[laySB[2],laySB[3]],[laySB[0],laySB[3]]], SelectionType.REPLACE, 0, false);
doc.activeLayer=moveLayer;
align('AdCV');
align('AdCH');
doc.selection.deselect();

function align(method) {
  var desc = new ActionDescriptor();
  var ref = new ActionReference();
  ref.putEnumerated( charIDToTypeID( "Lyr " ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
  desc.putReference( charIDToTypeID( "null" ), ref );
  desc.putEnumerated( charIDToTypeID( "Usng" ), charIDToTypeID( "ADSt" ), charIDToTypeID( method ) );
  try{
  executeAction( charIDToTypeID( "Algn" ), desc, DialogModes.NO );
  }catch(e){}
}

Tags: Photoshop

Similar Questions

  • Newbie question - how to move a layer with the effect of deformation without changing the distortion?

    For example, to move a layer with an effect of training as well as his training center, so I don't have to make the corresponding calculations Center ripple and position.

    GSIDesign wrote:

    ... the two methods roughly the same result but are very different when you move the training center now.

    Thanks for the tip of the expression.

    If the mask is exactly the same size and shape as the shape layer, then you should get the same results.

  • How to move a container to another container

    Hi all,

    IAM using mutiple containers in my app now, I want to move one container to another by clicking on the button.

    How can I add action listener and move it to another container in the same page.

    Thanks in advance

    You add the eventlistener to the button. On this callback function, you remove the container from its parent (removeChild) and add this container to the new parent (addChild).

    For the button, it would be:
    mybutton.addEventListener (MouseEvent.CLICK, MoveContainer);

    If I understand your question.

  • How to move itunes library to another drive on the same PC?

    Please indicate the steps required to move iTunes library to another drive on the same PC?

    Drag the entire iTunes, not only in the iTunes media folder, there, launch iTunes with the SHIFT key, and then choose it.

    (144009)

  • How to move the layer behind the mask?

    Basically I want the text layer is placed behind the mask, but when I try to do the mask moves with the layer, but I want the mask to stay put?

    You can also use a matte, animating the underlying layer and leaving the stationary track matte.

  • How to move the VM to another storage without Virtual Center

    Hello-

    I read some other posts on the moving a virtual computer to another storage without Virtual Center and there is a good post, but I have different problems, because my situation is a little different.

    My VC is currently stored on a local storage of the ESX servers.  It is the virtual machine that I want to move to a shared storage.

    You guys can help me with some of the steps I can take to move this shared storage better?

    I'm not too familiar with Linux, so even copy files etc, I'm not sure how to do it.

    TIA!

    Luke

    You are welcome!

    Now you can help us.  Please consider awarding points for 'useful' or 'right' answers

  • How to: move the taskbar to another facet of the screen

    Original title: How can I get my Start menu on the top of my window is open from my XPwindow it is now on the side

    How can I get my Start menu on the top of my window is open from my XPwindow it is now on the side

    On Saturday, February 25, 2012 15:09:45 + 0000, GINODISANTIS wrote:

    How can I get my Start menu on the top of my window is open from my XPwindow it is now on the side

    Sorry, but I'm not sure what you asking on the subject. What is the taskbar
    you want to move?

    Although by default, the taskbar is displayed on the bottom of the screen,
    It can be on any of the sides on what you prefer. To move any
    side to side, simply click an unused portion and drag
    where you want it. Don't forget to click inside it, not on the edge.
    by clicking on the edge and dragging will resize not move.

    If it does not move, it can be locked. In this case, right click on it
    and uncheck "Lock the taskbar", then try again.

    Moreover, with the screen monitors wide today, I prefer the taskbar
    on the left or the right of the screen. I think that allows a better
    use of real estate than have it at the bottom of screen.
    Ken Blake, Microsoft MVP

  • How to move from window to another screen with keyboard

    Hello

    Using extended display, monitor 2 is a few feet away, making it difficult to manipulate the window with a mouse.  I've seen several shortcuts which supposedly do the following, but none of them worked.  So be as specific as possible when I'm doing something wrong.

    How can I use the keyboard to move the display of Monitor 2 to monitor 1, where I can handle?

    How can I use the keyboard to display on a monitor 2 full screen and way (I do not remember what we call the size between small and larger)?

    Also, sometimes (but not always) monitor programs open on 2 but I want them to open the monitor 1.  How can I make sure that they have always opened on 1 monitor?

    Thank you for any help you can give.

    These options may be available when you use the specific multimonitor software provided by your graphics card manufacturer (or third party), they are not available with built in multi-monitor win driver

    (They are no longer available at multiscreen Nvidia, under win7 drivers, whereas they were available under Windows XP with the same graphic card)

  • How to move apps CC to another folder without having to reinstall?

    Greetings,

    I use a MacBook Pro (which belongs to the company I work for) and I have a personal session on it. When I installed the applications Adobe CC (Lightroom + Photoshop) I did not pay attention where the applications will be installed (by default/applications folder). Now, I wish I could move the apps in my personal applications folder: / Users/Nicolas/Applications.

    I tried simply to drag and drop applications between the 2 folders that, but he did not, the action only aliases created in the last folder...

    Someone knows how to do this correctly?

    Hi Nicolas,.

    Without having to reinstall, it is not possible.

    You can change the installation location through the desktop Adobe CC application.

    Click the gear on the top icon right > select Preferences > section under the creative cloud, you can set the installation location.

    Kind regards

    Sheena

  • How to move one env to another script

    Hello

    I have a database where I have two schemas.

    (1) owner and user 2). The user schema contains all of the synonyms for objects in the schema of the owner and the application will connect the user to the schema only.


    Now I have 2 script files) 1 create tables in the owner + give grant access for the user 2) create synonyms for objects in the owner


    I have the code of the Dev environment to QA. For QA I have no privileges must give the DBA script file to execute

    My DBA says... give the scripts through clearcase. only 2 script files should be here and information on the environment should not be hardcoded. That is to say

    for instructions in the script as a file: grant access for < table_name > to USERSCHEMANAME and create the synonym < table_name_alisa > for OWNERschemaNAME.table_name

    How can I give the scripts to my DBA with a hardcodiing.    How do you have this movement of code in your project?

    Can I use any placeholder for the NAME of owner (environment part spefcific) and have to ask them to replace it with the name of corresponding runtime env

    What should I do?

    I hope that I am clear, please let me know if iam not clear

    concerning
    REDA

    My dba was to talk about some & 1 and said something like... grant select, insert, update, delete on emp to & 1

    Your DBA seems to have its scripts.
    And you need to read on [the substitution variables | http://www.oracle.com/pls/db102/search?remark=quick_search&word=substitution+variables&tab_id=&format=ranked]
    Name of the schema = a variable.

    And continue to ask questions to your DBA, if you do not understand what he wants.

  • "The file is too large for the destination file system? How to move this file to another folder with this error?

    Working with Windows 7. I'm trying to move files to other readers. . What is the work around whan "" the file is too large for the destination file system"is the error messages. Can it be fixed so you can move the files

    Either there is not enough space on the destination or the size of the file is larger than the destination system can accept, for example FAT32 cannot have a file size more than 4 GB.

  • How to move your laptop to another laptop product key? Ent Window 7 version

    I currently use Windows 7 enterprise version (developer version because we are a microsoft partner). I'm changing my laptop I want to bring this version of window to my new laptop. Please advise me how to turn the key in my new laptop? I had waited more than 30 minutes by calling the Activation Center which is far too long that I can afford to wait.

    Thank you.

    If it's a developer version, you got through MSDN, then all you need to do is remove the current computer and install it on the other and reactivate.

    Activate Windows 7 on this computer:
    http://Windows.Microsoft.com/en-us/Windows7/activate-Windows-7-on-this-computer

  • How to move one application to another but stay on $20 membership

    I would like to animate (flash) CC to CC in Photoshop, I don't want the two and I can't afford both, I want only photoshop CC, but I have no idea how do.

    Hello

    You can follow the steps here: https://helpx.adobe.com/creative-cloud/help/upgrade-change-plan.html

    Or contact our support here: https://helpx.adobe.com/contact.html

    Let us know if this helped!

  • How to move from the physical layer to the business layer

    Hello

    I added schema SH to my physical layer, how to move that layer business and layer of presentation? If I want all the tables and the columns of this pattern to my company and Presenattion of the layer.

    Thank you.

    Hello

    Please find below the link he gives step by step help you from beginning to advance

    http://www.Oracle.com/technology/OBE/obe_bi/bi_ee_1013/bi_admin/biadmin.html

    assign as correct, so useful

    Thank you

  • Move the layer to the photo above

    How to move the layer to the photo above

    Hi Melp,

    I don't know if he has a plan for this purpose in the future, but right now that isn't possible in the draw.

    Sue.

Maybe you are looking for