We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
Copy link to clipboard
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?
i solved the problem.
For open dialog browser for choose file
for open dialog browser for choose folder
Usually, you should use File().openDlg only if you want to preselect a particular file by default and use
File.openDialog( [prompt, filter, multiSelect] )
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)