[JW Lua] JW Lua v0.42 (Windows only)

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Sat Oct 17 19:20:43 CEST 2015


Hello All!

I've released a Windows-only update called beta v0.42 that fixes the 
multiple files issue in FCFileOpenDialog that Charles described. It's 
easier for me to make a separate update for this now, since I'm soon 
going to make some big code changes.

There's currently no way to open Finale files from JW Lua.


Best regards,

Jari Williamsson


On 2015-10-17 16:41, Charles O. Lawrence wrote:
> Thanks for the new betas 0.40/0.41.  A massive update!  You have been busy.
>
> I cannot get the following code to work as intended.  If I select only
> one file in the dialog box, it correctly displays the chosen file name.
> If I select more than one file, it reports that only one file was
> selected and displays the directory name.  What am I missing?  On the
> same subject, after retrieving a filename, or several, how then does one
> use that filename to actually open a Finale file, say a MUSX file, from
> within Finale?
>
> Thanks,
>
> Charles
>
> -- Create the dialog object
>
> local dialog = finale.FCFileOpenDialog(finenv.UI())
>
> -- Set the window title
>
> local windowtitle = finale.FCString()
>
> windowtitle.LuaString = "Open some Lua files"
>
> dialog:SetWindowTitle(windowtitle)
>
> -- Set the filter
>
> local filter = finale.FCString()
>
> filter.LuaString = "*.lua"
>
> local filterdescr = finale.FCString()
>
> filterdescr.LuaString = "Lua Files (*.lua)"
>
> 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)
>
>      print ("Number of files chosen",filenames.Count)
>
>      for fname in each(filenames) do
>
>          print (fname.LuaString)
>
>      end
>
> end
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>






More information about the JWLua mailing list