[JW Lua] FCString:CreateEnigmaComponents does not separate ... more info

Jan Angermüller jan at angermueller.com
Wed Mar 25 17:50:45 CET 2015


Jari,

I just noticed, it's not only font changes, but any Enigma tag that 
appears after a text part that is missed as a new string:

text.LuaString="^fontTxt(Times New Roman,0)^size(1)^nfx(2)abc 
^composer() def"
-> composer is detected, but not put as a separate string

text.LuaString="^fontTxt(Times New Roman,0)^size(1)^nfx(2)abc 
^size(36)^arranger() def"
-> size is detected, but not put as a separate string
-> arranger is detected correctly

text.LuaString="^fontTxt(Times New Roman,0)^size(1)^nfx(2)abc ^size(36) 
def ^arranger() ghi"
-> size is detected, but not put as a separate string
-> arranger is not detected correctly, probably because there is another 
text part in between

text.LuaString="^fontTxt(Times New Roman,0)^size(1)^nfx(2)abc ^size(36) 
def ^size(48) ghi"
-> both sizes are detected, but not put as separate strings (same as 
before with size/arranger)

Jan


Am 25.03.2015 um 17:16 schrieb Jan Angermüller:
> Jari,
>
> FCString:CreateEnigmaComponents does not split font changes within a 
> string correctly (for example "sub. p").
> See script and output below.
>
> All the best,
> Jan
>
>
> local text=finale.FCString()
> text.LuaString="^fontTxt(Times New Roman,4096)^size(12)^nfx(2)sub. 
> ^fontMus(Font0,0)^size(24)^nfx(0)p"
> local splittext=text:CreateEnigmaComponents()
> for i in each(splittext) do
>     print(i.LuaString)
> end
>
>
> Output:
>
> Running [Unnamed Script] ======>
> fontTxt
> Times New Roman
> 4096
> ^size
> 12
> ^nfx
> 2
> sub. ^fontMus *-- new font tag *detected, but not split correctly to a 
> new string
> Font0
> 0
> ^size
> 24
> ^nfx
> 0
> p
> <======= [Unnamed Script] succeeded (Processing time: 0.000 s).
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu


-- 
Jan Angermüller
Jevenstedter Str. 80
22547 Hamburg
Tel. 040 - 28 94 84 82
www.angermueller.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20150325/949054b6/attachment-0002.html>


More information about the JWLua mailing list