Finale Forum Store | Buy Sheet Music

navigating bookmarks

General notation questions, including advanced notation, formatting, etc., go here.

Moderators: miker, Peter Thomsen

navigating bookmarks

Postby mmike » Wed Dec 26, 2018 8:14 am

When working on large scores I always miss having the possibility of a modeless bookmarks/menu window to navigate quickly between different areas of a score.

I started a thread on the (old) forum about this a long time ago, without results. I had originally also corresponded with Jari Williams if he could perhaps create such a plug-in, but it never happened.

It should really be part of Finale's own bookmarks feature, which, in general, is actually quite good and flexible, but this would be a great improvement.

I think it would be very useful for many users, if it were available. One frequent forum participant/moderator/expert (Peter Thomsen) said this: "I could not agree more. I would love to have the option of pulling off the sub-menu Bookmarks as a palette with clickable bookmarks."

Is there anyone else who might be able to write some sort of script or plug-in? I am also submitting it to Finale as feature request, but don't really expect too much action there.
Finale 3.7 - 2014.5, GPO5, Cubase, ASUS laptop, Intel Core i5, 8GB RAM, WIN 8.1 (64-bit), 18.4'' display
mmike
 
Posts: 108
Joined: Sat Feb 22, 2014 5:28 pm
Location: Europe
Finale Version: 2014.5
Operating System: Windows

Re: navigating bookmarks

by Sponsor

Forum Sponsor
 

Re: navigating bookmarks

Postby N Grossingink » Wed Dec 26, 2018 10:37 am

Jari has developed a plugin called JW Navigate. Are you aware of this?
https://www.finaletips.nu/index.php/download/category/9-plug-ins-for-windows

N.
Mac Mini 2014 2.6 Ghz, 8Gb RAM
OSX 10.12.6
Finale 2012c & 25.5

“Play the first movement so that flies drop dead in mid-air and the audience leaves the hall out of sheer boredom.”
Dimitri Shostakovich on his 15th Quartet
User avatar
N Grossingink
 
Posts: 1038
Joined: Mon Dec 19, 2016 2:50 pm
Location: Milwaukee, WI USA
Finale Version: 2012, 25.3
Operating System: Mac

Re: navigating bookmarks

Postby mmike » Wed Dec 26, 2018 10:44 am

Yes, but it can't do what I want, such as provide a clickable menu of the bookmarks one has created. Besides, it doesn't navigate to any bookmarks, just text, among other things. As a matter of fact, the text search feature, which I have used occasionally, often crashes (at least, my) Finale for some reason, so I've stopped using it.
Finale 3.7 - 2014.5, GPO5, Cubase, ASUS laptop, Intel Core i5, 8GB RAM, WIN 8.1 (64-bit), 18.4'' display
mmike
 
Posts: 108
Joined: Sat Feb 22, 2014 5:28 pm
Location: Europe
Finale Version: 2014.5
Operating System: Windows

Re: navigating bookmarks

Postby HaraldS » Fri Dec 28, 2018 10:45 pm

Hello Mike,

mmike wrote:Is there anyone else who might be able to write some sort of script or plug-in?


I thought this would be possible with a Autohotkey script. Getting information from menus (like the bookmarks menu) requires some fiddling around, but the one below should work. Autohotkey has to be installed, Finale with some bookmarks needs to be up and running, then the script can be launched.

I tested it using Windows 7 with Finale 25. It uses one function which Microsoft calls superseded ("GetMenuString"), but just try it.

Harald


Code: Select all
; ==================================================================
; HSFinaleNav: Autohotkey script to make Finale's bookmarks
; selectable via button clicks in an always-on-top window.
;
; Autohotkey from https://www.autohotkey.com/ must be installed!
;
; First, create you bookmarks ("Positionsmarken" in the German version)
; then launch the script. A modal window will pop up to show all
; bookmarks as buttons. Clicking one will select that bookmark within
; Finale. If you create or delete bookmarks, re-launch the script.
;
; Finale always sorts its bookmarks, the script shows the same order.
; Version 1.0 on 28.12.2018 by Harald Schollmeyer, hschollm@gmx.net
; ==================================================================

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force

; -----------------------------------------
; Set up and initalize new GUI Window
; -----------------------------------------

; the new GUI window should always be topmost:
Gui, +AlwaysOnTop

; get access to the Finale window
hWnd := WinExist("ahk_class Finale")

; and to its menu
hMenu := DllCall("GetMenu", "UInt", hWnd)

; The bookmark menu is assumed to be in the 4th top-level-menu
; ("View" menu) as 7th submenu ("Bookmarks"), counting 0-based.
; If MakeMusic one day changes this location, these values have to be adapted!

