I’ve been working on a small panel plugin that is just about exposing a few custom scripts quickly in the UI — I realize I can add custom shortcuts a few different ways, but this is a bit easier for this specific audience. I have the UI wired up using vanilla and buttons are all doing what they’re supposed to do but I can’t seem to figure out the right way to have one run a specific script from the Glyphs 3 > Scripts folder within the app.
I haven’t had any lucking finding clues within the forum so far or by trying to dissect other plugins so wondering if someone has a suggestion. FastScripts is one that could do this but unfortuntely I need something proprietary in this case.
class clientActions (PalettePlugin):
@objc.python_method
def settings(self):
self.name = 'Client Actions'
...
self.buildButton = Button(("auto"), "Export Font", sizeStyle="small", callback=self.buildCallback)
...
self.dialog = self.paletteView.frame.getNSView()
...
@objc.python_method
def buildCallback(self, sender):
Glyphs.showMacroWindow()
print('clicked build button')
# TRIGGER SPECIFIC SCRIPT HERE
# SUCH AS "buildFontRelease.py"