only get the key of the 'targetLayers' of 'Dcmn"descriptor

Hi, I work with documents of very large, with many layers, and I have a problem when trying to get the key 'targetLayers' of the descriptor "Dcmn" Photoshop building histograms and it takes a lot of time, only to get selected... layers: () I know that there is the putProperty method, which works great for layers ('Lyr') or the Application ('capp') , but does not seam to work with documents

Done, someone has an idea on how to get only the 'targetLayers' key?

This is the code to get the index of selected layers:

function getSelectedLayersIdx(){// get the selected layers index( positon in layer editor)
     var selectedLayers = new Array;
     var ref = new ActionReference();
     ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
     var desc = executeActionGet(ref);
     var add = 1;
     if(hasBackground()){add = 0}
     if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
          desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
          var c = desc.count
          var selectedLayers = new Array();
          for(var i=0;i<c;i++){
               selectedLayers.push(  (desc.getReference( i ).getIndex()) + add);
          }
     }else{
          var ref = new ActionReference();
          ref.putProperty( charIDToTypeID('Prpr') , charIDToTypeID( 'ItmI' ));
          ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
          srs = hasBackground()?executeActionGet(ref).getInteger(charIDToTypeID( 'ItmI' ))-1:executeActionGet(ref).getInteger(charIDToTypeID( 'ItmI' ));
          selectedLayers.push( srs);
     }
     return selectedLayers;
}

and if I put this:

     var ref = new ActionReference();
     ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
     ref.putProperty(charIDToTypeID('Prpr'), stringIDToTypeID('targetLayers'));
     var desc = executeActionGet(ref);

I get the error saying that "-the"Get"command is not currently available."

var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
ref.putProperty(charIDToTypeID('Prpr'), stringIDToTypeID('targetLayers'));
var desc = executeActionGet(ref);

I get the error saying that "-the"Get"command is not currently available."

When you create a reference object, good command of containers is critical; It goes from the specific to the general. Think of it with 'of' inserted: get the target property layer of the current document.

It should work then:

var ref = new ActionReference();
ref.putProperty(charIDToTypeID('Prpr'), stringIDToTypeID('targetLayers'));
ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
var desc = executeActionGet(ref);

HTH...

Tags: Photoshop