; get access to the view menu and the bookmarks submenu:
ViewMenu := DllCall("GetSubMenu", "UInt", hMenu, "Int", 4)
BookmarksMenu := DllCall("GetSubMenu", "UInt", ViewMenu, "Int", 6)

; to get the NumberOfBookmarks, get the "Bookmarks" menu item count minus the
; two leading function items and the one delimiter line, thus making -3 items
NumberOfBookmarks := DllCall("GetMenuItemCount", "UInt", BookmarksMenu) - 3

; set up a GUI button for each bookmark in a loop
Loop %NumberOfBookmarks%
{
   ; initalize huge variable for the bookmark's name
   VarSetCapacity(BookmarkName, 1024, 0)
   DllCall("User32.dll\GetMenuString", "Ptr", BookmarksMenu, "UInt", A_Index - 1 + 3
   , "Str", BookmarkName, "Int", 512 , "UInt", 0x0400, "Int")

   ; create a new button with the bookmark's names, but all share one common event handler
   Gui, Add, Button, w200 h30 gButtonHandler, %BookmarkName%
}

; when all buttons are created, show the GUI and auto-resize it
Gui,Show, x40 y 40 Autosize, HSFinaleNav

return


; -----------------------------------------
; the one event handler for all buttons:
; -----------------------------------------
ButtonHandler:

   ; which button was clicked? The one which has focus:
   GuiControlGet, b, Focus

   ; extract its number from its auto-created name "Button1","Button2"...
   StringRight, c, b, StrLen(b)-StrLen("Button")

   ; calculate the menu item to be clicked: menu starts with two functions,
   ; then a delimiter line, making a +3 necessary
   clicks := c + 3

   ; execute the click in the same 4th menu, 6th submenu as above, but now 1-based
   WinMenuSelectItem, ahk_class Finale,, 5&, 7&, %clicks%&
   
   ; return the focus to Finale:
   WinActivate, ahk_class Finale

return
Attachments
HSFinaleNav.zip
(1.56 KiB) Downloaded 11 times
Finale 3.0-25.5, german edition, Windows 7
mostly hardware synths/keys, Cubase 7 / trombonist, pianist, conductor / Recklinghausen, Germany
User avatar
HaraldS
 
Posts: 88
Joined: Mon Dec 19, 2016 11:46 am
Location: Recklinghausen, Germany
Finale Version: 25.5
Operating System: Windows

Re: navigating bookmarks

Postby mmike » Sat Dec 29, 2018 9:06 am

Hello Harald,

