Run Plugin On Folder of Scores

Version 02.60.01
Added 20 Nov 2015 (last updated 17 Apr 2021)

For use with Sibelius 6, Sibelius 7.1, Sibelius 7.5, Sibelius 8.x, Sibelius 18.x, Sibelius 19.x, Sibelius 20.x and Sibelius 21.x

This plugin allows one to run a plugin, chosen from an alphabetized list of plugins, against the current score, all open scores, or a folder of scores.

By default, it will not save any scores processed; if you wish to modify and save scores, especially when processing a folder of scores, you should choose Save scores after plugin is run. If a folder is processed, all previously unopened scores will be closed and optionally saved. Previously open files will be left open, and may be saved.

Most plugins, especially those that bring up a dialog every time, will not be well suited for being run in this manner. Some, such as Find and Replace Text, have an option to hide a dialog after the first time it is run, and these can make good use of this plugin. Scores opened in a folder will always be fully selected with a system passage selection when passed to the called plugin; previously opened scores can be made to be fully selected.

The plugin can be used by plugin developers to write a simple plugin, taking advantage of the framework this plugin provides to have it process a folder of scores.

Updated 17 December 2015. Added additional plugin Run Plugin on Score And Parts which lets you choose a plugin to be run on the full score and all the parts of the current score. This plugin is suitable for being run from Run Plugin On Folder Of Scores.

Updated 19 December 2015 to allow better interaction for the plugins. You can now turn off the progress bar in Run Plugin On Score and Parts so the progress bar in Run Plugin on Folder of Scores will be retained, among other tweaks.

Updated 19 March 2016. Updated Run Plugin On Score And Parts to process parts in same order as the Sib parts list, which is different from the order they are given to a plugin

Updated 16 December 2017. Updated Run Plugin On Score And Parts to include a Find Plugin edit and buttons. Also changed order of processing so the full score, if processed, is processed after the parts so that changes to the score do not affect the parts.

Updated March 13, 2018. Fixed problem in the Open Scores option where running a plugin that generated new scores would cause those scores to also be processed. Thanks to Dick Jackson for pointing this out.

Updated 29 November 2018. Version 02.20.00. Updated Run Plugin on Folder of Scores to have a Find Plugin button, making it easier to pick the desired plugin. No changes made to Run Plugin On Score and Parts.

Updated 22 January 2020. Version 02.50.00 for Run Plugin on Folder of Scores, and 02.10.00 for Run Plugin on Score and Parts. Added routine CloseQuietly, which is a substitute for the disfunctional Close-False command. This will close scores that the plugin opens without saving changes or asking you to save changes, which makes running a batch process much nicer.

For plugin developers: Run Plugin on Folder of Scores is in the public domain. Code can be reused or modified without need of attribution or permission. There is no support for any modified code, so its use is entirely at your own risk.

Updated 24 January 2020. Version 02.51.00 for Run Plugin on Folder of Scores, and 02.10.00 for Run Plugin on Score and Parts. Modified the CloseQuietly routines to attempt to prevent backup scores being written for scores processed in a folder. If the Backup Scores folder is in the default location with the English name, the plugin will remove unwanted backup scores, otherwise they can either be ignored or manually removed as needed.

Updated 1 February 2020. Version 02.52.00 for Run Plugin on Folder of Scores, and 02.10.00 for Run Plugin on Score and Parts. Cleaned up list box handling to prevent having to explicitly select a list box entry to choose a plugin. Now the first entry in the list is always selected when the dialog comes up, but after the first time run in a session the last plugin run will be at the top of the list, and you can just type Enter to run it again on a folder of scores.

Updated 10 February 2020. Version 02.54.00. Cleanup for cases where a called plugin might close the passed in score.

Updated 16 February 2020. Version 02.55.00 For Run Plugin on Folder of Scores, and 02.10.00 for Run Plugin on Score and Parts. Fixes for issues with saving scores.

Updated 9 July 2020. Version 02.56.00 for Run Plugin on Folder of Scores, and 02.10.00 for Run Plugin on Score and Parts. New simpler CloseQuietly routine implemented

Updated 9 July 2020. Version 02.60.00 for Run Plugin on Folder of Scores, and 02.10.00 for Run Plugin on Score and Parts. Changes were made only to Run Plugin on Folder of Scores.

CloseQuietly was again improved.You can now specify whether the full score or the current active part of a score should be passed to the called plugin, and whether scores that had been opened by Run Plugin On Folder of Scores should be closed by the plugin. The ability to save preferences (implemented by calling the plugin Add Plugin Preferences Lib) is now available if Add Plugin Preferences Lib is installed.There is also a Help dialog that explains some of the issues in more detail.

Updated 16 April 2021. Version 02.60.01. No code change, but changed the zip file to only contain Run Plugin On Folder of Scores, withRun Plugin On Score And Parts getting a separate entry.

Plug-in written by Bob Zawalich.