Determine if hidden, there are layers

I build a script to clean photoshop documents, and one of the options that I included is to remove all hidden layers. There is no direct command to do (or nothing that I saw), so I used a piece of ScriptListener code to run the command 'Delete hidden layers'.

I only want to activate this option if there are layers that are hidden, so I wonder if there is a simple way to determine whether the layers are hidden in the document (outside of a loop in all layers). Or, if there is a way to determine if the command "Delete hidden layers" is enabled or not, because that is activated only when there are hidden layers.

I would like to just bung the code between a try catch block (but I'm lazy)

If you do not want to check this should be quick...

alert(hasHiddenLayers());

function hasHiddenLayers(){
   var ref = new ActionReference();
   ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
   var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
try{
    activeDocument.backgroundLayer;
var i = 0; }catch(e){ var i = 1; };
   for(i;i 
         

Tags: Photoshop

Similar Questions

  • Outlook Express messages are hidden there not displaying not new messages

    The display in the name of the customer.

    Outlook Express messages are hidden there not displaying not new messages

    Try to go to view | Current view | Show all messages and do not check the chat messages.

    If its possible that there is corruption of the Inbox and the user can move all messages from the Inbox to another folder created by the user and then close OE and delete the inbox.dbx file.  OE will create a new.

    Now is the right time to save messages: see www.oehelp.com/OETips.aspx#6

    Steve

  • I have only 7 GB of 288 free FEPs GB on C:... There are massive hidden temporary internet files. They get not deleted using tools of IE... cant remove using BACK or using tools for Explorer?

    I have only 7 GB of 288 free FEPs GB on C:... There are massive hidden temporary internet files. They get not deleted using tools of IE... cant remove using BACK or using tools for Explorer?

    Temporary Internet files are HIDDEN... they are in the C:\Users\Peter\AppData\Local\Microsoft\Windows\Temporary Internet Files directory

    How to remove the contents of the temporary Internet files folder:

    http://support.Microsoft.com/kb/260897

    Vista - strategies to free disk space:

    http://Windows.Microsoft.com/en-us/Windows-Vista/strategies-for-freeing-disk-space

  • When there are multiple users e-mail of files that are on the left of the screen can be hidden by other users?

    There are several people who might want to use Thunderbird on a work computer, but I don't like how all the e-mail files are open to the public view. It looks like anyone can see the emails without having to log on the account of others.

    It is regrettable indeed, and I don't think it's a good idea.
    You can opt for individual profiles, but this doesn't quite work for multiple users.

  • There are settings of the device?

    I knew that the Flipout has not had a flash, but I guess if my old boring phone had the brightness settings, my new Droid would certainly. And the help function tells me there are advanced camera settings, but not where they are hidden. Can someone tell me what menu I should look into. Or if there is there best camera apps out there than the default?

    Have you found the camera settings yet?

    The only available parameters are under the menu (the 4 squares soft keys at the bottom left of the tap) in camera mode. Your choice is peak resolution, resolution of Vid, Quick Uplaod Album and review time.

  • Hi, I put the web filtering to the general, but there are some * site that always appears. Please notify

    Hi, I put the web filtering to the general, but there are some * site that always appears. Please notify

    Hi EddyMoe,

    You have encountered this problem because the site is not popular enough, or the content of Web site changes frequently that it has not been classified as an adult site. Security checks family with service of content classification to determine the category of the site. For more information about how Family Safety determines the web content, please refer to this article. To avoid this, you must change your level of web filter to Allow list only. To do this, follow these steps:

    1. connecting the account parent in http://fss.live.com
    2. under the child's name, click change settings
    3. Select the Web filtering.
    4 adjust the slider for web filters in list only or to your preferred configuration.
    5. click on Save.

    6. click onWeb filtering lists.
    7. Enter the web address that you want to allow in the box and click allow.
    8. click on Save.

    Finally, please always remember to update the family safety filter so you can have the latest parental control settings.

    Thank you!

  • I have just re installed Windows XP. Windows installed after three attempts. When I turn on the computer there are three choices of Windows XP. Only the first works how to remove the other two?

    I have just re installed Windows XP. Windows installed after three attempts. When I turn on the computer there are three choices of Windows XP. Only the first works how to remove the other two?

    I have a hard drive. At least two partitions. C: 74.7 GB with 63.3 freespace
    D: 74.2 GB with 70.6 freespace
    These are my original specifications of the hard drive: 160 GB (7200 RPM) SERIAL ATA HARD DRIVE WI
    So I suspect there are at least one or more partitions hidden leaving 11.1 GB for hidden partitions!
    Windows is present on both drives C: & D:. In the directory windows on C:, the oldest entry is 19.12.12, 21.43 last 21.12.12, 22.50
    The first entry in the directory windows on D: is 19.12.12, 18.42 the last 21.12.12, 22.40
    I hope that makes sense to someone, any help gratefully received!

    As long as you have verified you dΘmarrez done on the c: / partition, Yes, you can reformat the drive D: / partition using Windows 'disk management '.

    J W Stuart: http://www.pagestart.com

  • When the Admin sign on the office comes to the top, but after that the computer does not respond when the user tries to do anything. There are actually turns off the computer with the power button.

    Original title: user profile

    My administrator user profile does not work properly, but I have a user profile that has activated the parental control that worked well for about a year and yesterday when this user logs on the desktop comes up, but after that the computer does not respond when that user tries to do anything. There are actually turns off the computer with the power button.  I ran a virus scan and spyware scan in my user admin profile and he has not found anything.  I don't know what to check.

    Hello rhunter15,

    There may be a program to interfere with Parental controls so that we can try a few things to see if we can determine the application or program that is causing problems.

    First of all, we run System File Checker to see if you have a corrupt file system.

    • Click Start
    • Click on all programs
    • Click Accessories, and then right-click on the command prompt.
    • Select the Security tab and choose "Run as Administrator"
    • Click on command prompt
    • Type SFC/scannow.

    It will scan and repair any damaged operating system files.

    To determine if there is a program because of a conflict, we recommend that you perform a "clean boot" of the computer. A clean boot is designed to disable programs and services in the background as much as possible. This helps determine which service or program can be the cause of the problem.  For more information about how to perform a clean boot for troubleshooting, click the number below to view the article in the Microsoft Knowledge Base.

    KB 929135 - how to solve a problem of performaing a clean boot in Windows Vista.
    http://support.Microsoft.com/kb/929135

    Once you have finished the clean boot, check again and see if you get the error of parental control.

    If please post again and let us know if that helped pinpoint the problem or if you still need help.

    Thank you

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How clean/remove HPA (hidden protected area) Lenovo/IBM hard disk

    I have released an old hard drive to a machine breakdown T41 and want to use the drive as an extra drive (drive D) in my T43 machine.  As with all hard drives T41, there is a hidden to recovery etc. partition.  I would remove this hidden partition to create more space on the old disk T41.  How can I do this? MUCHAS Gracias in advance

    I think you're confusing two different standards of measurement. Hardrive manufacturers measure readers in bytes with 1000 k = 1000 k = m, 1000 m = g, but the windows operating system counts with exponants, if k = 1024 (2 to the 10th power).

    A 40 GB hard drive will be approximately 40,000,000,000 bytes, but the operating system sees about 37,25 Go. I know it's confusing, but if my explanation does not clear, so suffice to say there are two different things and you don't miss anything

  • There are invisible files of > 100 GB C:\Users\B folder... \AppData\Local\Microsoft\Windows: how to remove and release this space?

    There are invisible files of > 100 GB C:\Users\B folder... \AppData\Local\Microsoft\Windows: how to remove and release this space?

    Explore it has been configured to show hidden files. Files can come from files continuously from the satellite receiver via WiFi with windows media player.
    Windows 7 premium 64-bit, protection against viruses,... with microsoft.

    To study disk space, use download and install Treesize (freeware).
    https://www.Jam-software.de/customers/downloadTrial.php?ARTICLE_NO=80&language=en&PHPSESSID=6odgempt76un9q9nkj7luf5be0

    Information about Treesize

    http://www.Jam-software.com/treesize_free/

    When you open Treesize scan select in the Menu and you will see a list of drives. Click on C and it will generate a list of files. Display names and 6 larger files sizes and the total at the top of the list.

  • View button 'Add a line' if there are no more than two lines in a table

    Hello

    Is there a possibility of JavaScript to dynamically check number of rows in a table and display the button 'Add Row' in the case where if displayed in number of lines in sub table form is more small/more than some setting?

    Example: I have 2 lines in a picture. The button should be indicated if there are no more than 3 lines.

    User click on the button - a blank line will be added here. Now, the button is hidden until the number of rows will be less than 3.

    Data sheet:

    APEX 4.1.1

    31%

    Listener 1.1.3

    Thank you

    J

    Hello

    I solved it by using the little piece of JS:

    if ($('#report_contact_form tr.highlight-row').length > 1)
    $x_Hide('ADD_ROW_T', true);
    

    Concerning

    J

  • CC has repeatedly said there are updates

    Manager CC said repeatedly there are updates available... more and more and more and more... example: update of InDesign even 6 times in 3 days. Usually, it's all the apps that I use. I was on the phone, etc... with Adobe and they basically say to live with her, "don't worry not on that subject." Well, something is obviously wrong, and if I just ignore it because they suggested then I might miss something relevant. That was the extent of their assistance so far. I have reisntalled the updater has a few times, etc... and no luck there. The major part of the question is on a Macbook Pro, but I don't know if it's still relevant.

    It is not life-threatening, of course, but it's a Royal and annoying pain.

    I was wondering if anyone had any advice or run into similar issues, they had the time, got a relevant help, etc...

    Thank you... soon, has

    K

    Hi KMcFadin,

    Go to ~/Library/Application Support/Adobe/AAMUpdater/1.0/Install, select Indesign CC and try to install the updates manually.

    Activate the hidden library: iles.html http://helpx.adobe.com/x-productkb/global/access-hidden-user-library-f .

    If still the same issue then send me your phone number by private email.

    Kind regards

    Romit Sinha

  • There are a lot of requests to be scheduled to run in production during the upgrade

    We need upgrade to 11.5.10.2 EBS 11.5.10, there are a lot of applications running current 11.5.10, here are my questions:

    1. is he must redefine schedules to run queries? If not, how do?
    2. If she must redefine schedules, how can I find out how many defined planning? is there a sql query to review?
    3. how many special process/manager must be active after upgrade? as Planning Manager, etc.

    1. is he must redefine schedules to run queries? If not, how do?

    No - Just to stop the CM, enforce the upgrade (11.5.10 CU2 patch), and then bring back the CM and it must treat all your pending requests.

    2. If she must redefine schedules, how can I find out how many defined planning? is there a sql query to review?

    You don't have to redefine one of the requests. However, please see the docs for queries to determine regular concurrent programs.

    How to determine the regular of simultaneous requests [ID 170107.1]
    How to find all regular motions or a query in a particular status list? [554380.1 ID]

    3. how many special process/manager must be active after upgrade? as Planning Manager, etc.

    No change in the CM is necessary, unless you notice performance degradation.

    Thank you
    Hussein

  • There are older versions of garageband?

    There are older versions of garageband?

    Since Apple has the distribution of their software online, you will face the following situation.

    • Once Apple releases a new version of an application software and makes it available on the App Store, the previous version is no longer available (unless you have saved a copy of the previous Installer on your disk).
    • The App Store is the only source where you can get the software. Apple has total control of the distribution and you can't go to Amazon or eBay to get an older version.

    Hope that helps

    Edgar *.

    < personal information under the direction of the host >

  • OS3 no other event - even though there are events

    I installed os3 on my Apple Watch, but the face displays "No. more Events" despite the fact that there are a lot of events.  How to view my upcoming events?

    Hello

    It can help restore your sync data:

    • On your iPhone, in the application of the watch, go: Watch My (tab) > general > reset > tap reset sync data.
    • The process runs in the background (invisible to you), allow a minute or two later.

Maybe you are looking for

  • Facebook only the page is extremely low, no other site don't appear that way

    I updated my computer and while on my facebook page, I clicked by mistake on my mouse somewhere in the general area of the upper right of the page. Page, all the fonts, images, etc is now very low. It is the only affected site and in Internet Explore

  • Carbon X 1 SIM card not detected (Sierra EM7345 WWAN modem)

    Dear all, I have a X carbon 1 with Sierra EM7345 WWAN modem. It is that everything installed perfectly - drivers etc. But id does not recognize the SIM card. I googled a bit and I can say that: (1) I have the drivers OK, I the WWAN etc network adapte

  • HP ZBook studio G3: additional SSD

    I hope some can help me with the following. Is it possible to add a second SSD to a ZBook Studio G3 HP and if so what type of SSD? I noticed, when replacement/upgrade - dimm memory, there is a relatively large Empty space below the existing SSD (see

  • Retrieves a QVariantList string.

    Hello I use SQL in my application and reflected on the example of quotes, which queries the table of citations and stores the response in a QVariantList, but I can't understand how to extract value from a single field string, I found the following po

  • How to install Marika Odyssey in Windows 7?

    HelloI tried running the install in compatibility mode and the InstallShield engine crashes after I chose the folder to install the program. I tried to choose different folders and compatibility, but it doesn't let me go beyond that point. Is there a