Perfect! Thanks! That's exactly what I was looking for.
However ..... a few clarifications needed (probably mostly due to my ignorance of scripting)
I installed the Autohotkey utility and downloaded your script (which now resides in my Downloads directory)
Where should the script be? (ideally I'd like to have it in the Finale Plug-ins directory, just for the logic of it. Does that matter?)

To try it out - and it worked - I did this: open Finale and a file, then double click on the .ahk file in the Downloads directory. Voila! the modal Bookmarks menu appears and works just fine.
But how do I invoke the script with a "hot" key for it? How/where do I assign that? Would like to have it on F12.

Another "however" ..... when I open a new window (same file) and tile the two windows to work on and see different areas of a long score (something I use very often), then the modal bookmarks menu doesn't work anymore in neither window (it does still work in each window with the conventional method of View>Boomarks>choose one). Any possibility of adjusting this? Would be helpful.

Another observation - if you have too many bookmarks, that is, more than will make the menu fit in your particular screen size, one can't scroll to the bottom - not a problem that would occur too often, though. I have 27 bookmarks in one file and that just fits into my window.
Finale 3.7 - 2014.5, GPO5, Cubase, ASUS laptop, Intel Core i5, 8GB RAM, WIN 8.1 (64-bit), 18.4'' display
mmike
 
Posts: 108
Joined: Sat Feb 22, 2014 5:28 pm
Location: Europe
Finale Version: 2014.5
Operating System: Windows

Re: navigating bookmarks

Postby motet » Sat Dec 29, 2018 5:17 pm

Ideally the script should be such that you can load it at boot time and forget about it, and it doesn't interfere with other programs ("#IfWinActive Finale").
User avatar
motet
 
Posts: 2922
Joined: Tue Dec 06, 2016 8:33 pm
Location: Northern California
Finale Version: 2014.5,2011,2005
Operating System: Windows

Re: navigating bookmarks

Postby HaraldS » Sun Dec 30, 2018 3:45 am

mmike wrote:Where should the script be? (ideally I'd like to have it in the Finale Plug-ins directory, just for the logic of it. Does that matter?)

Maybe it works, but I wouldn't recommend that. As Finale scans its Plug-In-directory on startup, I'd suggest to put in there nothing else than real plug-ins. You might set up a unique folder for Finale-related Autohotkey scripts. I created one on my desktop, because I do frequent changes and want easy access.

mmike wrote:But how do I invoke the script with a "hot" key for it? How/where do I assign that? Would like to have it on F12.

That's quite easy, a "F12::" hotkey would have to be defined. The script would need to be launched on startup, but just sits in the background until it is activated by tapping F12.

mmike wrote:Another "however" ..... when I open a new window (same file) and tile the two windows to work on and see different areas of a long score (something I use very often), then the modal bookmarks menu doesn't work anymore in neither window (it does still work in each window with the conventional method of View>Boomarks>choose one). Any possibility of adjusting this? Would be helpful.

Now there's something strange happening when multiple windows are open. This scenario indeed prevents my script of working correctly. The DLL calls to access Finale's menu obviously don't return usable results. I have no idea why. Finale is multiple-document-interface window, but the DLL calls only succeed if only one document is maximized, which is strange.

What is your preferred result: should the document in all windows advance simultaneously when clicking a bookmark button? Or should it affect only the active window?

I plan to do a version 2 without any DLL calls, the F12 hotkey and including motet's suggestion. The information from the Edit Bookmarks window will be used for making the buttons and the bookmarks are invoked by sending keystrokes. The downside will be that the script will be language-dependent, because the English and German versions use different keystrokes for menu access.

mmike wrote:Another observation - if you have too many bookmarks, that is, more than will make the menu fit in your particular screen size, one can't scroll to the bottom - not a problem that would occur too often, though. I have 27 bookmarks in one file and that just fits into my window.

I'll also make changes to the button size to allow a larger number of buttons to be displayed.
Finale 3.0-25.5, german edition, Windows 7
mostly hardware synths/keys, Cubase 7 / trombonist, pianist, conductor / Recklinghausen, Germany
User avatar
HaraldS
 
Posts: 88
Joined: Mon Dec 19, 2016 11:46 am
Location: Recklinghausen, Germany
Finale Version: 25.5
Operating System: Windows

Re: navigating bookmarks

Postby mmike » Sun Dec 30, 2018 9:31 am

HaraldS wrote:folder for ... Autohotkey scripts
Where should the .ahk script ideally be (so that Authotkey can find it)? Now I have it just (still) in the Downloads folder, which seems to be fine, but I'd like to put it somewhere else because I often empty that folder and don't want to inadvertantly delete the script.
HaraldS wrote:What is your preferred result: should the document in all windows advance simultaneously when clicking a bookmark button? Or should it affect only the active window?
Definitely only the active window! That's the reason for this particular workflow, so that I can search different areas in one window to compare/edit in the othe one.
HaraldS wrote:make changes to the button size to allow a larger number of buttons to be displayed
Great!
HaraldS wrote:I plan to do a version 2 without any DLL calls, the F12 hotkey and including motet's suggestion.
Don't quite undestand this ... does this mean it's ever-present, would it affect other programs (actually, I suppose not, according to motet's suggestion)? Slow down starting up the computer? I would use the F12 key then from Finale to start the script?
HaraldS wrote:English and German versions use different keystrokes
I (as well as probably most others in general) am using the English version.
Finale 3.7 - 2014.5, GPO5, Cubase, ASUS laptop, Intel Core i5, 8GB RAM, WIN 8.1 (64-bit), 18.4'' display
mmike
 
Posts: 108
Joined: Sat Feb 22, 2014 5:28 pm
Location: Europe
Finale Version: 2014.5
Operating System: Windows

Re: navigating bookmarks

Postby HaraldS » Tue Jan 01, 2019 9:14 pm

Happy new year!

mmike wrote:Where should the .ahk script ideally be (so that Authotkey can find it)? Now I have it just (still) in the Downloads folder, which seems to be fine, but I'd like to put it somewhere else because I often empty that folder and don't want to inadvertantly delete the script.

There's no place where AHK scripts should ideally be or must reside. Their extension ".ahk" links them to Autohotkey, regardless where they are stored. I recommend an own folder for them, e.g. located on the desktop. There are some internal folders in Windows which get scanned occasionally, like the Windows system folders or if you start Finale, the Finale plug-in folder - I wouldn't recommend storing scripts in these existing folders, you better create a new one.

mmike wrote:
HaraldS wrote:I plan to do a version 2 without any DLL calls, the F12 hotkey and including motet's suggestion.
Don't quite undestand this ...

Right, I was not clear about that: I wanted to include the F12 launch key as well as motet's suggestion, not omit them. Sorry for that.

mmike wrote:
HaraldS wrote:English and German versions use different keystrokes
I (as well as probably most others in general) am using the English version.

Yes, I know 8) , but I don't. Luckily, it turned out than other than I expected, no language-dependent functions were necessary.

I found the error, I missed checking for changes in the menu structure. They occur when a document gets maximized or if multiple document windows are open. The script now checks for that. And it includes the F12 key as well as reformatting the buttons if the script's window size changes.

Version 2 is below in a ZIP file. After being started, it waits for Finale to be active and the F12 key to be pressed. If you find any misbehaving, let me know.
Attachments
HSFinaleNav2.zip
(2.08 KiB) Downloaded 9 times
Finale 3.0-25.5, german edition, Windows 7
mostly hardware synths/keys, Cubase 7 / trombonist, pianist, conductor / Recklinghausen, Germany
User avatar
HaraldS
 
Posts: 88
Joined: Mon Dec 19, 2016 11:46 am
Location: Recklinghausen, Germany
Finale Version: 25.5
Operating System: Windows

Re: navigating bookmarks

Postby mmike » Tue Jan 01, 2019 10:46 pm

First of all, thanks again. Works well.
And some (now more or less "nitpicking") questions/suggestions (sorry) ....

HaraldS wrote:I wanted to include the F12 launch key as well as motet's suggestion
Maybe I misunderstood - wasn't motet's suggestion that the script was to be launched automatically on (computer)startup? So that it was already waiting to be started up with the F12 key once Finale was running? Because that it doesn't - I still have to first launch the script from the desktop. Or could it be written (maybe even better?) so that the F12 key launches the script and brings up the menu?

HaraldS wrote:reformatting the buttons if the script's window size changes
That is cosmetically still a little problematic. Could perhaps be improved? Specifically - if you have a long text for a bookmark, e.g. something like "Bookmark 12 letter H bar 152," then in the first layout of the menu that appears, the bookmarks can't be seen in their entirety, also not when dragging the menu window to enlarge horizontally (each line stays the same width, but gets larger in height. Only when I adjust the menu window to show only single rows by draggin the menu window vertically down and also to the left, can, at some point, the full bookmark be seen (and it would perhaps esthetically be better and easier to read to have them left-aligned, rather than centered).

Well, like I said - it works without any problems, just "nitpicking" ...

Happy New Year to you too, great work!

P.S.: One more thing .... your original script had a minimizing minus sign in the upper right hand corner of the menu, which was a good feature because if one didn't always want the menu on top, it could be minimized instead of exited, and when you brought it back up it was still/again in the same position and configuration. It would be great if the new version could also have that feature again.
Finale 3.7 - 2014.5, GPO5, Cubase, ASUS laptop, Intel Core i5, 8GB RAM, WIN 8.1 (64-bit), 18.4'' display
mmike
 
Posts: 108
Joined: Sat Feb 22, 2014 5:28 pm
Location: Europe
Finale Version: 2014.5
Operating System: Windows

Re: navigating bookmarks

Postby mmike » Wed Mar 13, 2019 1:34 pm

Just wanted to add that I use this script every day and find it extremely useful (and it should really be a permanent part of Finale. I have proposed it to MM as a feature request, but who knows ...).
Working with it a lot I do keep wishing for one particular improvement: I don't necessarily always want it on the screen, so I remove it with the little x on the top right. When I put it back, using the F12 key again, it reverts to its original position (rectangular/upper left), which I then have to adjust again to where/how I want it (usually in a horizontal stretch and putting it on top of the screen).
Would anyone be interested/willing/able to update this script so that it would remember the last size/shape/position? (and also adding a "-" minimizing feature on the top right to hide it). That would (I think) make it even better.
Finale 3.7 - 2014.5, GPO5, Cubase, ASUS laptop, Intel Core i5, 8GB RAM, WIN 8.1 (64-bit), 18.4'' display
mmike
 
Posts: 108
Joined: Sat Feb 22, 2014 5:28 pm
Location: Europe
Finale Version: 2014.5
Operating System: Windows


Return to General Finale Help

Who is online

Users browsing this forum: Google Adsense [Bot], Michel R E and 5 guests


Music Engravers and Music Copyists
   Finale - Sibelius - Cakewalk - Archives - Finale Books - Contact


Copyright © 1994 - 2019 by C.M. Press, LLC