Copy link to clipboard
Copied
I have this script, I am trying to create a generated alphabet on new text items, however I get the error that "required value is missing".
I feel it is something obvious, but I am stumped.
#target Photoshop
var abc = new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
for (i < 0; abc.length; i++){
var al = app.activeDocument.artLayers.add ();
al.kind = LayerKind.TEXT;
al.name = abc
al.textItem.font = "ArialMT"
al.textItem.size = 1200
al.textItem.contents = abc
}
for (i = 0; i < abc.length; i++)
Copy link to clipboard
Copied
Try
for (i < 0; i < abc.length; i++){
Copy link to clipboard
Copied
Sadly no joy.
Copy link to clipboard
Copied
Open a document 2500px by 2500px add positoin to your text layer also.
#target Photoshop
var abc = new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
for (i < 0; i < abc.length; i++){
var al = app.activeDocument.artLayers.add ();
al.kind = LayerKind.TEXT;
al.name = abc
al.textItem.font = "ArialMT"
al.textItem.size = 1200
al.textItem.position = Array(500, 1800 );
al.textItem.contents = abc
}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copied your code word for word to remove chance of error.
I still get the below:
Copy link to clipboard
Copied
Perhaps its a bug in Adobe ExtendScript. I do not use that Just save that code as test.jsx and run it in Photoshop however, it most likely is you have no open document you need one to use that script. Otherwise the no document to add the text layer to.
with no open document active you will get
Copy link to clipboard
Copied
Running via Photoshop throws up the same error via Error dialog.
Copy link to clipboard
Copied
Not sure, if related, but I have also been getting this on a few scripts today:
Copy link to clipboard
Copied
read post #3
Copy link to clipboard
Copied
Haha r-bin, I am so sorry. I literally thought you had the same comment as JJ and that you'd both just commented at the same time.
That indeed was the solution. Cheers.
Copy link to clipboard
Copied
In the Extendscript you show that line as line 6 not 7 did you add a statement?
Copy link to clipboard
Copied
for (i = 0; i < abc.length; i++)