Is there a resource for building a very simple GUI for own written scripts out there? Your Tutorials are amazingly great, Mekkablue. I checked the docu.glyphsapp, and try to read myself through your scripts on GitHub, but they are so complex, that I find it hard to understand what the basics are to build my own.
Do i have to dig myself into Vanilla for this?
Let’s say for example I have this script:
#MenuTitle: Open Tab with String
’’’ Opens a Tab with the String typed here ‘’'
Glyphs.currentDocument.windowController().addTabWithString_( “onnonnoon” )
So if i want to have a GUI that asks me for the desired string, where can I get information about that?
BTW: how can i call a certain Glyph (e.g. \omicron \kappa …)? I guess i cannot work with »string« then?
Vanilla is as easy as it gets. You will have to deal a little bit with objects in Python, I am afraid. Feel free to dig through my Vanilla scripts, and steal the GUI of a script where the window would fit your purposes.
and i found a little bug, i guess. when i run this script, it opens the tab, but doesn’t show the actual tab on top. when i open the regular way (cmt-t or double clicking existing letters) it is there, though.
okay, so i got the interface running like a charm with vanilla. puzzled my way through your scripts, mekkablue.
one thing i had trouble with: i had a print yes
in the Callback for the button (right, i forgot the “”) for checking my script. It did not work, but also did not give me an error in the output.
after putting the string yes in quotes, everything worked
when i only have a print yes
in a script and nothing else, i get the error message as expected, though