I'd like to have a callback for when the current gig file is saved

I just added a short script to my gig file’s global rackspace that runs in Initialization() and alerts me if a certain testing widget is “on” (i.e. it was saved that way). This is important because I never want to have saved the gig file in its “testing” state.

What would be even better is if GScript had a callback function that would be called whenever the gig file is about to be saved - I’d insert code that would set the testing widget to “off” before saving. Or it could be called when you quit GigPerformer, if there was a way to turn a widget off and re-save the gig file before GP exits.

There’s no script callback for when a gig is saved.
If the end goal is to ensure the widget is off when you next option the gig, then there are widget settings to specify an initial value when the gig is loaded.

1 Like

While it may not be a bad idea to have such a callback, for your example, why would not have that widget configured so that it just always gets reset to 0 when you load a gigfile?

1 Like

Well there you go, an even better answer. Thanks!

1 Like

I’m unable to set “initial value on gig load”, all the options are greyed out - any idea why that would be?

Ah, i see, “Not available in the Global Rackspace” - Initial Value of Global Widget - #7 by JonBlanck

Well, in that case, just use an initialization section in the global rackspace to set it

1 Like