[JW Lua] FCStaffStyleDef:Load(...) always returns true

Jan Angermüller jan at angermueller.com
Wed May 11 17:13:30 CEST 2016


Thanks, Chris, your script works fine.

All dummy definitions were completely unused staff styles - all with the 
default settings.

I have no idea where the broken list came from. But as I have had this 
behaviour in several documents it is something that Jari should fix.

Best,
Jan

Am 11.05.2016 um 15:37 schrieb Chris:
> Hello Jan
>
> The problem is that the list index (ItemNo) is broken:
> 1 2 3 4 5 6 7 8 9 10 .... 13 .... 20 ... 25 ......
> But why ???
>
> With this script, you retrieve the list  (66 is your last index) :
>
> ---------------------------------------------
> for i =1,66 do
>     local namestr=finale.FCString()
>     local s=finale.FCStaffStyleDef()
>     s:Load(i)
>     s:GetName(namestr)
>
>     if namestr.LuaString=="" then
>         local name = finale.FCString()
>         name.LuaString = "dummy " .. i
>         s:SetName(name)
>         s:Save()
>     end
> end
> ---------------------------------------------
>
> Best regards
>
> Chris
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20160511/1c0055c1/attachment.htm>


More information about the JWLua mailing list