mcaselector icon indicating copy to clipboard operation
mcaselector copied to clipboard

[feature] custom filters for pros

Open arvitus opened this issue 1 year ago • 0 comments

The custom filters are really great! But one thing that would make them even greater, especially for advanced users, would be to somehow allow the sharing of variables between the before(), filter()/apply(), after() functions.

A "simple" way to allow this would be to put all of this in a class. So in the groovy script, instead of writing functions, one would create a class called e.g. Script. MCASelector then initializes this class without arguments and calls the before, after, filter, apply methods of the object. This way variables could be shared between the different methods, allowing for shorter code etc. Also, the class doesn't have to be initialized, all static fields and methods would already suffice.

I'd love seeing this in the app!

arvitus avatar Oct 08 '24 20:10 arvitus