[JW Lua] Copy/Paste With FCMusicRegion()

Martin Marris mmarris at notecraft.com
Mon Dec 14 20:16:59 CET 2020


I am trying to create a Region programmatically (rather than through user
interaction).

 

Then, copy/paste between regions.

 

But if I run the following simple script:

 

local musicregion = finale.FCMusicRegion()

musicregion.StartMeasure = 1

musicregion.EndMeasure = 2

musicregion:CopyMusic()

musicregion.StartMeasure = 3

musicregion.EndMeasure = 4

musicregion:PasteMusic()

musicregion:ReleaseMusic()

 

I get this result:

 

Message box: Title "Finale" and text "Cannot read library
c:\users\myusername\AppDate\LocalLow\Fin33B.tmp".

 

Why?

 

Martin

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20201214/16f068a9/attachment.htm>


More information about the JWLua mailing list