Scripting help: tie OpenPlugin() to front panel event

Hi @tmart, welcome to the comunity. Here is a gigfile with a widget button which opens a plugin window: Plugin_button.gig (8.7 KB)

It is based on this script:

//$
// DO NOT EDIT THIS SECTION MANUALLY
Var
PLUGIN : PluginBlock
PLUGIN_BUTTON : Widget
//$

// Called when a widget value has changed
On WidgetValueChanged(newValue : double) from PLUGIN_BUTTON

  If (newValue > 0.5)
  Then
    OpenPlugin(PLUGIN);
  Else
    ClosePlugin(PLUGIN)
  End
End

I think for this kind of thing it is also good to set the option in Options=>Preferences=>“Keep plugin window on top”.

I hope it is what you need, if not don’t hesitate to ask again :wink:

3 Likes