Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

JS [CS3]. Specify a Default Folder in openDialog()

Guest
Apr 22, 2009 Apr 22, 2009

Is there a way to specify that folder just like we can in selectDialog(prompt, default folder object)???

Otherwise the openDialog shows the last folder accessed by the user. Or can we modify the Window's Environment variable?

Thanks, Alex

TOPICS
Scripting
4.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Apr 22, 2009 Apr 22, 2009

Without getting into a discussion about the new forums, it is cute to see a question unanswered and then in the "More like this" section you find the answer to the question. (didn't realize until after I posted)

Translate
Enthusiast ,
Apr 22, 2009 Apr 22, 2009

To Specify folder use openDlg method not OpedDialog.

  when using openDlg it is neccesary to first create a File object, set parent folder to desired folder for opening dialog and file name for default file name. then if OK is pressed the fsname will have file path

Steven

http://scriptui.com

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 22, 2009 Apr 22, 2009

Without getting into a discussion about the new forums, it is cute to see a question unanswered and then in the "More like this" section you find the answer to the question. (didn't realize until after I posted)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 22, 2009 Apr 22, 2009
LATEST

By the way, you can also do

var myDefault = new Folder ("U:/xxx/zzz");

var myFiles = myDefault.openDlg(prompt string, filter string+pattern, multi-selection bollean);

Works in CS3. The Filename is left blank since we use a folder as a file... and the parent is the folder.

Alex.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines