[JW Lua] Add blank page

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Sun Sep 7 19:39:25 CEST 2014


Bart,

To be able to create a blank page, the start system needs to be set to 
-1 (a magical value for Finale). However, there's no SetStartSystem() 
available for FCPage, so I'll have to add something here.

I would really want to avoid the use of magical values in JW Lua 
scripts, so I'll see if I can create something more user friendly.


Best regards,

Jari Williamsson


On 2014-09-06 21:20, Bart Visser wrote:
> Hi,
>
> I'm trying to create a blank page, but saving one returns false:
>
> local allPages = finale.FCPages()
> allPages:LoadAll()
>
> local firstPage = finale.FCPage()
> firstPage:Load(1)
> local pageProperties = dumpproperties(firstPage)
>
> local newPage = finale.FCPage()
> for k,v in pairs(pageProperties) do
> 	newPage[k] = v
> end
>
> newPage.ItemNo = (allPages.Count + 1)
> finale.FCStaffSystems.UpdateFullLayout()
> print(newPage:SaveNew(allPages.Count + 1))
>
>
> Is it my code or is this function not yet available in JW Lua (like the append-function in finale.FCStaves)?
>
> Thanks,
>
>
> Bart
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>






More information about the JWLua mailing list