[JW Lua] Hello World
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Mon Oct 14 20:52:03 CEST 2013
On 2013-10-14 18:15, Dave Foster wrote:
> 1) Access and edit the FCFontInfo property of the FCString object accessed using the CreateTextString() method of FCPageText: I can edit the FCFontInfo properties, but can't find a way to update them in the FCString. This is as far as I can get:
> [...]
> but it doesn't update the size. Am I missing a method in FCString which updates the FCFontInfo? I can edit the text itself:
The MakeEnigmaString() method would create an Enigma string based on the
font info. However, for some reason, I haven't added Lua-support for it
(I probably wanted to turn it into a CreateEnigmaString method, which
would make more sense in Lua).
I'll add a solution for the next update.
> 2) Edit the Enigma components directly from the FCString object - unfortunately trying to call CreateEnigmaStrings() crashes Finale (2012) - this is the code that does it for me:
>
> local pageTexts = finale.FCPageTexts()
> pageTexts:LoadAll()
> for pageText in each(pageTexts) do
> local thisText = pageText:CreateTextString()
> local enigmaStrings = thisText:CreateEnigmaStrings(false)
> end
I now see that I have not included Lua support for the FCStrings
collection, so that might be what's causing the crash. You need the
FCStrings support to be able to do anything with the
CreateEnigmaStrings() result.
Btw, I think you should send "true" to CreateEnigmaStrings() and then
loop the created collection. But I need to add the FCStrings
functionality first...
> Secondly, I'd love to be able to access and edit the properties
> of measure number regions - specifically font and position of
> measure numbers (can't tell you how much time I spend editing
> them) but notice that the FCMeasureNumberRegion isn't
> accessible to JWLua - any plans to add that functionality?
Sure, I'll add it right away. Just let me know what you need for your
own projects and I'll try to add Lua support for it as soon as I can.
Otherwise, I'll add Lua support when I need the stuff for my projects. ;-)
Best regards,
Jari Williamsson
More information about the JWLua
mailing list