[JW Lua] Slur segment does not return measure pos

Jan Angermüller jan at angermueller.com
Tue Jul 15 23:26:02 CEST 2014


ah ok, yes, reading from the corresponding note entry was already my 
workaround.
Thanks for the quick response !

BTW, I get a strange keyboard behaviour with JW Lua under the following 
conditions (Win7/Fin2014):
I am in SmartShape mode and have a slur selected.
Then I set focus to the JW Lua dialog (which is open all the time)
with a mouse click and enter the letter "f" in the JW Lua editor text field.
Although JW Lua is the top window now (Finale is in backgrond),
the letter f does not appear in the text field, but flips the selected slur.
I don't know if this happens with every Finale. Actually I had
never flipped a slur before with the letter "f" so it can't be a
macro or shortcut that I edited manually.
And it's the only letter that leads to strange behaviour.
Any idea what this comes from ?

Jan




Am 15.07.2014 23:10, schrieb Jari Williamsson:
> Jan,
>
> You only get the MeasurePos if the smart shape is measure-attached. If 
> the shape is entry-attached, you need to get the entry number and then 
> load+map to the entry, where you can get the entry's MeasurePos.
>
>
> Best regards,
>
> Jari Williamsson
>
>
> On 2014-07-15 22:04, Jan Angermüller wrote:
>> Jari,
>>
>> if I create an FCSmartShapeSegment from an FCSmartShape that is a slur
>> (IsSlur() == true),
>> then MeasurePos from FCSmartShapeSegment returns a strange result which
>> is not
>> the MeasurePos.
>> It seems to me like an entry or identification number is returned 
>> instead.
>> The difference between the left and the right measure pos is usually the
>> number of note entries below the slur.
>>
>> Try this script on a selected measure with a slur:
>>
>> local marks = finale.FCSmartShapeMeasureMarks()
>> marks:LoadAllForRegion( finenv.Region(), true)
>> for mark in each(marks) do
>>      local smartshape = mark:CreateSmartShape()
>>      if (smartshape ~= nil) then
>>            local leftseg = smartshape:GetTerminateSegmentLeft()
>>            local rightseg = smartshape:GetTerminateSegmentRight()
>>            print("Left MeasurePos",leftseg.MeasurePos)
>>            print("Right MeasurePos",rightseg.MeasurePos)
>>     end
>> end
>>
>> It should return for example 0 and 4096 in a 4/4 measure with
>> one big slur over all notes, but it returns something like 24123 and 
>> 24126.
>>
>> For smartshape hairpins the left/right measure pos are ok.
>> It's only the slurs that have this problem.
>>
>> Jan
>>
>> _______________________________________________
>> JWLua mailing list
>> JWLua at jwmusic.nu
>> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>>
>>
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>





More information about the JWLua mailing list