[JW Lua] TS and KS as strings example

Charles O. Lawrence charlesolawrence at bellsouth.net
Fri Mar 27 17:24:55 CET 2015


Anyone,
In this code, why is it not necessary to declare lastmeasre as FCMeasure()?

local allmeasures = finale.FCMeasures()
allmeasures:LoadAll()
print ("Measure Count",allmeasures.Count)

local lastmeasure  --  = finale.FCMeasure  apparently it is not necessary to
declare this as FCMeasure() local TSString = finale.FCString() local
KSString = finale.FCString() for measure in each(allmeasures) do
    if measure.ItemNo > 1 then
        measure.TimeSignature:MakeString(TSString)
        measure.KeySignature:MakeString(KSString)
        print ("Current
Measure",measure.ItemNo,"TS",TSString.LuaString,"KS",KSString.LuaString,"Las
t Measure",lastmeasure.ItemNo)
        if not measure.TimeSignature:IsIdentical(lastmeasure.TimeSignature)
or not measure.KeySignature:IsIdentical(lastmeasure.KeySignature) then
            lastmeasure.Barline = finale.BARLINE_DOUBLE
            lastmeasure:Save()
        end
    end
    lastmeasure = measure
end





More information about the JWLua mailing list