What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Reply to thread

One way is to create a text layer for each count, here is a Photoshop script that will do this....

You mighthave to ament the font size/colour to suit.

N.B. Create all your counts before running the script.


[CODE]

#target photoshop;

main();

function main(){

var ref = new ActionReference();

ref.putProperty(charIDToTypeID('Prpr'),stringIDToTypeID("countClass"));

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

var Count = executeActionGet(ref).getList(stringIDToTypeID("countClass")).count

for(var z =0; z < Count; z++){

var X = executeActionGet(ref).getList(stringIDToTypeID("countClass")).getObjectValue(z).getUnitDoubleValue(stringIDToTypeID( "x" ));

var Y = executeActionGet(ref).getList(stringIDToTypeID("countClass")).getObjectValue(z).getUnitDoubleValue(stringIDToTypeID( "y" ));

var layerName = "Count " + (z+1);

createXY(layerName,X,Y,z);

}

};

function createXY(layerName,X,Y,z) { 

var startRulerUnits = app.preferences.rulerUnits;

app.preferences.rulerUnits = Units.PIXELS;

var thisLayer = activeDocument.artLayers.add();

thisLayer.kind = LayerKind.TEXT;

thisLayer.name = layerName;

var textProperty = thisLayer.textItem;

textProperty.kind = TextType.POINTTEXT;

//Font Size

textProperty.size = 72;

textProperty.font = "Arial";

var newColor = new SolidColor();

//Font Colour

newColor.rgb.red = 19;

newColor.rgb.green = 246;

newColor.rgb.blue = 179;

textProperty.color = newColor;

textProperty.position = new Array( X,Y);

thisLayer.blendMode = BlendMode.NORMAL;

thisLayer.opacity = 100;

textProperty.contents = "."+(z+1);

app.preferences.rulerUnits=startRulerUnits;

};



[/CODE]


What is our favorite program/app? (Hint - it begins and ends with the letter P)
Back
Top