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

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

Contributor ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

How can I include default file name in saveDialog scripting?

File.saveDialog("Title","Save As Type:*.png");
TOPICS
How to , Resources , Scripting

Views

2.0K

Translate

Translate

Report

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.

Votes

Translate

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

It works the same. Just tested.

Votes

Translate

Translate

Report

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