[JW Lua] A little help getting off the ground

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Tue Aug 27 17:14:24 CEST 2013


On 2013-08-27 16:41, Charles O. Lawrence wrote:
> I have been struggling getting going with JWLua.  I am trying to use
> FCNoteEntry to set the visibility of a note to false.  So far I have not
> met with any success.  Would you be so kind as to provide a sample
> script that simply loops through all the note entries in a selected
> measure and sets the visibility of each entry to false?

Follow the example in the Wiki for "eachentrysaved()".
http://jwmusic.nu/jwplugins/wiki/doku.php?id=jwlua:development#eachentrysaved

Replace the inner contents of the example loop with "e.Visible = false"

Feel free to ask anything regarding script development! (Development 
should become much easier once 0.03 is available.)

> A problem I see with Beta 0.02 is that whenever I run a script, the
> cursor becomes very sluggish and jerky until I close the JWLua window.
> Then everything goes back to normal response.  It seems that with the
> window left open after executing a script, that Finale is grabbing up an
> excessive amount of CPU time.  I see a similar behavior with FinaleScript.

That should NOT happen. I'm starting a timer to for buffering print 
output. Perhaps that timer isn't cleaned up correctly.

What operating system are you running?

> A wish list item.  I know that Lua supports connecting to SQLite
> databases through any of a number of extension packages that are
> available.  Will you consider adding this capability to JWLua in some
> future release?

You should be able to include any Lua package directly from the script, 
for example using "require". However, I haven't tested it yet and 
perhaps I need to set up some environment variables in JW Lua to get it 
to work well with user paths. To get JW Lua to work nicely with 3rd 
party Lua packages is a priority of mine.


Best regards,

Jari Williamsson





More information about the JWLua mailing list