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

How can I add default FileName in File.saveDialog() function in scripting?

Contributor ,
Feb 06, 2020 Feb 06, 2020

How can I include default file name in saveDialog scripting?

File.saveDialog("Title","Save As Type:*.png");
TOPICS
How to , Resources , Scripting
2.3K
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

Contributor , Feb 07, 2020 Feb 07, 2020

Thank you so much. It helped. I was asking for saveDlg. so I modified your code like below and it worked.

 

new File("Default File Name").saveDlg(["Title"],["PNG Files:*.png"]);

 

Thank a lot.

Translate
Community Expert ,
Feb 07, 2020 Feb 07, 2020

the file object has a openDlg method. It differs from the class method
openDialog() in that it presets the current folder to this File object’s parent folder and the current
file to this object’s associated file.

 

new File("path/to/defaultFile.txt").openDlg([prompt][,filter][,multiSelect]);

 

(also works when the file does not exist)

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
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
Contributor ,
Feb 07, 2020 Feb 07, 2020

Thank you so much. It helped. I was asking for saveDlg. so I modified your code like below and it worked.

 

new File("Default File Name").saveDlg(["Title"],["PNG Files:*.png"]);

 

Thank a lot.

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
Explorer ,
Aug 18, 2021 Aug 18, 2021

Is there a way to make this work on MacOS? I think this only works on windows...

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
Community Beginner ,
Sep 14, 2022 Sep 14, 2022
LATEST

It works the same. Just tested.

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