Flatten all layers including the background (but not locked layers)

Is there a way of

Flatten all layers including the background excluding all locked layers Layer

and then turn off visibility for locked layers

Any help most welcome!

After my previous error, I tried a solution, and you can give it a try:

2015, use it at your own risk.

#target photoshop

If (app.documents.length > 0) {}

myDocument var = app.activeDocument;

var theLayers = getLayersIndexAndID ();

Hide locked;

for (var m = 0; m< thelayers.length;="" m++)="">

If (theLayers [m] [3] == true) {hideByID (theLayers [m] [2])}

};

Merge visible layers;

myDocument.activeLayer = myDocument.layers [myDocument.layers.length - 1];

myDocument.layers [myDocument.layers.length - 1] .visible = true;

// =======================================================

var idMrgV = charIDToTypeID ("MrgV");

executeAction (idMrgV, undefined, DialogModes.NO);

};

////////////////////////////////////

function getLayersIndexAndID () {}

Var ref = new ActionReference();

ref.putEnumerated (charIDToTypeID ("Dcmn"), charIDToTypeID ("Ordn"), charIDToTypeID ("Trgt"));

var applicationDesc = executeActionGet (ref);

var number = applicationDesc.getInteger (stringIDToTypeID ("numberOfLayers"));

var theArray = new Array;

work in layers.

for (var m = number; m > = 0; m-) {}

try {}

Var ref = new ActionReference();

ref.putIndex (charIDToTypeID ("Lyr"), m);

var layerDesc = executeActionGet (ref);

var layerSet is typeIDToStringID (layerDesc.getEnumerationValue (stringIDToTypeID ("layerSection")));.

isBackground var = layerDesc.getBoolean (stringIDToTypeID ('background'));

theName var = layerDesc.getString (stringIDToTypeID ('name'));

theID var = layerDesc.getInteger (stringIDToTypeID ('layerID'));

locking of the var = layerDesc.getObjectValue (stringIDToTypeID ("layerLocking"));

anyLock var = false;

for (var a = 0;< locking.count;="" a++)="">

var thisLock = locking.getBoolean (locking.getKey (a));

If (thisLock == true) {anyLock = true}

};

////////////////////////////////////

If start of Group:

If (layerSet! = "layerSectionEnd" & isBackground! = true) {}

theArray.push ([theName, m, anyLock theID])

};

////////////////////////////////////

}

catch (e) {};

};

the results;

return theArray

};

hide the layer.

function hideByID (theID) {}

// =======================================================

idHd var = charIDToTypeID ('Hd');

var desc2 = new ActionDescriptor();

var idnull = charIDToTypeID ("null");

var list1 = new ActionList();

var ref1 = new ActionReference();

Ref1.putIdentifier (charIDToTypeID ("Lyr"), theID);

List1.putReference (ref1);

desc2.putList (idnull, list1);

executeAction (idHd desc2, DialogModes.NO);

};

Tags: Photoshop

