change the colors in the vector shapes - photoshop script

I have a problem with the code which changes the colorsand vector shapes. It only works on a single layer, and if you select more than one layer, it pops up error. Is - that someone knows how to solve this problem?

#target photoshop
cTID
= function(s) { return app.charIDToTypeID(s); };
sTID
= function(s) { return app.stringIDToTypeID(s); };

function Action3() {

 
function step1(enabled, withDialog) {
  
if (enabled != undefined && !enabled)
  
return;
  
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
  
var desc1 = new ActionDescriptor();
  
var ref1 = new ActionReference();
  ref1
.putEnumerated(sTID("contentLayer"), cTID('Ordn'), cTID('Trgt'));
  desc1
.putReference(cTID('null'), ref1);
  
var desc2 = new ActionDescriptor();
  
var desc3 = new ActionDescriptor();
  
var desc4 = new ActionDescriptor();
  desc4
.putDouble(cTID('Rd '), 243);
  desc4
.putDouble(cTID('Grn '), 110);
  desc4
.putDouble(cTID('Bl '), 93);
  desc3
.putObject(cTID('Clr '), sTID("RGBColor"), desc4);
  desc2
.putObject(cTID('FlCn'), sTID("solidColorLayer"), desc3);
  
var desc5 = new ActionDescriptor();
  desc5
.putInteger(sTID("strokeStyleVersion"), 2);
  desc5
.putBoolean(sTID("fillEnabled"), true);
  desc2
.putObject(sTID("strokeStyle"), sTID("strokeStyle"), desc5);
  desc1
.putObject(cTID('T '), sTID("shapeStyle"), desc2);
  executeAction
(cTID('setd'), desc1, dialogMode);

 
};

step1();};

Action3.main = function () {

Action3();};Action3.main();

2016, use it at your own risk.

#target photoshop

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

myDocument var = app.activeDocument;

var theLayers = getSelectedLayersIdentifier();

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

changeSolidColor (theLayers [m], 128, 0, 255);

}

};

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

based on the code of paul m..

function getSelectedSoidColorLayersIdentifier() {}

var selectedLayers = new Array;

Var ref = new ActionReference();

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

var / / desc = executeActionGet (ref);

If (desc.hasKey (stringIDToTypeID ("targetLayers"))) {}

DESC = desc.getList (stringIDToTypeID ('targetLayers'));

var c = desc.count;

var selectedLayers = new Array();

Browse layers selected;

for (var i = 0; i)<>

try {activeDocument.backgroundLayer;

var theIndex = desc.getReference (i). getIndex();

} catch (e) {var theIndex = desc.getReference (i) .getIndex () + 1};

get id for layers of solid color;

try {}

Var ref = new ActionReference();

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

var layerDesc = executeActionGet (ref);

var theIdentifier = layerDesc.getInteger (stringIDToTypeID ("layerID"));

var adjList = layerDesc.getList (stringIDToTypeID ('adjustment'));

var theColors = adjList.getObjectValue (0) .getObjectValue (stringIDToTypeID ('color'));

selectedLayers.push (theIdentifier);

} catch (e) {};

};

If a single:

} else {}

Var ref = new ActionReference();

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

var layerDesc = executeActionGet (ref);

try {}

var theIdentifier = layerDesc.getInteger (stringIDToTypeID ("layerID"));

var adjList = layerDesc.getList (stringIDToTypeID ('adjustment'));

var theColors = adjList.getObjectValue (0) .getObjectValue (stringIDToTypeID ('color'));

selectedLayers = [theIdentifier]

} catch (e) {};

};

Return selectedLayers;

};

change the color of solid color layer.

function changeSolidColor (theIdentifier, theR, g target) {}

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

var idsetd = charIDToTypeID ("setd");

var desc4 = new ActionDescriptor();

var idnull = charIDToTypeID ("null");

var ref1 = new ActionReference();

Ref1.putIdentifier (stringIDToTypeID ('contentLayer'), theIdentifier);

Desc4.putReference (idnull, ref1);

idT var = charIDToTypeID ("T");

var desc5 = new ActionDescriptor();

var idClr = charIDToTypeID ("Clr");

var desc6 = new ActionDescriptor();

idRd var = charIDToTypeID ('Rd');

desc6.putDouble (idRd, theR);

var idGrn = charIDToTypeID ("Grn");

desc6.putDouble (idGrn, g);

var idBl = charIDToTypeID ("Bl");

desc6.putDouble (idBl, theB);

var idRGBC = charIDToTypeID ("RGBC");

Desc5.putObject (idClr, idRGBC, desc6);

var idsolidColorLayer = stringIDToTypeID ("solidColorLayer");

Desc4.putObject (idsolidColorLayer, idT, desc5);

executeAction (idsetd, desc4, DialogModes.NO);

};

Tags: Photoshop

