Move the layer up

Can someone help with the following.

I want to be able to count the total number of layers in the document, and move the active layer to the top of the stack.

Using this code by Davide is ok, but it assumes you want to move the layer to position 2

function s2t(s) { return app.stringIDToTypeID(s); }; 

var d1 = new ActionDescriptor(); 
var r1 = new ActionReference(); 
var r2 = new ActionReference(); 

r1.putEnumerated( s2t('layer'), s2t('ordinal'), s2t('targetEnum') ); 
d1.putReference( s2t('target'), r1 ); 
r2.putIndex( s2t('layer'), 2 ); 
d1.putReference( s2t('to'), r2 ); 
d1.putBoolean( s2t('adjustment'), false ); 
d1.putInteger( s2t('version'), 5 ); 
executeAction( s2t('move'), d1, DialogModes.NO );

Rather something like this:

activeDocument.activeLayer.move( activeDocument, ElementPlacement.PLACEATBEGINNING );

Have fun

Tags: Photoshop

Similar Questions

  • 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.

  • Move the layer but keep anchor still

    Hi, I know that I can use the Pan behind tool to move a layer anchor point. Now for adjustment purposes that I need to move the layer, but keep the anchor point where it is... otherwise it changes the path of the animation. Is this possible?

    Kind regards

    Frank

    I guess you have your animation path and you want to change the position of the layer to this track. If you simply position keyframes adjust anchor point values in the timeline panel. You can click and drag on the values, so that you can see the movement of the layer from the path.

    If you have animated a layer by setting keyframes in the anchor point so that you can change the relative position of the layer by rubbing through the position values in the timeline panel.

    If you have animated the two position and anchor, then you can open the layer in the layer panel, reveal the path of the anchor, select all the keyframes of an anchor in the scenario, click and drag on any keyframes the anchor to drag all this without creating a new keyframe. You can see and move keyframes from the plug-in position which has properties of position in the layer window and do the same thing.

    You can use the same select all the keyframes in the technical timeline to recover and move a path any position in the composition window.

    If this doesn't give you a solution I don't understand your problem.

  • When I try to move the layer switches

    HELO when I try to move a layer on the Web it photoshop cs6 has recently begun to move the selection to the top layer make me move instead, sick reclick so it does again the only way I can move layers is if I move to the section at the top or bottom of the ideas?

    If I understood your question,

    Select the tool move and from the options bar check ""automatic selection " on."

  • 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.

  • Move the layer setting to another file

    In Photoshop, is there a way to move a layer of setting to another file WITHOUT having to extract the files to the workspace on the side and drag and drop the layer?

    Layer > duplicate layer

    Edit: But even tabs you should be able to manually drag their course to another file. Could you please post a screenshot to illustrate your question?

  • Move the layer, but keep the layer in the Web?

    Can someone help me?

    I'm not exactly sure how to describe my question correctly. But what I want is that when I move a layer selected example to the left I want parts that normally goes outside the canvas to appear to the right.

    You want to wrap around to select the layer, and then use the menu Filter > other > offset in its dialog box enable wrap around using the sliders or type a pixel count more or less number for vertical and horizontal offsets. Works even on Basemap layers. Layer must be a raster layer, if there is a layer mask, I think more often than you would like it linked layers also content or you can use the offset on the mask or the content.

  • Move the layer of the Sub clean diaper

    Hi all

    Is it possible to move an object (number) out of his diaper? See the example below:

    (1) current situation (the layers are closed by default):

    Screen Shot 2014-08-19 at 15.57.21.png

    (2) should look like this:

    Screen Shot 2014-08-19 at 15.57.30.png

    It has more than 500 layers, it's crazy to do it manually.

    I hope there is a solution with a script or something, but I can't code...

    Found the solution: select all text layers > merge selected > move above...

  • How can I move the layer of the element

    How, by the animation of the function move only an elements to organize, as:

    When the click on reorder the item forward

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

  • Move a layer from one document to another, I get the error message that the layer is empty

    When I copy a layer from one document to another in PS CC 2015.5 and then try to move the layer in the destination document, I get the error message that the layer is empty.  It is not empty and I checked several times and checked that the layer is not empty.  I have never had this problem before and wonder if something has changed in CC 2015.5.

    Thanks to all who responded.  I think the problem was that I was using the NEF files and that he had not yet renamed PSD files.  Copy the layer in the destination document, but when I tried to move the layer in the destination document, I received the error message.  Apparently, he was copying the layer but there not then recognize the NEF format.  Once I saved both documents to the PSD, then the program behaved normally.  I appreciate your all of the help.

    Sue

  • How can I stop the kick/kick to move a layer up?

    Whenever I use the movement or move the tool, Photoshop will move the layer to the top of the artboard. Why would he do that? If I wanted to move the layer to the top, I would have. I'm just trying to move the layer.

    How can I avoid that Photoshop do this?

    Nevermind, I solved this problem. The problem is that when I did drag a layer to the bottom of the stack of layers, Photoshop it moved outside of the artboard. When you move it, Photoshop he retreated inside the artboard, in the upper part.

  • I can't move a layer with the mouse.

    I can't move a layer with the mouse. Only using the arrow. This happened two days ago and could not get the right set of return I guess. Until I'm able to move a layer with the mouse and arrow keys. When you move the layer with the mouse you he almost jumps back to the original space. I'm only using a bluetooth mouse, wired keyboard with a macbook from apple.

    Photoshop Elements does not respond when you use Mac OS X 10.10 editing tools

  • Keyboard shortcut to move the layers?

    Is there a keyboard equivalent for the displacement of the layers upwards or downwards in Illustrator, rather than drag? We receive some exported from ArcMap .ai files that can contain dozens and dozens of layers, and there are times when it would be so much easier to select the layer and press keys to move the layer upwards or downwards in the stacking order. Photoshop has this feature, but I can't find it in Illustrator.

    Thanks, Mike... that's all I could find, also, but hoped it was some little-known keyboard shortcut that was available.  I appreciate your response and will convey to our people. Perhaps the Illustrator team would plan to implement this on the road. I'll mark this "correct".

  • Activate the layer by name from the Clipboard

    It's just a quick follow-up to "move the layer to cursor" - I try to activate a particular layer, and the name of the particular layer will be on the Clipboard.

    So, for example, say that the active layer is "Layer 1"

    and 'Layer 5' on the Clipboard

    So, I want to be able to switch to the tier 5. The reason is that the Clipboard can contain names of different layers at one time. Is it not as easy as simply to write a script to switch to 5 layers. I need to move to some layer is in the Clipboard at any given time. The reason for this is a bit tedious so I'll leave that part for now

    Here's a script that I was hoping to change and make it work:

    #target photoshop
    
    var layerRef = app.activeDocument.layers.getByName( 'Layer1' );
    
    app.activeDocument.activeLayer = layerRef;
    
    
    

    but I was hoping to change it to something in this direction:

    #target photoshop
    
    var layerRef = app.activeDocument.layers.getByName( 'WHATEVER IS IN THE CLIPBOARD' );
    
    app.activeDocument.activeLayer = layerRef;
    
    
    
    #target Photoshop
    var SCRIPTS_FOLDER =  decodeURI(app.path + '/' + localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts"));
    var libPath = decodeURI(SCRIPTS_FOLDER) + "/psClipboard64.dll";
    var  psClip = new ExternalObject("lib:" + libPath);
    var clipData = psClip.getClipboard();
    app.activeDocument.activeLayer = activeDocument.layers.getByName (clipData); 
    

    You must use activeDocument.layers.getByName ();

  • Much more difficult to move the individual layers in PS CC 2015.1 (using the shortcut COMMAND for the move on the Mac tool) in older versions of PS

    Hi all

    I find that selecting and moving layers in Photoshop are MUCH more difficult to 2015.1 CC PS as in earlier versions of Photoshop (using the shortcut COMMAND to temporarily toggle the tool move).

    In earlier versions of Photoshop, if I had several layers and one of the layers selected in an image by hitting the keyboard shortcut CTRL-COMMAND (that I had my mouse over the image), and then selecting the name of the layer that I wanted to work with / move, I could then easily hit the "COMMAND" key (which is a shortcut for the tool MOVE) if I happened to have another selected both tool and this would automatically switch to the MOVE tool until what I released the button COMMAND key. Then I could move the layer as needed.

    Well, in the current version of the PS CC 2015.1 this shortcut (using the COMMAND to convert temporarily the MOVE tool) does not work very well the Group WHOLE layers (if I have layers within a group) is selected instead of just the layer I had chosen.

    ONLY if I actually choose the MOVE tool in the toolbar it works correctly and I am able to move the selected layer.

    Oh my God, it was so much harder to explain that I thought it would be! I hope this makes sense.

    Hi Christine Holzmann,

    It is a known problem with the latest update.

    For now, the workaround is to select the move tool and uncheck "Selection automatic Layers ' and then hit cmd as a shortcut for the move tool.

Maybe you are looking for

  • iOS 10.0.2 notifications problem sound and app icon

    Hello everyone, I have the 6 device more with the last iOS 10.0.2 update s and I cannot get the notifications to the device when someone sends me a message on Viber and in other applications too, sometimes, no noise and no notification on the applica

  • My macbook pro 2012 has a virus or malware for sure. How can I scan it?

    Either way, I can say that my computer behaves, that there is a virus or malware on board. I am unable to download any antivirus, it wont let me install. I only use firefox browser. I'm unable to open Chrome and Safari, I can just type in the search

  • Cannot run 'system information '.

    For some time now, I used "System information" to view the details of my office (ongoing running XP Pro SP #3 and all updates).  For more convenience, I placed a shortcut on my desktop.  Recently it has stopped working and I get a message: "Windows c

  • XP SP3 LACK USBCCGP. SYS

    WHERE CAN I GET THIS FILE? I CAN'T USE THE USB COMPOSITE DEVICES!

  • c000021a error windows vista

    Hello, from today my laptop crashes when you try to start. It has Windows Vista on it, instead of loading the login welcome screen to connect on my vista, it shows a BLACK screen with the grey wire written and motivated to choose: Startup Repair or s