-- Create the dialog object local dialog = finale.FCFileOpenDialog(finenv.UI()) -- Set the window title local windowtitle = finale.FCString() windowtitle.LuaString = "Open some files" dialog:SetWindowTitle(windowtitle) -- Set the filter local filter = finale.FCString() filter.LuaString = "*.txt" local filterdescr = finale.FCString() filterdescr.LuaString = "Text Files" dialog:AddFilter(filter, filterdescr) -- Allow multiple file selection dialog.MultiSelect = true -- Display the dialog to the user if dialog:Execute() then -- Get the names of the selected files and display the names local filenames = finale.FCStrings() dialog:GetFileNames(filenames) for fname in each(filenames) do print (fname.LuaString) end end