[JW Lua] UI:MoveToMeasure doesn't advance the score

Jan Angermüller jan at angermueller.com
Tue Sep 22 15:47:01 CEST 2015


I noticed that it works fully in part scroll view (on Windows).
But in score scroll view it only advances if it is a measure that is 
currently not visible.
Here is a tiny workaround: first jump back to the (probably invisible) 
measure 1, then jump to the next measure.
That works fine for all measure, except the very first ones where it 
will always jump to measure 1.

local ui = finenv.UI()
local currentmeasure=ui.CurrentMeasure
ui:MoveToMeasure(1,0)
ui:MoveToMeasure(currentmeasure+1,0)

But why do you need that in a script ?
Isn't it easier to use macros (arrow keys ?) or something like 
shift+mouse wheel to jump to the next measure ?

Jan

Am 22.09.2015 um 15:20 schrieb Harald Schollmeyer:
> Hello to all,
>
> I recently discovered JW Lua and find it an amazing tool.
> I used to write C and C++ code for music/notation purposes, but as
> a full-time musican and music instructor, my time resources are limited.
> So a simple script language comes in very handy - thanks, Jari.
>
> I stumbled across the fact, that UI:MoveToMeasure obviously
> doesn't advance a score. Rewinding works. Scroll view, of course.
> Can anyone confirm that behaviour?:
>
> local ui = finenv.UI()
> -- works:
> ui:MoveToMeasure(ui.CurrentMeasure-1,0)
>
> -- works not:
> ui:MoveToMeasure(ui.CurrentMeasure+1,0)
>
>
> Thanks,
>
> Harald
>
>
>
>





More information about the JWLua mailing list