Similar Questions

  • c7250 all-in-one: the network but not settled on laptop

    So, I'm new to this.  I have photosmart c7250 all-in-one.  My laptop has windows Vista premium edition.  Whenever I'm trying to install the printer, it shows no printer found.  I can find it via the control panel when I add a printer.  My laptop computer and printer are both active on my wireless network.  I can even print to it wireless.  It will spit out a blank page before every page it prints.  The printer is not only found during installation.  I got the printer working fine before.  I had to get my laptop, now I have this problem.

    I tried once more after the last message.  It worked this time.  However, I disabled my security only long enough to install.  I can shoot HP gacé Gallop again once and I don't have a blank paper before the test page.  Thank you once again.  I had tried for months until what someone told me that these forums exist.  Thank you!

  • Firefox does not start because he says that it's another instance that runs in the background, but I checked and it is not a!

    Firefox does not start because he says that it's another instance that runs in the background, but I checked and it is not a! I have Linux Fedora 15 and I'm not the root. I spoke to the Manager and he said I should delete a file in the folder where firefox is installed and which can solve the problem. Can you help me?

    Thanks, Marius
    

    Upgrade your browser Firefox 8 and check

  • Skype is running in the background, but does not open on the screen

    Skype is running in the background, but does not open on the screen

    Uninstall ArcSoft software. This application adds a filter cell of webcam and is originally Skype crashing.

    Stack: \Driver\,ArcSoftKsUFilter, \Driver\ksthunk,\Driver\usbvideo,\Driver\usbccgp

  • I want to do a clean install of windows xp on a hp compaq nx6125 but do not all disks with the laptop but I still have the original windows sticker on the bottom.

    I need to reinstall xp on my nx6125

    I want to do a clean install of windows xp on a hp compaq nx6125 but do not all disks with the laptop but I still have the original windows sticker on the bottom. is this possible or do I have to buy another drive xp and sticker

    Hello

    Yes, you can use this COST to install Windows XP. However, you must have Windows XP.
     
    If you face any problem regarding the installation of Windows XP.
    You can contact our Windows activation service.
    Here is the link:
  • My panels disappeared.  How to make a comeback?  (I all checked, including the histogram, layers, actions and adjustments)

    My panels disappeared.  How to make a comeback?  (I all checked, including the histogram, layers, actions and adjustments)

    Hello madeline,

    Please check that you have selected the correct "essentials" workspace, if you already correct then try to restore Photoshop preferences to default.

    Steps to follow:

    To re-create the Photoshop preferences files, start the application while pressing Ctrl + Alt + Shift (Windows) or command + Option + shift (Mac OS). Then, click Yes to the message, "Delete the Adobe Photoshop settings file?"

    Let us know if that helps.

    Kind regards

    ~ Mohit

  • Open a new file in photoshopcc and the name of the file is displayed but no Web white work. You can see it as a layer in the layers panel and if I pull on the grey area I see int on the layer, but not on the main screen.

    Open a new file in photoshop cc and the name of the file is displayed but no Web white work. You can see it as a layer in the layers panel and if I pull on the grey area I see int on the layer, but not on the main screen.

    Nice day!

    Could you please post a screenshot with the relevant panels visible?

    Not turning off"use graphics processor" in the Performance preference and restarting Photoshop have a bearing on the issue.

    Kind regards

    Pfaffenbichler

  • Œuvres of VPn on the inside of the interface, but not outside

    I have a PIX-525 with UR license.  I tried to get my VPN to work since my iphone over the weekend, but nothing helped.  Then, I changed the interface inside to see if my iMac could connect and bingo!  It worked.  I then tried to log in via the inside of the interface with my iphone and it worked.

    I have connected a PIX-515e and, using the same settings, can connect to the external interface via my iPhone.

    Strange.

    Now, to answer the pressing questions, yes I changed the IP address of the server in my client IPSEC settings to reflect the external and internal interfaces I was testing each of them.  I was using a pré-partagées secret.  Yes, the secret has been entered correctly and they have all matched... Yes, the name of the tunnel has been entered correctly.  I used the database local user for authentication with username/password name (i.e. no certificate of authorization to make things simpler for debugging).  I changed the syslog to debugging and I see absolutely no error when you try to connect my iphone to the external interface (i.e. turn off wifi so I'm on my 3G data network).  The only thing I see is where my iphone hits the external interface and it's disassembly (or whatever his name is) but that's all.

    Why this work like a charm with my PIX-515e and not my PIX-525?  VPN accelerator card in the 525 can be at fault?  The 515e doesn't have the aecellerator card.  No idea why can't I several a VPN connection inside the interface but not outside?

    Hi Tim,.

    Well it's not so much the DNS rewrite that is the problem (if you delete just the keyword dns VPN will still fail) but using the external interface for NAT. So all traffic intended for your address of the external interface is passed to the "gcbrouter", including vpn traffic.

    I'm thinking about a way to solve this problem, but I really can't find anythign right now. Using a different interface will not work because you can have only a single default route.

    I wonder if this would work:

    remove the NAT interface:

    not static (DMZ, external) gcbrouter netmask 255.255.255.255 dns interface

    Replace with PAT interface, i.e. add such a line for each port that you want to be contactable on the DMZ server:

    static interface tcp 80 gcbrouter 80 netmask 255.255.255.255 (DMZ, outside) dns

    static (DMZ, outside) of the 25 gcbrouter 25 netmask 255.255.255.255 tcp interface dns

    etc.

    In all honesty, I have never seen rewriting dns used with PAT so not quite sure if it will work.

    HTH

    Herbert

  • Devices to connect to the airport, but not to the Internet

    Hi all; Here's my situation:

    I just bought a new Airport Extreme to replace my old router (Linksys). In our House, we have two iPhones 6, as well as the iPad, Apple TV and MacBook Pro that were all bought again this year. All these things were able to connect to the internet using our old wireless router.

    As I have configured and installed at the airport, various devices have been able to connect without being able to connect to the internet (i.e. AirPort Utility, the airport connection is a green dot, while the actual internet connection is an orange): first it was the MacBook having this problem while the phones and the iPad have been completely connected. After I simply rebooted everything several times - i.e. the modem, router, and MacBook - I finally got the MacBook fully connected (without really changing all the settings, which are all entered correctly). Now, however, it is the two iPhones that will connect the airport but not actually in the internet.

    Any ideas? I must say, these strange little problems idiopathic who seem to always pop up with Apple products are starting to really bother me... I never got my MacBook to connect to the Apple TV via AirPlay.

    Any time you change the material or providers of Internet services, networking, it's always a good idea to perform a complete recycling of your network equipment power. Check out the following Tip of an airport users for more details on how to do it. Please post back your results.

  • FF4 tabs: above the Awesomebar, but not in the title bar?

    How do you get the tabs above the awesomebar, but not in the title next to the Firefox button bar? I have a dock at the top of my screen I want to keep, so I'm not all the way at the top. I want it to look like it turn Firefox page (http://www.mozilla.com/en-US/firefox/central/), with the title, tabs, awesomebar bar, then the content page.
    Currently, if I click on the tabs on the top, the legs of loading at the right of the button Firefox orange at the top, and if I uncheck that, all my tabs (of course) end up under the awesome bar.

    You can set the pref browser.tabs.drawInTitlebar false on the topic: config page.

  • Can print the attachments, but not emails

    On my Macbook, I use [email protected] for email and print issues. I can print the attachments, but if I try to print an e-mail the preview screen is empty, so nothing is printed. A blank page comes out of the printer - Deskjet F2280 all-in-one. It used to work very well so do not know what I did to upset the software.

    Hi MoBoot,

    Welcome to the HP Forums!

    I understand that you can not print e-mails with your Deskjet F2280 and I'm happy to help you with this printing problem!

    Since you are able to print the attachments, but not emails from your account [email protected], I recommend you contact Microsoft Support.

    Hope this helps and have a great day!

  • Down on the Image, but not on the mouse scroll bar event?

    Hi all

    I use an event "Mouse Down" on an image to save the coordinates X and Y of the click and increment a counter.  My problem is that I'm looking at an image with a scroll bar that I want to use to set what part of the image is visible.  When I click on the scroll bar, I set off the mouse event down and increments the counter, which I won't do.

    Is there a way to implement a mouse event to the bottom so that it will ignore clicks on the image scroll bars?  If not, can you think of another way to accomplish what I'm doing?

    Thank you!

    Some quick ideas:

    The scroll bars will be a fixed height or width of the right or at the bottom of the indicator. In the mouse to the bottom of the event handler, if the click happens to a set of coordinates that are in a region of scroll bar, you know, do not increment the counter.

    OR

    Maybe you can overlay a transparent image control such that it covers the image but not the scroll bars, and find clicks on this second control.

    Mike...

  • Laptop HP G70 connection to the router but not the internet

    I have a laptop HP G70 running windows 7, I got a new router installed. My computer to the router, but not to the internet links. I tried the software updates for my drivers running, doing all used to end router for example change etc channel/parameters/IP wifi. I tried to turn off the wireless, reset the router and re enabling it does not work.

    It will connect to the internet ethernet of nis.

    My laptop connects fine with other networks if it is not wireless.

    All other devices are connected to the router.

    Please help this is extremely frustrating.

    You are the very welcome.

    I compressed the file and downloaded on my Skydrive account, which I shared the link below.

    Download, unzip and run the file called sp54972.

    https://onedrive.live.com/redir?RESID=832F4957D2E51B93! 263 & authkey =! AEOhdjA3QVhETy0 & ithint = % 2czip

  • Unable to send attachments in outlook express. HTML is selected and is therefore 'send pictures' recipient receives the text but not images?

    I am unable to send attachments in outlook express. HTML is selected and is therefore 'send pictures' recipient receives the text but not images?

    All security settings seem fine, an idea?

    Some messages do not conform to the standards of the Internet in the sense that they cannot be returned intact by their transmission.  The way around this is to use Message | Until the attachment, then they will be properly transmitted, since they will be attached.

    Steve

  • The administrator password for all computers on the network does not work for ONE of the computers on the network

    original title: the computers of network/administrator password

    The administrator password for all computers on the network does not work for ONE of the computers on the network. I need to log on as an administrator to install software, but the password does not work. It works on other computers, but not this one. How is this possible and how can it be solved?

    Hello
    Microsoft technical support engineers cannot help you recover the passwords of the files and Microsoft who are lost or forgotten product features. For more information about this policy, please refer to the below sticky

    http://social.answers.Microsoft.com/forums/en-us/vistasecurity/thread/3eba3150-8742-4264-be9f-0daaad2282cd

Maybe you are looking for

  • Why "Quit" option in the menu did not close the app?

    When I press the options on the menu, I select "Quit" and Firefox on Android latest version resignation and clean as it was created. However, when I hold the button pop up list of the still running on my Android app, it shows Firefox still works even

  • Photosmart 110: 110 Photosmart paper feed

    Hi all I've had a Photosmart 110 for awhile now, guessing 3 or 4 years, no problems before. Now the paper source will not take the paper in the printer. All the rolls are going through, but do not attract the paper. If I force the paper, it will work

  • It says no Audio output device installed and when I try to find it and install it the computer says it can't find

    I need to know how to re - turn my speaker. It was working when I got to the computer.

  • Administrator

    I use sybot to clean my system.  After running it I try to correct the undesirable problems but spybot won't remove them as it says that I am not an administrator.  How to be an administrator?

  • Application distribution

    Hello I think that this may be off topic for this forum. Because I couldn't find the appropriate information for what I want. -Advertising for free via my wap server application? -Do I need to obtain certification for our application to be repaired?