Skip to main content
Participant
September 26, 2012
Answered

Script to open the Open Dialog Window

  • September 26, 2012
  • 1 reply
  • 11879 views

Hello everyone!

I'm new to scripting and this is probably an easy question but I'm trying to write a script that opens the Open Dialog Window. Basically I need to start the script in one active document, have the script open the Open Dialog (to let the user select another image) and then finish the script in the newly opened document. Every script I find is to open a specific file, but I need it to be User Selected through the Open Dialog of Photoshop.

I hope that makes sense! LOL. Any help would be greatly appreciated!

Thanks,

Bradi

This topic has been closed for replies.
Correct answer Michael_L_Hale

Below is an example of how to prompt for a file. You can find details about File and Folder classes/object in the JavaScript Tools Guide. That PDF can be found in a subfolder where ExtendScript Toolkit is installed.

var myFile = File.openDialog("Selection prompt");

if(myFile != null) app.open(myFile);

1 reply

Michael_L_HaleCorrect answer
Inspiring
September 26, 2012

Below is an example of how to prompt for a file. You can find details about File and Folder classes/object in the JavaScript Tools Guide. That PDF can be found in a subfolder where ExtendScript Toolkit is installed.

var myFile = File.openDialog("Selection prompt");

if(myFile != null) app.open(myFile);

Participant
September 26, 2012

Thank you so much! I will check out that resource. I appreciate your help!

Inspiring
October 10, 2012

Is this also possible to simply open the "Find and Replace" dialog in Illustrator & then close it?

No need to do anything with "Find and Replace" just want to open it then have it close to avoid an Illustrator bug.