Is there a way to get a text value from the user in a Photoshop script?

I’m using a JSX script to export an image to different sizes in Photoshop and I would like to get a value from the user such as to let them type in the file name. I would really like to show a dialog with a form but I would be fine if I could get the text value.

Link to script: https://gist.github.com/appsbynight/3681050
Link to similar post: https://graphicdesign.stackexchange.com/a/21796/33547

Answer

It looks like I can use prompt to get a value:

var value = prompt("Type in the name of the file", "filename.png"); 

If we run the code in Photoshop,
http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/photoshop/pdfs/cs6/Photoshop-CS6-JavaScript-Ref.pdf

Attribution
Source : Link , Question Author : 1.21 gigawatts , Answer Author : 1.21 gigawatts

Leave a Comment