Similar Questions

  • I want to change the design of PhotoshopI program

    Hello

    It comes to Changwon Park who use first every month.

    Today I bought to use the monthly program of first,

    but I can't use it. So, I hope to change the program to Photoshop.

    I want to know how the Exchange program!

    Please answer for that soon.

    Thank you very much for your help.

    Bye ~

    P.S. is my email ([email protected]). If you want to know more information about me. Please contact me at any time.

    Thank you

    Hi Changwon,

    Please contact support to get this cancelled order & buy a new.

    https://helpx.Adobe.com/support.html#/top_products

    Concerning

    Stéphane

  • How can I change the language on Photoshop?

    How can I change the language on Photoshop?

    What version of Photoshop are you? If you have CC, you can change the language preferences in Adobe Creative Cloud application:

  • How can I change the language of photoshop?

    Hi, how do I change the language of Photoshop?

    CS6

    You can exchange languages/platforms for a newer version product if you follow the instructions on the following link:

    l http://helpx.adobe.com/x-productkb/Policy-Pricing/Order-Product-Platform-Language-swap.htm

    CC

    Cloud creation help / solve the installation language. Creative Cloud applications. CCM-

    http://helpx.Adobe.com/creative-cloud/KB/change-installed-language.html

  • the vector shapes for Adobe illustrator CS5 stuck in the background

    Adobe illustrator CS5 vector shapes stuck in the background, software updates fail to update.  any suggestions?  My diapers are not locked.  I made simple in a double circle and the vector shape can be clicked or moved.

    You're welcome, Johnny.

    The list applies to all versions of CS and CC and back.

    I hope that you report your findings.

  • How do I change the language in Photoshop CC Danish to English?

    How do I change the language in Photoshop CC Danish to English? I'm not used to working in my motherlanguage in PS - but when I downloaded the app, it was in Danish - I didn't have the choice to choose the language. Then what should I do?

    I checked the creative cloud for the options to choose the languages, but it doesn't seem to be all the version of Elizabeth... ?

    KirstenAdler please see set the installation language. Creative Cloud applications. CCM - http://helpx.adobe.com/creative-cloud/kb/change-installed-language.html which explains how to set the language installation of Photoshop CC.

  • I need to change the language in Photoshop

    I need to change the language in Photoshop cs 6. I have the composition of the cloud, and somehow the photoshop became a Norwegian version. I need that it is in English.

    How can I do this?

    Hello, you're lucky, there's a video on this topic:

    To switch languages in Photoshop, go to: Preferences > Interface (in the menu of Photoshop on a Mac, or at the end of the menu edit on a PC) to change the language in the following location, and then restart Photoshop:

  • You can blur the vector shapes in Photoshop without pixelation?

    Is there a way of blurring vector shapes in Photoshop, similar to the way in which Illustrator, bypassing the rasterization of the layer? I work with a very large file that has been reduced from 300 DPI to 50 to handle everything working. Before sending to the printer, I'm going to sclae at 300 dpi. The rasterized images will soften as you know who I think is ok when it comes to a blurred form, now that I think about it. But for later use?

    Thank you

    DM

    After experimenting, I discovered a method that works in this case. I wanted to scramble a vector shape of rectangle. I call on the form and then applied an effect of outer glow layer to form

  • change the draw shapes to paths?

    How can I change the I ve of complex shapes imported drawing into simple paths?

    It works more like the shape of task of Illustrator.

    If you want to shoot and take advantage of each stroke as a path, see (uhhhh...) Sketch of Photoshop?

    You can align on Adobe Illustrator, then all the individual strokes convert to paths (you will lose all custom in conversions brush definitions)

  • How to change the resolution of Photoshop CS3 and Adobe Photodeluxe Home Edition 3.1

    Original title: display Photoshop

    I have Windows Vista Home Premium edition on my computer. For some time, the display of my programs Adobe Photoshop CS3 and Adobe Photodeluxe Home Edition 3.1, but NOT of Adobe Photoshop Elements 5, is huge and fuzzy. Is it possible to change the display resolution / of these programs only?

    Hello

    1. What is the current screen resolution of the Office?

    2. is the specific question of the 2 programs?

    3 did you last modified the software on the computer?

    If the questions is specific to Adobe products then I suggest you to contact Adobe support for help at:

    Adobe support

    http://helpx.Adobe.com/support/

  • By selecting the vector shapes in mode traced that go beyond the edge of hidden form?

    Hi all

    In Adobe Illustrator, I often receive works of art which has the art of "junk" hidden in a hidden form. However, this art of the Junk extends beyond the hidden form and is visible in preview/trace mode. How to choose junk art WITHOUT having to expose everything?

    I have attached a very basic example. Usually, I have large files with vector patterns complex that add thousands of unnecessary points that are hidden in the mask.

    Ideally, I would like to be in preview/trace mode and simply select the useless pieces of art and remove them to clean the file better.

    SelectingMaskedArt.jpg

    Double-click to edit inside the shape using the Mode of insulation, or simply use the lasso tool or the direct Selection tool to select the areas you want to remove, and then remove them. Don't hit delete twice, or it will remove the entire shape grouped/hidden.

  • change the language on photoshop

    Hi, how can I change the language of my photoshop in french on mac OS X? Thank you

    Hi martinb78776721,

    Please follow the steps mentioned https://helpx.adobe.com/creative-cloud/help/change-install-language.html

    https://forums.Adobe.com/thread/393490?start=0&TSTART=0

    Let us know if it works for you!

  • How can I change the language in photoshop CC 2015? option with bak. do not work

    On the internet, recommendation is to change the last three letters of bak. but my language which is Polish already bak. in the file name and, of course, psd works on Polish language option. And no, there is no language option to choose in preferences. My pc is running windows 8.1 for more information. It would be great if someone has an answer :)

    Hi adriannag,

    You need to change the language in the creative of cloud application preferences and reinstall Photoshop.

    Refer to this article: change the language setting for Adobe Creative Cloud applications

    Kind regards

    Claes

  • How to change the pixels in Photoshop?

    How can I change the size of the pixel on photoshop, I went to image > image size and then he says dimensions and the size of the pixel there but the wont let me click on it to change the size?

    Hi lucyj18048147,

    Once you click on the Image > Image size, then you need to manually put in the information to pixels in width and height.

    Kind regards

    Tanuj

  • change the resolution in photoshop express

    How can I change the resolution of an image in photoshop express? @@

    You will probably get a better response if you post in the forum Photoshop Express:

    Photoshop Express

Maybe you are looking for