[JW Lua] GetPath on MAC

Simon Leclerc simon at prodsl.ca
Tue Nov 28 16:51:36 CET 2017


Hi again Chris,

I ran it in Finale 25 on a Mac without any problem. I did a few tests and it seems to be working very well.
Great job by the way!

I’ll try it later on other versions of Finale to see if I can reproduce the problem you mentionned.

Second part: I just was able to reproduce the problem in Finale 25.

One thing that I noticed, and it might be different on Windows: In Finale, when you call  FCDocuments:LoadAll(),
Finale will keep in memory the same document as different entries if it has been opened several times within the same session (without quitting Finale).
The right file is always the last one on the list with that name, where those repetitions appears. So even if you have only 2 files opened, Finale may return more as “opened documents”. I overcame that problem by adding a line that tells Lua to replace the value of that key if it encounters the same value twice or more with the last similar entry.

Right now, it does not explain your “Untitled (id = 3)” , I would need to look a little bit closer at your script, but I’m sure it has to do with the way those documents are called. You could tell it not to consider the file if has that name (a workaround for the moment).

I’ll look into it a little bit more later today, but here is a snapshot of what I see, eventhough I have only 2 documents opened (notice that the file “Template.musx” appears twice, eventhough only one version of the file is actually opened):



Hoping this gives you a hint to solve the problem.





> On Nov 28, 2017, at 9:51 AM, Chris <marcel.denio at gmail.com> wrote:
> 
> Thank you all
> 
> Simon : I join my script
> Bart :  it may be the explanation
> Jan : the script is running twice
> 
> Chris
> <copie_mise_en_page.zip>_______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu





Simon Leclerc
60, Mirabelle
Ste-Agathe-des-Monts, Québec
J8C 0W9
simon at prodsl.ca




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20171128/404e919d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-11-28 at 10.39.19 AM.png
Type: image/png
Size: 105732 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20171128/404e919d/attachment.png>


More information about the JWLua mailing list