Using Photoshop 2017, I am splitting a text layer into words:
Using the following script:
psd = app.activeDocument;
layer = psd.activeLayer;
var text = layer.textItem.contents;
var textArray = text.split(" ");
var lngth = textArray.length+1;
for (var w=1; w<lngth;w++){
wordlayer = layer.duplicate();
wordlayer.name = textArray[w-1];
wordlayer.textItem.contents = textArray[w-1];
psd.activeLayer = wordlayer;
}
Which produces this result:
What I'm having a problem with, as you can tell, is the positioning. Is it possible to get the original coordinates of each word so that I can position each text layer appropriately?
Another possible approach: I thought about duplicating each layer as it is and changing the colour transparency of the other words to 0%. The closest question I found to it is this one [ExtendScript]Change font color, size of certain word in text layer, but even if that did work, It doesn't look like setting alpha/transparency for individual words is possible anyway.

