For example: Here is one example.
I decided to make a script to open a project template.
First, the folder ProjectTemplates opens, then I choose a template and a window opens about saving, and here the path to the folder ProjectTemplates is saved, and it is not possible to open your path, which is very uncomfortable. And if you do not specify the path, the project template resaves itself, which is categorically not necessary.
Code:
local Path = reaper.GetResourcePath().."/ProjectTemplates";
local retval,fileNames = reaper.JS_Dialog_BrowseForOpenFiles("Open ProjectTemplates",Path,"","",false);
if retval == 0 or fileNames == "" then return end;
reaper.Main_openProject(fileNames);
reaper.Main_SaveProject(0,true);