[JW Lua] Hello World

Charles O. Lawrence charlesolawrence at bellsouth.net
Mon Oct 14 23:35:18 CEST 2013


Hello Dave Foster (et al),

Welcome to the world of JWLua.  So far, there has been no one but me, that I
can recall, who has asked detailed questions and requested features or fixes
to JWLua.  You will find that Jari is very accommodating and quick to
respond.  I don't see how he does it.  Many of the updates to JWLua since
its first rollout to the current 0.07 have been implemented because of an
almost daily barrage of questions and requests from me.  Jari may think I
have dropped off the face of the earth, since I have not posted to the list
in probably almost two weeks now, but I simply have not had time to devote
to scripting lately.  I have been involved in a Finale engraving project
that has taken all my time, and I have had to learn a few things about
Finale I had never run up against before.  It is almost finished, so I will
have time to play with JWLua some more.  Beta 0.07 implements several
features and new "hooks" that I am looking forward to implementing in some
of my scripts and removing clunky workarounds.  You have requested a few
more.  Jari says that unless we request something, it won't get implemented
until he needs it in his script work.  That might take a long time.  Keep
the ideas coming.  I could use that measure number region functionality now.

Charles Lawrence




-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari Williamsson
Sent: Monday, October 14, 2013 2:52 PM
To: The JW Lua script plug-in.
Subject: Re: [JW Lua] Hello World

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


_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu





More information about the JWLua mailing list