Similar Questions

  • so I'm trying to download Microsoft Silverlight to netflx, but every time I click to install it I only get the option to save it and run it, how to fix this?

    so I'm trying to download Microsoft Silverlight to netflx, but every time I click to install it I only get the option to save it and run it, how to fix this?

    Visit http://forums.silverlight.net/>

    UTC/GMT is 03:01 on Friday, October 14, 2011

  • When I try to open an attachment text I only get the microsoft office Picture Manager icon and can't click on anything

    When I ry to open an attachment, I only get the microsoft office Picture Manager icon and can't click on anything to view the file, which must be a text document.

    When I ry to open an attachment, I only get the microsoft office Picture Manager icon and can't click on anything to view the file, which must be a text document.

    What is the extension of fixing this "text"?
    The last 3 letters of the attachment is the file extension.

    If the last 3 letters... are doc, you need Microsoft Office Word or Microsoft WordViewer.
    Here is the link to MS Word Viewer: this is a free program.
    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=3657ce88-7cfa-457a-9aec-f4f827f20cac&displaylang=en

    For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • Lost normal Explorer... says failed... can only get the shortcut... How can I return... thanx

    Lost normal Explorer... says failed... can only get the shortcut... How can I return... thanx

    You don't say what Explorer!
    There are Explorer Windows and Internet Explorer.

    Restore point:

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    Do Safe Mode system restore, if it is impossible to do in Normal Mode.

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    See you soon.

    Mick Murphy - Microsoft partner

  • I only get the (page 1 of 1) header and footer (file://C...) when I print online

    When I try to print a document online, I only get the (page 1 of 1) header and footer (file://C...)  This is not always the case.

    How to print the document, as indicated on the screen?

    I'm on HP Officejet Pro 8600, but had the same problem with my HP Officejet 6500.

    Windows 7

    He tried again on another messaging - and it worked! It must be me.
    Thank you.

  • Create a PDF from a Web Site secure only gets the Login Page

    I am trying to capture a part of a web site secure PDF, but when I start the conversion only gets to login page THAT PDF would be. I have full access.  I see other web site secure questions here, but not this one.

    Hello

    This is because Acrobat doesn't have a login. If you need to create a specific secure web page PDF file, you can open it in the browser and then convert via Acrobat plug-in software component.

    It is not possible to convert from Acrobat itself secure sites.

    Thank you

    Tanvi

  • The new dose of option "tilt" is not displayed. I only get the 'HTML' and 'STYLE' buttons in the bar of dev background. Why?

    Can't seem to get the new button "tilt".

    3D view (tilt) use WebGL to achieve, so you can check at the bottom of the help > page troubleshooting information in the graphic section to see if there are problems with WebGL reported.

  • When I click on customize firefox (themes and others), the page loads completely. I only get the words don't thumbtabs. And when I click on the words, there is no

    on the drop-down list for firefox (in my favorites), I used to be able to customize firefox to change my themes. Now when I click it, it loads only words, no pictures or thumb over tabs or anything like that. When I click on the words, it does nothing. I uninstalled and reinstalled Java. What is going on? What else can I do to solve this problem. And I have Windows Vista, just in case you need to know. Thanks Sharon

    I tried all your suggestions. It turns out that I had to reinstall my Java. I didn't know Java would do, and I thought it worked. but suggestions said that thinking. So I uninstalled and reinstalled and now it works. Thanks for your help!

  • I tried high grade beta and firefox 13 14 and only get the error message, only to return to 10.2 works

    I had used with 12 Firefox problems. and upgraded to 13.0. Error message is

    "Platform error 13.0 version is not compatible with minVersion > 13 message appears." (The same with beta 14)

    Nor, 12, 13 or 14 will work only by removing everything and 10.2 installation allows me to use Firefox. Uninstallation of 12, 13 or 14 and relocation do not work, error is always present and firefox is not running.

    Do a cleaning (re) install and delete the folder of the program Firefox (C:\Program Files\Mozilla Firefox\).

    Download a new copy of Firefox and save the file to the desktop.

    Uninstall your current version of Firefox, if possible.

    • Do NOT remove the data personal when you uninstall your current version of Firefox, because all profile files will be deleted and you will also lose your personal data such as bookmarks and passwords from other versions of Firefox profiles.

    Delete the program folder Firefox before installing newly downloaded copy of the Firefox installer.

    Your bookmarks and other profile data stored in the Firefox profile folder and will not be affected by a relocation, but make sure that you do not select delete data of a personal nature if you uninstall Firefox.

  • When you try to put a movie on movie maker file I only get the audio clip without images?

    I have windows XP and movie maker and windows media player does not reconise filmed I take or movies.

    This message appears: Windows Media Player cannot find the file. The link between the library item and its digital media file associated with may be broken. To resolve the problem, try to repair the link or the removal of the item from the library.

    I know that all the cables are in and have played against them using the program of the anther, but I want to use windows?

    can you help me?

    Mike

    This happens usually when the video file has
    compatibility problems with Movie Maker.

    You can try the following steps but more
    probably, you will need to convert the file to the
    WMV format to make it compatible.

    Reach... Tools / Options / Compatibility tab and
    left click Restore values by default all the button / OK

    No improvement? Try to convert it to WMV.

    There are many converters available on the net... some
    free... some detail.

    The following freeware converters are a few examples:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    (1) Sothink Free Video Converter
    http://www.Sothinkmedia.com/video-converter/
    (Windows XP / Vista / 7)

    You will need to unzip the file... or you could just drag
    the Setup.exe from the file out of the folder and drop it on your
    desktop and install from there.

    Once installed... Open Sothink and go to... Add the files button...
    Find and select the clips you want to convert.

    Next... in the encoding settings... Choose... Video credits.
    WMV - Windows Media Video (*.wmv).

    Choose an output folder and on the left, click on the button convert.

    You can experiment with other settings later but
    This should help you get started.

    (2) format Factory (freeware)
    http://www.videohelp.com/tools/Format_Factory
    (the 'direct link' is faster)
    (the file you want to download is: > FFSetup270.zip<>
    (FWIW... installation..., you can uncheck
    ('all' boxes on the last screen)
    (Windows XP / Vista / 7)

    First, you will need to decompress the file or just open the
    Drag FFSetup270.exe out of the folder
    and drop it on your desktop. To install left click.

    Next, after the download and installation of Format
    Factory... you can open the program and
    left click on the toolbar, the "Option" button and
    "Select an output folder to" / apply / OK.
    (this is where you find your files after they)
    are converted)

    Drag and drop your video clips on the main screen...

    Select "all to WMV" / OK...

    Click on... Beginning... in the toolbar...

    That should do it...

    Good luck...

  • All of a sudden all attachments Adobe I get will not open, I only get the option to save the file.

    I checked that Adobe is set to open in Firefox. Other accessories open adobe simply cannot.

    The current versions of Firefox have allowed a built-in PDF Viewer that has all of the features that other PDF as Adobe Reader readers have or can not work properly otherwise.

    You can change the action for Portable Document Format (PDF) to Preview in Firefox to use Adobe Reader software or set always ask in "Firefox > Options/Preferences > Applications.

    You can set the pref pdfjs.disabled true on the topic: config page to disable the build-in the PDF Viewer.

    You can also check the value of the plugin.disable_full_page_plugin_for_types pref and remove the part application/pdf, if any.

    See also:

  • When I try to use the fixmbr command in the recovery console I do not get a choice of the operating system to fix it. I only get the prompt 'c '.

    I am trying to remove linux ubuntu and remove grub mbr linux installs.

    Hi GREYEAGLE65,

    Thanks for posting. You will need to contact the Distributor for your version of linux for support on this.

    I hope this helps!

    Shawn - Support Engineer - MCP, MCDST
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Bought and installed Adobe Creative Cloud, but I only get the trial version.

    I bought the pack of €60 / month. Installed Photoshop, Illustrator and Indesign, but it began in a trial version. (Thought it was normal for the first day, as long as my payment would be to accept) Now, I left for a few days and I'm still in evaluation mode. When you click the icon of CC next to the PS, HAVE fr ID it is a BUY button NOW? When you click on the my account Abobe said that I already bought it. And yes I bought it already, but why am I still in a trial version?... I have already received an invoice with the amount I paid, so normally I would have the right to use the applications.

    Additional information:

    Purchased with VISA and installed on a Macbook PRO.

    Restarted several times, but no improvement, still the trial version.

    Does anyone else have this problem?

    Thank you

    A.

    Check your subscription payment has been processed and your adobe id is correct, https://www.adobe.com/account.html

    log out and then back to your office to cc using the same adobe id allowing you to check your subscription is current, https://helpx.adobe.com/creative-cloud/help/sign-in-out-activate-apps.html

    If you check your subscription and the foregoing, sign-out/check-in fails, then follow the suggestion of message 1.

  • When you import WMV files, I only get the first seconds of my film.

    I'm doing a correction of color on a wedding video.  The video was captured using Windows movie capture software and saved to a WMV file.

    The file is approximately 700 MB and 50 minutes long.  When I import the file that the project tab shows how we don't about 25 seconds.  When I saw it, although 25 seconds will appear. He made this for all the wedding videos that I import.

    Any ideas on how to solve this problem?

    What version of AE and with what parameters of compression were they captured? Flow premature endings usually points to the VBR encoding, which AE does not particularly like. From Movie Maker files can also contain data specific to the program as the edit markers, which could also be misinterpreted by AE. Check things and maybe try different settings. Otherwise, just use VirtualDub and similar tools to convert conventional opinion or other formats.

    Mylenium

  • Get the value of the primary key next or previous

    Hi guys,.

    I use this interactive report with a Get Next or previous primary key value process.
    This works very well if you do not filter anything, because it will take you to the next ID.

    BUT, I can do this job, so I only get the ID of the selected (using filters) lines?

    It is obvious that you would like to, in the hollow of the page, the results of the international registration instead of all records.

    Kind regards

    Bottom

    Hi Philippe,.
    I also went through the trouble of IR + disorders navigation of form and was very disappointed with the standard record Navigation. So, in the hope of finding a solution I trawled by google :) search results Fortunately, I found a blog of Simon Hunt, where he shares his solution with us (Blog of the SHUNT: http://simonhunt.blogspot.com/2009/12/next-and-prev-from-interactive-report-2.html).
    However, it was not enough for me, as I have many IRs with columns that have their display derived from a LOV values. His solution is great, a lot of pure sql to analyze :) Then, I took his code and adapted/customized to my needs. The steps are explained in a blog I did, where the code was included. http://tpetrus.blogspot.com/2012/03/record-navigation-in-Oracle-apex.html
    I've also set up a small example application here: http://apex.oracle.com/pls/apex/f?p=54687:30.

Maybe you are looking for