Help with an incrementation and exporting script.
Hi, I'm trying to use the following code to increment a text layer then export the image. It successfully increments, but it's not exporting or throwing an error message. Note: Most of this code isn't mine, and I'm a relative newb.
----------------------------------------------------
var layer = activeDocument.layers[0];
if (layer.kind == 'LayerKind.TEXT') {
for (var i=1; i < 7; i++) {
layer.textItem.contents = i.toString();
sfwPNG24('C:\Users\WS\Pictures\ ' + i + '.png');
}
}
function sfwPNG24(saveFile){
var pngOpts = new ExportOptionsSaveForWeb();
pngOpts.format = SaveDocumentType.PNG;
pngOpts.PNG8 = false;
pngOpts.transparency = true;
pngOpts.interlaced = false;
pngOpts.quality = 100;
activeDocument.exportDocument(new File(saveFile),ExportType.SAVEFORWEB,pngOpts);
}