[JW Lua] JWLua scripts

Charles O. Lawrence charlesolawrence at bellsouth.net
Mon Sep 16 21:22:53 CEST 2013


Attached are five JWLua scripts that actually are useful for doing something
with a Finale document.   There are other utilities or plug-ins available
that will do these tasks, but these have been exercises for me in learning
how to use JWLua.

 

The first is a script that will reset the vertical position of rests within
a selected region.  You must select at least one layer.  This is useful to
superimpose "floating" rests in different layers.

 

The next four are for swapping the contents of two selected regions.  The
1st is for the entire document.  The others utilize three different ways of
using only the selected region.

 

If you see ways that the code could be economized or otherwise improved,
please point them out.  My algorithms work, but may not be the best way to
do the task.

 

Thanks,

Charles Lawrence

 

PS:  I am the only one interested in JWLua?  No one else in the community to
my knowledge has posted any questions or samples.  I find that odd.  I
consider myself an experienced programmer with more than 35 years of
professional programming under my belt in all kinds of programming
languages, from old school (F77) to modern (C#).  Lua was new to me, and
thanks to some helpful words from Jari, I was able to get these scripts to
work like I wanted.  I appreciate what Jari is trying to do with JWLua.
Believe me, it is not as easy to get started as it may first appear.  The
learning curve is steep, and JWLua is nothing like FinaleScript.  I hope
this is not discouraging to anyone.  Let's see some stuff from some others
in the community!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20130916/f4e45b51/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ResetRests.lua
Type: application/octet-stream
Size: 2912 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20130916/f4e45b51/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SwapLayersDocument.lua
Type: application/octet-stream
Size: 2354 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20130916/f4e45b51/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SwapLayersRegion.lua
Type: application/octet-stream
Size: 3148 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20130916/f4e45b51/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SwapLayersRegion_A.lua
Type: application/octet-stream
Size: 2951 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20130916/f4e45b51/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SwapLayersRegion_B.lua
Type: application/octet-stream
Size: 3083 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20130916/f4e45b51/attachment-0004.obj>


More information about the JWLua mailing list