How to select layers by ID

My extension HTML Panel listening to JSONEvents, as this SELECTION:

{ "eventID": 1936483188, "eventData": {"layerID":[2,97],"makeVisible":false,"null":{"_name":"back1.jpg","_ref":"layer"},"selectionModifier":{"_enum":"selectionModifierType","_value":"addToSelectionContinuous"}}}

In the event handler, the script is to store the selected layer s 'layerID"in a table.

How can I select these layers later by the ID stored with a .jsx call?

Should be simple, but I can't find a way.

Is it possible to convert the ID of the Index layer?

Thank you very much!

selectLayerById(98); //select this layer only
selectLayerById(80,true); //select this layer along with other selected layers

function selectLayerById(id,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( "MkVs" ), false );
try{
executeAction(charIDToTypeID("slct"), desc, DialogModes.NO );
}catch(e){}
};

Tags: Photoshop

Similar Questions

  • Photoshop CS6 - how to select multiple non-consecutive layers folders?

    Hi, as the title asks, how to select multiple non-consecutive layers folders? I find myself needing to move folders from a psd doc to another. Currently I have to move the folders of layers together, so I can select them and move them. I would like to save this step and just do something like ctrl + click on layer folders anywhere on the stacking order, as you can with regular layers. Possible? Thanks for any help!

    CTRL (command), click on the right of the folder in the layers Panel icon.

  • [FLASH] How to select and modify objects on separate layers.

    Hello

    I just started to use Flash and I've been looking for hours now how to select and modify unique objects (PNG in my case) without constantly accidentally select the object which is the most prominent or the higher layer.

    Whenever I want to change tell an object in the back, he always chooses the further object, making it impossible to change the return object. How on earth do I do this?

    This program looks extremely complex for what I want to do with it, but I can't find a software simple.

    All I want to do is animation frame-by-frame to an existing character on the parts of the body of the png a couple. I want to just move and rotate these parts of the body separately image by image. Is not possible in this program?

    It is very feasible with flash.

    for an object in a layer until you do NOT want to select Lock (the lock symbol column) or hide (the symbol of the eye column) as a layer.

    [becomes Adobe Creative Cloud CC Pro Flash - général]

  • How to select the pieces of my image in black and white?

    How to select the pieces of my image in black and white? FOW example letter J or the circle or the two together?

    jaguar_growler_blur best8.png

    It's actually pretty easy, but I have to assume that you know a few basics in Photoshop

    (1) open your existing image

    (2) double click on the layer and the 'layer style' appears. In the mix if area set the sliders so the whites in the image disappears

    You will be left with just the black elements in design

    (3) duplicate layers

    and merge them together

    to give a standard layer

    (4) ctrl or cmd click on the layer to select and create a layer mask

    (5) you now have a mask of the image. Duplicate the layer, click alt or option, click on the layer mask to call

    (6) the blacks and the whites are not completely black and white for the use of levels to adapt to the absolutes

    (7) now you have to decide what you want to select. In this case, I chose the lettering and simply covered everything else to the top with black. You do this by lasso selection and fill and items when it's delicate brush just the details with a black brush "hard." .

    (8) at this stage, you can do what you want you have a layer mask. So you can color the text for example

    or place in a background color and apply a layer as Beveling effect

    Hope that makes some sense. It is much easier to do than to describe.

  • How to merge layers?

    I used Photoshop for 20 years, but sporadically. I know enough to be dangerous. Recently started working on a simple logo for my religious group. It's all shades of gray, with thin horizontal lines or thicken to reveal a form. Dummy me, I was in such a great hurry that I just started to draw lines like crazy, then stopped and saw that Photoshop had put faithfully each new line on its own layer. Well, I've been though I remembered past, use one of the options in the palette layers "Merge down". But when I looked for it, it wasn't there. Imagine this feature? How to choose a layer group and make them become a layer? Moreover, given that my Photoshop needs are pretty basic, I have never updated since version 7.

    Related to merger was in older versions and forgot where they changed it. My menu says "Merge layers" instead. The shortcut key is Ctrl + E and I always use it to merge to the bottom of a group or the active layer with the layer below or selected layers and groups. I think they took the related functionality when they introduced the selection of several layers.

    Several layers that can be selected in the Panel layer with shift + click to select/deselect beach or Ctrl + click to add/remove a layer selection...

    Also, shift + click with tool selects move layers directly on the canvas Image and also by dragging a selection box at the start of the spot or locked layer completely transparent, selects all layers unlocked in the selection box.

  • How to select a layer by name using Javascript?

    How to select a layer by name using Javascript?

    You can do this in Applescript by using this code:

    set active layer of the window active to layer "Layout" of myDocument

    I can't understand the correct syntax in Javascript.

    Someone knows how to do this?

    Any information would be greatly appreciated,

    adobeJavaScripter

    In JavaScript, you can use the following code:

    app.activeDocument.activeLayer=app.activeDocument.layers.itemByName("Layout");
    

    For "app.activeDocument", use "myDocument", if you prefer.

    Uwe

  • How to select entire groups or to multiple recipients in MAIL, rather than one at a time?

    How to select entire groups or to multiple recipients in MAIL, rather than one at a time?

    One way is to use the app to create a group with the intended recipients. Then when composing the email just type the group name in the To: field.

  • How to select and move more than one bookmark at a time? Shift + click selects multiple items that are next to each other in a list, because the element

    How to select and move more than one bookmark at a time?
    Shift + click selects multiple items that are next to each other in a list, because the items open in firefox before that happens.

    Glad it worked for you. Thanks for posting back.

  • How to select what to install for my laptop TOSHIBA Recovery CD? A60

    Hello world!

    How to select items to install to my laptop on the TOSHIBA recovery CD because I use not all software installed at the factory.

    TOSHIBA Satellite Pro A60
    Thank you!
    suddste

    Please tell me!

  • How to select multiple cells at the same time?

    Hello

    How to select multiple cells at the same time? What is the keyboard shortcut?

    Thank you to.

    Flo, a french guy.

    Hold down the CMD key when you select the cells.

  • Printer all in one HP3520 - how to select the wireless network and enter the WEP key?

    According to print my wireless network is detected.

    How to connect the! @# % printer $ fo the wireless network and enter the WEP key?

    Instructions on the HP site tell me to selet NETWORK on the printer control panel.  Well, there's a way to select the NETWORK from the control panel.  It is not an option for him.

    I downnloaded and installed the latest drivers.

    I have restored the default settings.

    How to select the wireless network and enter the WEP key?

    All of HP's instructions seem to be for a newer printer with a touchscreen.

    I want that the printer is connected to my main computer via the USB port.  I want to be able to print wireless phones and tablets.

    My 3520 is not a 'touch Screen' and it has wifi.

    However, the following work:

    Try to open the HP Deskjet 3520 icon, open the utilities tab, click on convert USB wireless, by following the steps on the screen.

    This leads me to believe that ONLY the wireless doesn't work.  I know now that the part of the sentence "Convert USB to wireless connection" is supposed to mean "works like USB and wireless.

    Thank you for your help

  • How to select items programmatically in a tree

    Hello

    I'm looking to persist selection from the tree in my application (save when closing a file, load from the file to the opening), but I can't understand how programmatically select an item in a tree on the charge.  I would like to select the item and put it in evidence as is the usual behavior if you select using the mouse.

    I tried to write to the 'ActiveItemTag' property, but it does not work.  Any ideas?

    AK01,

    Try the "Value" property  The value of a tree control is the tag that is currently selected, setting the value of the appropriate tag tree is going to focus on this element.

    Chris M

  • How to select a cell in a multicolumn list box and use the horizontal scrollbar on th

    An event structure, how to select a cell in a multicolumn list box and use the horizontal scrollbar on the front panel at the same time.  I can select a cell in the multicolumn in a structure of the event, but I can't move the scroll bar on the front panel when the program is running.

    I guess that you are referring to the scroll bar in the control multi-column listbox. What does your code when you select a cell? Can you please your postal code so that we can see the behavior you describe? It is possible that you are blocked the structure of the event, as in performing an operation long in case the treatment cell selection. In this case, the structure of the event must wait until the event ends before being able to respond to the next event. You can configure the event to not lock the front panel until the event ends.

  • How to select a 14 days ago restore point?

    How to select a 14 days ago restore point? It will only return 5 days when providing a list of restore points to choose.

    If you checked the box to display the points of restoration more than 5 days, then I'm afraid you're out of luck.

    http://bertk.MVPs.org/html/restoresysv.html

    Excerpt from Microsoft help

    "Restore points are saved until the disk space, System Restore reserves is filled." As new restore points are created, old ones are deleted. »

  • How to select files in a directory by typing the first letter of the name as in 95 - > XP

    How to select files in a directry by typing the first letter of the name as in XP

    Something has changed on my copy of Vista 64 bit Home Premium edition, and now when I try to type the first letter of a name of file to access it, rather Vista puts in the search box in the upper right corner of the window.

    It's counterproductive and annoying _ out of me. I want to jump for filenames beginning with that letter, not clear the screen and show the stuff that is not in the current directory. Especially since I regularly work with earlier versions of windows.

    How should I do so that I can type in the names of files in Explorer and jump to files beginning with this letter as in all previous versions of Windows since at least win95?

    Go to start / Control Panel / folder Options / view and scroll down where it presents two options when entering in the list view.  Check the box to select the item type in the view.  This is part of what you want.

    If you type a letter, it will go to the files/folders starting with this letter (and not the search box); However, I just tried it myself and it seems to work only for the first letter.  If you type in a second letter, he will then the files/folders starting with THIS letter instead of files that begin with the first letter typed and then refining to files beginning with the two first letters typed and so on.  I can't make it work any better than this - unless I type really fast (and it seems to work as it should most of the time).  And I want really fast.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

Maybe you are looking for