So, there are a ton of extremely powerful tools for creating scripts and other functions for Finale, Sibelius, Dorico and others. These are, generally speaking, geared to and created for the power users, who use these programs for a living. Great examples of these are Keyboard Maestro (great for creating macros of any kind), NYC Music Services Notation Express, and the forthcoming JetStream controller for Finale. I would highly, highly recommend all of them and have used, or will use, them all.
Sammy Sanfilippo, CEO of Engraver's Mark Music