Automating Finale for Windows

A frequent question for Windows users of Finale is if there is any equivalent to Keyboard Maestro, the popular macro utility for MacOS. Unfortunately the answer is no: There is no solution for Windows that is both powerful and easy to use.

The available solutions – AutoIT and AutoHotkey – are still powerful, but nobody would ever really call them easy to use (especially not in comparison to Keyboard Maestro).

With that said, I’m going to give a brief tutorial on how to begin using AutoHotkey to control Finale, at least to do simple tasks like call up menu items. I may tackle more complex automation in the future.

AutoHotkey is actually an offshoot of AutoIT, and as its name suggests it is particularly well suited to the task of creating hotkeys. You can create scripts using any simple text editor, such as the excellent Notepad++. I’m going to start my macro file off with a series of parameters I’ve cobbled together through internet searches. Most of these parameters aren’t super important to what we’re about to do and in fact could be left off, but it’s easy enough to add them in:

#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
SetTitleMatchMode 1
DetectHiddenWindows On
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1

Some of the more useful lines in here are:

  • “SetTitleMatchMode 1” – this tells AutoHotkey to only loosely match the name of the active Window, which is important because the name of the window will change with each document, but will always start with “Finale”. For this reason, we don’t want it trying to find an exact Window name.
  • “#SingleInstance Force” – This tells AutoHotkey you want only one instance of the script to run at once – useful during setting up your macro file.

Following this preamble, add this line of code to tell AutoHotkey to only apply the hotkeys when Finale is active:

#IfWinActive Finale ahk_class Finale

Now we can start adding hotkeys. A hotkey is defined by first declaring the Hotkey followed by two colons. The modifier keys each have special characters:

  • Ctrl is ^
  • Shift is +
  • Alt is !
  • Win is #

I’m going to set up F4 to access the Speedy Entry Tool. I start with this:

F4::

Note that if I had wanted, say Ctrl+Shift+F4 I would have used ^+F4::

Next I add the code to execute. This could be as simple as sending alternative key strokes… In fact, for years I used the following as my execute code:

Send, !ts

Meaning “send Alt+t” (which calls up the Tools menu) “then still hold Alt send s” (which activates Speedy Entry). How did I know what letters to use? In Windows menus, items are keyboard accessible by hitting Alt and the underlined character in the menu item.

I’ve never really had issues with using this method, but there is another way, which is to use the WinMenuSelectItem command, like this:

WinMenuSelectItem, , , Tools, Speedy Entry

Let’s pull this apart. The first element is the command itself, WinMenuSelectItem, which tells AutoHotkey to activate a menu item. This is followed by two parameters WinTitle and WinText that I have chosen to leave blank (parameters in AutoHotkey are seperated by commas), as in my experience their usage seems a little finicky. This is followed by the name of the menu to access, followed by the menu item itself. If there were any submenus involved, they would also get listed. As an example, if I wanted to access the ‘View/Show/Hidden Notes and Rests’ command I would use:

WinMenuSelectItem, , , View, Show, Hidden Notes and Rests

I should point out that I try to be very accurate with capitalization here, though AutoHotkey actually doesn’t really care. AutoIT does, however, and since I have also used that for some Finale automation in the past I’ve gotten into the habit.

Finally, end each hotkey macro with Return. If you are going to be doing multiple hotkeys in the same file you might find it handy to write notes to yourself using comments, which start with double semi-colons ;;. There is no limit to the number of different hotkeys you can add to a single file, though trying to assign the same hotkeys to different macros will result in an error.

Save your file with the suffix .ahk. You can either run the script file directly, or convert it to a standalone executable file (.exe). I ensure my macros are always available to me by also dropping a shortcut to my script in my StartUp folder.

Here is the entire file:

#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
SetTitleMatchMode 1
DetectHiddenWindows On
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1

#IfWinActive Finale ahk_class Finale

;;SPEEDY ENTRY
F4::
WinMenuSelectItem, Finale, Finale, Tools, Speedy Entry
Return

I hope this helps some poor Windows users out there. I really, really wish there was a solution as easy to use as Keyboard Maestro on Mac, but with a little effort AutoHotkey really does offer a similar level of power.

-Jacob Winkler

Learning to Code in JW Lua | Part 1: Introduction to Lua

JW Lua is quickly becoming a popular plug-in for Finale because of it’s unbelievable potential for improving your Finale workflow. It’s over 300 times faster than FinaleScript, more flexible than your macro program of choice, and connects directly to Finale’s codebase. Which means it can save you lots of time while achieving better results, regardless of what “better” means to you.

There’s just one problem:

Because it’s written in a language not known by all programmers, and is a highly customized version of that language, it can appear daunting to learn how to code with it. It can seem even harder if you’ve never coded before.

So today we’re going to start a series of how to code with JW Lua, even if you’ve never coded before. We’re going to walk through, step-by-step, every aspect of JW Lua that you need to code in JW Lua. more >> “Learning to Code in JW Lua | Part 1: Introduction to Lua”

A Fast Way to Change Music Spacing Reference Width in Finale (With Keyboard Maestro)

One of the quirks with Finale’s note spacing  is that the very last system of a document will often have disproportionately fewer measures than the rest.

One option is to use the Fit Measures tool in the Utilities menu, but then the note spacing can be inconsistent between systems.

Finale’s Reference Spacing Width feature, found in the Music Spacing > Spacing Widths… section of Document Options, provides a solution. The setting allows you to reflow and rebalance the note spacing of  measures quickly. more >> “A Fast Way to Change Music Spacing Reference Width in Finale (With Keyboard Maestro)”

Behind-the-Scenes: The Music Font Comparison from Elbsound.studio

What is it ?

Music Font Comparison is an online A/B comparison of 150 music font families rendered using four musical examples. The font examples were created in a fully automatic font conversion process in Finale with a JW Lua plugin from a master document in Maestro font. No manual adjustments were made afterwards.

score-excerpt
Online Music Font Comparison from Elbsound.studio : The images on the website are downscaled JPEG versions of the PDFs created from within Finale.

more >> “Behind-the-Scenes: The Music Font Comparison from Elbsound.studio”