I'm trying to define functions considering three main requirements:
I've tried several methods and searched around but was completely unsuccessful. Either I'm unable to use Script Command event or unable to call the function through script, I can do each of them just not at the same time so I'm wondering if I have to even define my plugin in a certain particular way to allow for this.
- Be able to call them through script (for ex: author.myPlugin.sayHello(); )
- Be able to use the Script Command event from the UI
- Have the function be defined like this so that VSCode actually shows me it's a function and shows me the JSDoc when I hover over it:
Yes, I'm a maniac regarding tidyness and documenting.JavaScript:
function sayHello() {}
I've tried several methods and searched around but was completely unsuccessful. Either I'm unable to use Script Command event or unable to call the function through script, I can do each of them just not at the same time so I'm wondering if I have to even define my plugin in a certain particular way to allow for this.