[JW Lua] Blue Sky Thinking
Dave Foster
fozder at me.com
Fri Nov 1 11:09:58 CET 2013
Hi Jari & all,
Thanks for your advice regarding replicating Finale's "Import Dictionary" with a Lua script. I've stared putting one together, and have got as far as I can get with the 4 available preferences classes:
FCDistancePrefs
FCSizePrefs
FCMultiMeasureRestPrefs
FCFontPrefs
I'm sure that it's already on your to do list but, if not, could you hook up the remaining 13 classes (when you return to such things) so that we can complete the set?! (13 more classes from the docs listed here to whet the appetite of what developers can potentially access!)
FCGeneralPrefs
FCHumanPlaybackPrefs
FCLayerPrefs
FCMiscDocPrefs
FCMusicCharPrefs
FCMusicSpacingPrefs
FCPageFormatPrefs
FCPartScopePrefs
FCSlurContourPrefs
FCSmartShapePrefs
FCStemConnectionTable
FCTiePrefs
FCTupletPrefs
A tip for anyone dabbling in this stuff is that (apologies if this is documented elsewhere) that the "Efix16" values are EVPUs x 64, so 768 in Efix16 (eg when using SetBeamThickness()) comes out as 48 EVPUs in the preferences window.
Another thing - when entering my own preferences into the script, I noticed that it doesn't accept negative numbers: for example,
local multiPrefs = finale.FCMultiMeasureRestPrefs()
multiPrefs.NumberVerticalAdjust = -17
print(multiPrefs:Save(0))
sets the Document Options / Multimeasure Rests / Number Adjustment / Vertical to 17.
Finally, a tiny minor bug - in FCFontPrefs, the enum FONTPREF_CHORDFRETBOARD (= 17) doesn't work (the rest do).
All the best,
Dave
On 2013-10-24 16:10, Jari Williamsson wrote:
> I guess you could create your own library format by using the Lua file
> features.
A more "Lua"-like approach would be to (instead of a data file format)
write to a Lua script file that can create the necessary library features.
The created Lua file could contain any kind of logic specific to
recreating the elements (such as only creating items if they don't
exist). And such a script could be included as a subscript to a group
script.
Best regards,
Jari Williamsson
More information about the JWLua
mailing list