Skip to main content
Adirai Maji
Inspiring
February 7, 2020
Answered

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

  • February 7, 2020
  • 2 replies
  • 2583 views

How can I include default file name in saveDialog scripting?

File.saveDialog("Title","Save As Type:*.png");
This topic has been closed for replies.
Correct answer Adirai Maji

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.

2 replies

Inspiring
August 19, 2021

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

Participating Frequently
September 14, 2022

It works the same. Just tested.

Mathias Moehl
Community Expert
Community Expert
February 7, 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
Adirai Maji
Adirai MajiAuthorCorrect answer
Inspiring
February 7, 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.