Load layer as an selection

Is it possible in Applescript or JavaScript to load a layer as an selection, the way you do manually with
pressing-and-hold the Command (PC: Ctrl) key and click on the layer's thumbnail?

Here is the javascript version.
function loadLayerTransparencyToSelection() {
    var desc = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putProperty( charIDToTypeID('Chnl'), charIDToTypeID('fsel') );
    desc.putReference( charIDToTypeID('null'), ref );
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Trsp') );
    desc.putReference( charIDToTypeID('T   '), ref );
    executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );

Similar Messages

  • Command-clicking layer name does not load layer as a selection (Photoshop CS2)

    Q: Why does Cmd-clicking a layer name not load the layer as a selection in Photoshop CS2?
    A: You must Cmd-click the layer thumbnail, not the layer name, to load the the layer as a selection.
    In Photoshop CS2 Cmd-clicking the layer name in the Layers Palette selects the layer. To select multiple layers use the following keystrokes:
    1. Multiple contiguous layers = Shift+click layer name
    2. Multiple non-contiguous layers = Cmd+click layer name
    See also Adobe Knowledgebase
    Document 329005

    It works for me and doesn't seem to care what tool i have selected or anything like that to make a difference. Maybe you should reset your preferences as it may be a glitch.
    Hold Ctrl+Alt+Shift as soon as you tell photoshop to startup, and it will ask you if you want to delete the preferences, just click yes. (If you have a custom UI that you want to save, goto Windows>Workspace>Save Workspace, and then just reload it after resetting prefs.)

  • "load path as a selection" deselects my path layer

    When I "load path as a selection" the path layer deselects and I have to reselect the path layer to add, subtract or intersect.  What am I missing?

    I have to reselect the path layer to add
    Paths are not Layers.
    Why Selections anyway, why not change the subPathItems’ individual settings?

  • Ctrl-clicking layer name does not load layer opacity mask (CS2)

    Q: Ctrl-clicking a layer name does not load the layers opacity as a selection in CS2 as it did in older versions?
    A: You must ctrl-click the layer thumbnail, not the layer name, to select the opacity of the layer. Ctrl-clicking a layer name is now connected to the new way of selecting multiple layers in Photoshop CS2, as per the standard way of selecting multiple objects in the Win OS.

    Thanks for the replies:
    I tried the shift, ctrl & alt keys on start up of PS2 and received a msg fm windows Vista about the PS short cut. I said OK and nothing happened.
    I started PS2 and then held the shift, ctrl & alt keys while it was starting. This seemed to reset some things because the original message that comes with PS came up. But the mask problem is still there.
    I went further in your instructions and found the "reset all tools". Did that. Still have the problem with my mask not clearing totally.
    Any more suggestions???? Thanks, Al

  • Ctrl Layer vs Marquee Selection Issue

    Ok so my problem is that I have one layer filled with blue a second layer a third the size filled with white.
    I control click the thumbnail of the white layer (second layer) to get precise size then click the blue layer (with the marching ants still moving) and hit delete.
    Ok now that part of the blue layer is gone, which is what I wanted but when I hit control T for transform of the blue layer it now includes the deleted area not just the remaining blue.
    I know right?
    But when I marquee over the blue layer where the white is and then hit delete it removes that selection and and now when I control T it conforms to the blue not including the deleted area.
    But I fear I wont get a precise selection and this is why I like doing it the first way.
    I have been doing this for years and using PS since version 3 and today I have an issue.
    I reset my pref. and tool reset all. Nothing else is acting strange just this.
    I am on a windows 64bit system.
    Many thanks for any input.

    It's a wee bit tricky following your post, which is probably why it has gone so long without an answer up till now.
    I never like making holes in layers because it is so permanent.  I would place the blue layer above the white BG, ctrl click the layer with the shape I wanted, then add a layer mask to the blue layer.  That way I can edit the mask to control the hole.   You can unlink the mask, and FT the mask, or layer separately etc.
    I'd also leave the white layer even if not being used, because I could come back and load it as a selection at any time by ctrl clicking it.  I find this flexible and fast, and much better than saving alpha channels.
    If I am going in the wrong direction here then I can only say sorry, but as I said, it was tricky following your post with my tired old eyes.

  • How do i take one layer with multiple selections...

    how do i take one layer with multiple selections and make those selections their own layer?

    Yes sir. It w was really hard to explain. It is discontiguous segments that are separated by transparent areas. And I want those non transparent areas to be on their own layer. I have a photo shop file that has a bunch of buttons on them and they are on a transparent background. It is one layer. I want to select all the buttons and put them on their own layers. I can do this manually by selecting a button and cmd Just to a new layer, but when I have 200 buttons it is a daunting task.
    Sent by MailWise<http://www.mail-wise.com/installation/4> – Your emails, with style.

  • Replace layer names in selected layers only

    I am using this script to find and replace words in layers. (The script only targets particualr words, rather than the whole layer name).
    I would like to make it so it targets selected layers only.
    I have found this script which loops through selected layers only, but I am not sure how to add the find and replace layer name functioality.
    Thanks for any help that can be offered.

    big_smile wrote:
    Looking through the guide, it doesn't seem "hasSelectedArtwork", is a built in function either. Are there any tutorials or guides that explain how to target selected layers?
    Wrong reference manual, see this one:
    http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/illustrator/scripting/cs6/Illustrator -Scripting-Reference-JavaScript.pdf
    Page 91 -- CHAPTER 1: JavaScript Object Reference
    Layer
    Property
    hasSelectedArtwork
    Value type
    boolean
    What it is
    If true, an object in this layer has been selected; set to false to deselect all objects in the layer.
    So as I talked about here:
    W_J_T wrote:
    Correct. Yeah there is no direct way unfortunately (like many things via scripting), thats why I suggested using "hasSelectedArtwork", that would work if you select the layer target when selecting your desired layers to rename.
    and...
    W_J_T wrote:
    if(layerReferenceString.hasSelectedArtwork == true){
         // relative code
    That would offer a way to know if a layer is selected or not.
    As far as I know that is the only round about way of knowing if a layer is selected via scripting.

  • Load from Infoprovider with selection package error

    Hello,
    Requirement: Data transfer from one application to another application in BPC
    Version: BPC 7.5 NW SP08
    Source application: MGMT
    Target Application: LEGAL
    Transformation File: Yes
    Conversation File: Yes for Location Dimension
    Source records: 103 (The data is for only one Location)
    When I run Load from Infoprovider with selection Package (/CPMB/LOAD_INFOPROV_UI package) i am able to load 99 records loading and 4 records are getting error.
    Error Message: 121 ,41513000,,N,AVER,Y,2011,,1030,1030,,,0.0000000
    Line 121 :Dimension:LOCATION member: convert failed in line 121; rejected
    Analysis: Location conversion is already in place and other 99 records are able to success on the same conversion rule. I have checked transformation, Conversion files. When I validate the transformation file with data then also i am seeing same error.
    Note: I am using same package to load data from BW Cube to  MGMT application that time i am able to load without error, When I load the same data from MGMT to LEGAL then this error is coming.
    I appreciate any clue on this error.
    Thanks,
    Sri
    Edited by: sribpc on Oct 10, 2011 8:02 PM

    We are able to solve the problem,
    In the Account Dimension for one of the property we maintained some value with comma in it. That created a bad data and system throwing error.
    After changing Account dimension attribute then the package is working fine.
    Thanks for the support.

  • Is there a way to make a new layer from a selection simply by dragging?

    I recently watched a video of an artist working and I swear it looks like he made a lasso selection on a smart object layer, dragged the selection, and instantly created a new layer of the selection alone. He did this successively to sample parts of an image for later usage. I can't figure out for the life of me how he was doing it and I can't find anywhere that PS has this ability. For one, lassoing an area of a smart object doesn't allow me to duplicate that selection, PS acts like I want to duplicate the entire image, if I hold down the ALT key. Also, if I try to make a duplicate of a selection with a non-smart object layer I can duplicate the selection via dragging by holding ALT, but the duplicate is still on the same layer as the original object, which is NOT what I want. I know how to use copy/paste, so PLEASE do not suggest that I do this, OR use the CTRL+J feature. I'm simply trying to figure out what this person is doing. If this makes no sense I can provide a link to the video...

    Maybe you missed him doing the copy paste because he used the short cuts Ctrl+C Ctrl+V which would not be seen in a video. It would look like a drag in a video....

  • Since installing the latest update of Photoshop CC two days ago, Auto Blend for focus stacking is selecting all pixels from the bottom layer instead of selecting the ones in best focus from each layer. Has anyone else seen this problem?

    I installed the latest update of Photoshop CC two days ago on my Macbook Pro, and now when I try to do focus stacking by opening multiple photos and doing Auto Align and Auto Blend, the blend selects the entire bottom layer instead of selecting the in-focus areas from each layer. I even tried again on a series of images where this worked a week ago and the problem occurs. I have Photoshop on a Windows 8 machine and did not apply this latest update and it works fine. Has anyone else encountered this?

    And since installing this same update, my Photoshop is crashing just after starting.
    Ashutosh.Nigam suggested me in this forum to change the permissions to SLStore & SLCache Folder, but it did not work.
    Ali from french Adobe support told me to delete my Settings files, but it was not enough.
    A girl with no name from the same team told me to update my video card driver, but you know I run the latest Mac OS X version and everything is updated, mademoiselle.
    Stephane sent me a link to a huge page of things to do :
    -  Troubleshoot account-specific fonts, but there wasn't any corrupted font
    - Delete account-specific Adobe cache files but... guess what...
    - Troubleshoot account-specific login items but... yes, that's it, I can see you understand me
    - Reset the access settings on the user account's Library folder... oh god, that was fun, I used the Terminal and sudo commands
    I did all of these things because when I tried to open PhCC in an other admin session, it worked, so that was an incompatibility between my session and PhCC. But, but, but, when I tried again to lauch the app in the second session, it worked fine but refused to quit. Ha ha ha.
    So you can try to delete your Settings files. I wish it'll work for you. If not you can try the long list above... or hope a better answer from the support.
    I didn't change anything but Photoshop on my session and they ensure that the bug is due to my session and not to their update. Strange affair.
    Good luck,
    JLuc

  • Could not make a new layer from the selection because the selected area is empty

    I have Photoshop CS5 and I'm trying to do a selection on a new layer and when I copy it this message appears: "could not make a new layer from the selection because the selected area is empty"..
    The new layer is selected, no other layer is selected. What the hell am I doing wrong???....Yes I'm a beginner.. ....please help?

    Hi There,
    So just to clarify you have made a new blank layer, made a selection on that layer and then done a Layer > New > Layer via Copy (or cmd J).
    The reason that you would get this error message is you have made a selection on a blank layer (effectively selecting nothing) and tried to duplicate it and Photoshop won't let you do that.
    When doing New Layer via Copy or New Layer via cut you selection needs to include some painted (coloured) pixels.
    Regards
    Paul
    PS. Maybe you could explain what you are trying to achieve by copying the layer and I could help a little more.

  • How to load data into html:select using Struts ?

    How to load data into <html:select> using Struts ?
    I can not load an array or collection (static or dynamic data) into drop down list control by <html:select /> Struts.
    please use:
    <html:select >
    <html:options />
    </html:select >
    Please help me. please detail it. thanks a lot.
    Message was edited by:
    tranminhman

    In order to load a collection or array of data you can use <html:select> with <html: options collection="" name=""/>
    here collection attribute refers to the Arraylist or Array of data and name is the name of the Form bean.
    Hope this helps...
    Chaitanya V

  • Loading a layer mask as Selection in Script

    If you have a layer (Layer 1), that has a mask on it, if you look at the Channel list in Photoshop, you will see a channel named "Layer 1 Mask" of which you can load the selection using the "Load Selection..." dialog.
    If a layer has a mask, even if the layer is the active layer, the mask is not a channel object in script. At least, it not exposed.
    activeDocument.channels.length returns the number of component channels plus any alpha channels. In an RGB image with only the layer mask it returns 3.
    activeDocument.channels.getByName("Layer 1 Mask") throws an error.
    So I don't see a way to tell if a layer already has a mask or how to load that mask as a selection, apply or discrad the mask, or turn the mask off without using scriptlistner.
    I personally am using C#, and I tried the following which worked:
    curDoc.Selection.Load(curDoc.Channels["Blue] ,null, null);
    But this doesn't:
    curDoc.Selection.Load(curDoc.Channels["Layer 1 Mask"] ,null, null);
    Any help would be appreciated
    Carl

    As far as I know scriptlistner is the only way to deal with a layer's channel masks. A vector mask is part of the pathItems collection when the layer is active.

  • My mail on iMac is not working properly. Click on email, it hangs, showing previous email. Takes forever to load. "No message selected" showing in a blank screen

    My mail is not working properly: when I click on an email it hangs, frequently showing the previous email, often for up to a minute. Or it shows "loading" and just sits there showing nothing. OR there is a blank screen saying "no message selected". It's slow to load, and I'm not happy. Recently switched from Windows PC, not impressed so far. Very frustrating.
    Any suggestions would be gratefully received. (I upgraded to Mountain LIon, and don't think I had problems before I did so, though I hadn't had the computer for long.)

    Hi Sarah,
    Open Console in Utilities & see if there are any clues or repeating messages when this happens.

  • PSE7, xp, how to load layer styles? no .db3 file found

    I have read all kinds of information about how to load custom layer styles and I've come to the conclusion that I need to install all styles into the folder where the other styles live (presets>styles) and I need an .xml file for each style to see the style in elements program and I need to delete the original .db3 file and let elements rebuild it when it opens but I cannot find an original .db3 file...anywhere.  Nor do I have any existing .xml files that coordinate with the original layer styles to manipulate for the new layer styles.  What am I missing?

    Hi,
    You would have to follow these steps -
    Hi,
    These steps would help you get them back.
    1 - Quit Elements
    2 - Go to the path - C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\6.0\Locale\en_US (for XP)
    { or Vista - C:\ ProgramData\ Adobe\ Photoshop Elements\ 6.0\ Locale\ en_US\ }
    (If you aren't in the US, use the appropriate Locale)
    Note that the "Application Data" is a hidden directory, so you will have to enable "Show hidden files and folders" in the Folder Options in order to be able to see it.
    3 - You should see a file named MediaDatabase.db3. Rename the file to something else, such as MediaDatabase.old
    4 - Restart the Elements Editor. You will see it rebuilding the database. Do not touch anything. It will take a while to rebuild. After thats done all things should be back to normal.
    Hope you're able to find the files and it works for you.

Maybe you are looking for