This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
jwlua:quickscripts [2014/09/23 20:06] jariw [Align Repeat Brackets] |
jwlua:quickscripts [2015/07/13 18:02] jariw [Align Repeat Brackets] |
||
---|---|---|---|
Line 770: | Line 770: | ||
The following script example aligns the top lines of the repeat brackets within the selected region to the topmost position. It does not look at staves with independently moved bracket positioning. | The following script example aligns the top lines of the repeat brackets within the selected region to the topmost position. It does not look at staves with independently moved bracket positioning. | ||
- | All ending repeat brackets and backward repeat brackets are first scanned for the highest position. The initial "highest position" is set to a extremely low value, to make sure that a true top position is found. After that, all the brackets are set to that position. | + | All ending repeat brackets and backward repeat brackets are first scanned for the highest vertical position. The initial "highest position" is set to a extremely low value, to make sure that a true top position is found. After that, all the brackets are set to the highest vertical position found. |
The script requires beta 0.29 or higher. | The script requires beta 0.29 or higher. | ||
Line 812: | Line 812: | ||
end | end | ||
end</code> | end</code> | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Swap Metatool Key Assignment ==== | ||
+ | |||
+ | <code lua swapmetatools.lua>-- Load all existing metatool assignments for the Expression Tool | ||
+ | local mas = finale.FCMetatoolAssignments() | ||
+ | mas:LoadAllForMode(finale.MTOOLMODE_EXPRESSION) | ||
+ | -- Find the current expression metatools for keyboard keys '1' and '2' | ||
+ | metatool1 = mas:FindKeystroke(string.byte("1")) | ||
+ | metatool2 = mas:FindKeystroke(string.byte("2")) | ||
+ | -- Swap the keyboard mapping for these 2 objects | ||
+ | if (metatool1 ~= nil) then | ||
+ | metatool1:SaveAsKeystroke(string.byte("2")) | ||
+ | end | ||
+ | if (metatool2 ~= nil) then | ||
+ | metatool2:SaveAsKeystroke(string.byte("1")) | ||
+ | end</code> | ||
+ | |||
---- | ---- |