Skip to main content
Brontzai
Inspiring
August 29, 2021
Answered

How can I create a file select (browse) button for After Effects UI scripts?

Hello everyone. Tell me how I can implement a button to open the browser and select a file. And then write a link to that file in a variable. Or can this be done with a plugin?

 

 

This topic is closed to new replies. Start a new post to keep the conversation going.
Brontzai
BrontzaiCorrect answer
Inspiring
August 29, 2021

i solved the problem.

For open dialog browser for choose file

File().openDlg;

for open dialog browser for choose folder

Folder().selectDlg;

 

2 replies

Mathias Moehl
Community Expert
Community Expert
August 30, 2021

Usually, you should use File().openDlg only if you want to preselect a particular file by default and use

File.openDialog( [prompt, filter, multiSelect] )

otherwise:

 

new File("~/Desktop/test.mp4").openDlg("Please choose a video file"); // this preselects test.mp4 on my desktop

File.openDialog("Please choose a video file"); // this opens the default location and preselects no file

 

(note the difference between Dialog and Dlg)

Translate
Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Brontzai
BrontzaiAuthorCorrect answer
Inspiring
August 29, 2021

i solved the problem.

For open dialog browser for choose file

File().openDlg;

for open dialog browser for choose folder

Folder().selectDlg;

 

Translate