I have this idea from the very beginning of using GP, and for nowadays this helps knowing more about scripts.
I can open OR close with a widget, but how to do it with the same widget? ON/OFF
OpenPlugin : Open the plugin editor
Declaration: function OpenPlugin (p : Block) autotype
Category: Plugins
Parameters
p : Block
Autotype
ClosePlugin : Close the plugin editor
Declaration: function ClosePlugin (p : Block) autotype
Category: Plugins
Parameters
p : Block
Autotype
Yeah!! even with my musician coat on… getting the hang of it
Working!!
Thanks for help @david
Brace yourself for some crazy open/closing plugin window editors!!
var
Dexed : PluginBlock
OpenCloseButton : Widget
On WidgetValueChanged(newValue : double) from OpenCloseButton
If newValue > 0.5
then OpenPlugin(Dexed)
Else ClosePlugin(Dexed)
End
End
Is this script working now?
I was looking for a quick way to access the Plug-in Editor without having to go into Edit mode.
I tried entering the script but it showed an error, would be great if it works.
Does the Widget have to be assigned to the plug-in with no parameter selected for it to work?
I am new to GP and have not had time to study the Scripting language but this ‘Open Plugin Editor’ feature would be a great help to me right now.
Initially, I copied and pasted the Script into the Script Editor but have just tried typing it in and still get the same error.
Your help would be appreciated.
Martin
Thanks for the replies everyone.
I am now getting the following error:
“Semantic error: Line 2, Col 13: Declarations of this type are not allowed”
Line 2 reads: Dexed : Block
Thank you David, that worked to a degree. The Script compiled successfully but reported that the Plugin was now found so I see that the Word “Dexed” refers to the Plugin.
How do I find the correct name for the Plugin I wish to address?
Sorry for the questions, I am going to read and learn the programming manual just a soon as I’ve finished digesting all of the GP User Manaul.
Right click on a block and there’s an option to set its name and enable OSC and/or GP Script support. Whatever name you define there should be the same as the declaration you use in the script