How can I get the Photoshop JavaScript layer tags?
I asked this question to the graphics stack Exchange but they pointed me here:
I want to do actions based on the color of the layer labeled (these thing 1) in Photoshop. I can't find a property in the documentation of JavaScript or the ExtendScript Toolkit that can contain the value.
I'd rather do not abuse the name, layer tags look like a very clean to my problem solution. If only I could get.
Any ideas?
Kind regards
MII
Hi, these functions will select all layers with the specified color:
Use the command: selectAllByColor ("red");
function getIDXwithsameColor (TheColor) {/ / searches for and returns a list of indexes for the layers with the specified color}
Var ref = new ActionReference();
Iawf var = [];
try {activeDocument.backgroundLayer; var a = 0} catch (e) {var a = 1 ;};
While (true) {}
REF = new ActionReference();
ref.putIndex (charIDToTypeID ("Lyr"), one);
try {var desc = executeActionGet (ref) ;} catch (Err) {break ;}
CL var = desc.getEnumerationValue (charIDToTypeID ("Clr"));
CL = typeIDToStringID (cl);
ls var = desc.getEnumerationValue (stringIDToTypeID ("layerSection"));
LS = typeIDToStringID (ls);
If (ls! = 'layerSectionEnd') {}
if(CL == TheColor) {}
toRet.push (a);
}
}
a ++ ;
}
Iawf return;
}
function multiSelectByIDX (idx) {/ / function selection}
If (idx.constructor! = Array) idx = [idx];
var layers = new Array();
var / / desc = new ActionDescriptor();
Var ref = new ActionReference();
for (var i = 0; i)< idx.length;="" i++)="">
layers [i] = charIDToTypeID ("Lyr");
ref.putIndex (layers [i], idx [i]);
}
desc.putReference (charIDToTypeID ("null"), ref);
executeAction (charIDToTypeID ("TPCV"), desc, DialogModes.NO);
}
function selectAllByColor (TheColor) {/ / hand function}
theSameClIDX = (TheColor) getIDXwithsameColor;
multiSelectByIDX (theSameClIDX);
}
... example:
selectAllByColor ("none");
selectAllByColor ("red");
selectAllByColor ("orange");
selectAllByColor ("yellowColor");
selectAllByColor ("grain");
selectAllByColor ("blue");
selectAllByColor ("Purple");
selectAllByColor ("gray");
Tags: Photoshop
Similar Questions
-
How can I show the Photoshop Print - dialog JavaScript Pentecost?
Hello
How can I show the Photoshop Print - dialog JavaScript Pentecost?
You use the scriptListener plugin to save the action handler code? If so, replace the part of the last line of "DialogModes.NO" "DialogModes.ALL." Just be sure to no with this line:
app.displayDialogs = DialogModes.NO;
-
I just switched to a Nikon D80 with a Nikon D90 and I use Photoshop 4 and bridge. I can't open the NEF (raw) images off bridge. How can I get the camera raw dialog screen which came to my D-80?
Devices supported by Adobe Camera Raw
First of all, the D90 was supported in Camera Raw 5.1.
Open Photoshop and click on Photoshop (Mac) or help (Win) > Plug-ins > Camera Raw to see what version you use.
Photoshop CS4 comes with Camera Raw 5.0.
Try to update Camera Raw in Photoshop to 5.7 via help > updates.
If this does not work, try to manually edit Camera Raw
-
I favor creative cloud, with photoshop, I have in the office and at work. One home is 16.1.1 and office 16.0.0 version. How can I get the Office to be updated?
Hello
Greetings!
As your IT team to do.
Concerning
Jitendra
-
I just updated my photoshop to 13 and I'm unable to install/download. How can I get the said product to install?
Hi tonyaw,
Please install Photoshop 13 (CS6) from the following link: https://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html
Kind regards
Tanuj
-
Mr President
I allowed Adobe Illustrator and photoshop for the windows version, but I also needed Mac version. How can I get the mac license. Please give me the right answer.
Thank you.
Shaji Samuel
Hi Shaji, please see: a product for another language or version of trading platform
I hope this helps.
-
When I try to log in to Photoshop, it keeps asking me for a 'unlock code' so I'm unable to access my photos how can I get the unlock code
Thank you for your response to my query. I have the Album Starter Edition 3.2. It's a box of product registration keeps coming back when I try to log in. This starter edition has been downloaded as a trial as I have used for some years now without difficulty until I have to register and pay for the privilege of using it. I tried to register, but registration box disappears. I'm sorry to be vague, but I'm not as into it as you and still trying to familiarize themselves with computer terminology and everything very confusing sometimes. Even the delay in responding to your response to my query is due to not being able to navigate the Web site to know how to respond.
SORRY, but I hope you can help
-
Some time ago I found a copy of Photoshop 5.5 (APPLICATION and TRAINING) of the CD in the trash. I'm finally moving around trying to use it, but I don't have a serial number. I have the CD original, copies illegal not - how can I get the serial numbers to use to get this program to work?
Sorry to say that you are out of luck.
Serial numbers came on the cd case. If they aren't there, you have no way to use the program except as a 30 day trial. Adobe CS5 licenses no longer sells.
Gene
-
I bought Photoshop Element online 19/01/2015 and have AD015439775 number, but not the serial number. How can I get the serial number, please?
Mylenium
-
How can I get my photoshop (lightroom) return after damage my computer
Hello
There are a few weeks called on my Macbook and I recently bought a new. My question is how can I get my photoshop and lightroom back to my new computer?
Thank you
Hi Kopal Petr,
I don't see any product or any which subscription using the e-mail address that you logged into the forums.
In order to get the licensed version, please connect to adobe.com Web site by using the correct email address.
To download, click on the link download and install Adobe Photoshop CC
Download and install Adobe Lightroom CC
Let us know if this helps!
-
How can I get the update to Camera Raw 8.4?
How can I get the update to Camera Raw 8.4?
I don't inderstand why someone would get ACR 8.4. The correct version of ACR for CS5 is ACR 6.7, cs6 is cab 9.1.1 and CC, CC 2014 and 2015 ACR 9.5 CC.
Update can be downloaded from these links
Adobe Camera Raw 8.4 or later on Mac OS 10.6, Windows XP and Vista
Adobe - Photoshop: For Windows
2015 all updates of Adobe CC: Direct for Windows download links | ProDesignTools
Adobe - Photoshop: For Macintosh
2015 all updates of Adobe CC: Direct for Windows download links | ProDesignTools
-
I have 6 of Lightroom. How can I get the latest update?
I have 6 of Lightroom. How can I get the latest update?
You suggest to completely uninstall Lightroom and reinstall it from this link: Install Photoshop Lightroom
After the installation of this update 6.4
You catalogs and editions would be unchanged even after reinstallation.
-
I have Adobe CS5.1 and must be able to open the Nikon NEF RAW files from my Nikon D4s... y at - there a downoad on the Adobe site for it or how can I get the update to do?
Hi XDCAMAN,
Photoshop requires at least version 8.4 of camera raw to be able to directly open these Nikon NEF D4S files which is available in Photoshop CS6 and above versions (not in CS5)
Reference article: supported by Adobe Camera Raw devices
You can upgrade to a higher version of Photoshop or download Adobe DNG converter to convert raw files to DNG and access these DNG files in Photoshop CS5.
Kind regards
Claes
-
Change from windows to mac, how can I get the programs I bought for windows?
Change from windows to mac, how can I get the programs I bought for windows?
HAV photoshop loose 11 for my windows computer but I have now bought a mac. I can do something to get the program, I have to convert it to mac?
Hello
Please see a product for another language or version of trading platform
Hope that helps!
Kind regards
Sheena
-
How can I get the Organizer to display file names?
I'm lost and confused in Photoshop 13. How can I get the names of files to display in the menu Organizer? I chose to keep the old version of the display "grid" and miss having the names of all files. I searched the manual online, but can't seem to find what I need!
Please check options in the menu organizer of the following elements:
View > Details
View > Filenames
Maybe you are looking for
-
Need to find several e-mail source paswordwords
I need to know what password I entered for my net provider and also the gmail account. I saw that something on the files of e-mail where these exist, but do not remember what file in the fact that they are. Let me know where to look in Mozilla. TNX C
-
Why thunderbird does not truncate my user ID when you try to open a session?
Since November 2014, I was not able to connect using thunderbird 31.5.0 to get my email, but have been using called webmail horde very well. but now, I got tired of it and want to the difficulty of thunderbird and get back on track.during the verific
-
TECRA R840-16V to win7 64-bit to win10 level
I tried to upgrade my Tecra R840-16V (number PT429E-05M00KGE) form windows 7 64 bit pro to windows 10 pro through windows update. During the upgrade procedure is complete all seemed ok, but after a while, the system froze (even the mouse). I did a re
-
My wife has created a book of the best photos of the year project. How can I copy these photos in a standard album and the book so I can use this set in the future? All the commands I want to use are grayed.
-
Saturday, 19 March 2011 19:47:17 Microsoft purchase confirmation: MICROSOFT * XBOX LIVE Add to Contacts to: * address email is removed from the privacy * Frances dear ____, this mail is confirmation that you have purchased the following items: Date C