[JW Lua] Change System Margins after Double barline

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Tue Nov 5 15:11:47 CET 2013


On 2013-11-02 14:09, Herbert van Essen wrote:

> Is there a way to determine if a system is at the top of a page?

Here's a script that prints the "statistics" about each system in the 
document (and prints "true" if it's a top system). The "IsTopOfPage" 
function returns true if the system object is found as a top system on 
any of the supplied pages.

---
function IsTopOfPage(system, pages)
     for p in each(pages) do
         if system.ItemNo == p:GetFirstSystem() then return true end
     end
     return false
end

finale.FCStaffSystems.UpdateFullLayout()
local allsystems = finale.FCStaffSystems()
allsystems:LoadAll()

local allpages = finale.FCPages()
allpages:LoadAll()

for sys in each(allsystems) do
     print ("Is system", sys.ItemNo, "top of page? Answer:", 
IsTopOfPage(sys, allpages))
end
---


Best regards,

Jari Williamsson





More information about the JWLua mailing list