Automating the creation of a text layer for a user to manually add text.
Hi,
I wonder if anyone can help me here?
What I would like to do is to write a script, which creates a text layer, pauses and invites a user to add their text, and then save that to the file.
So far I've got this:
docRef = app.activeDocument
textColor = new SolidColor
textColor.rgb.red = 255
textColor.rgb.green = 255
textColor.rgb.blue = 255
helloWorldText = "Hello, World!"
newTextLayer = docRef.artLayers.add()
newTextLayer.kind = LayerKind.TEXT
newTextLayer.textItem.contents = helloWorldText
newTextLayer.textItem.position = Array(0.75, 1)
newTextLayer.textItem.size = 36
newTextLayer.textItem.color = textColor
Obviously this script just adds whatever text is in the line helloWorldText.
As I say I would like the script to stop, prompt the user to add their text, be ok'd, then complete the script.
Any suggestions?
Thank you,
Simon
