Convert Event Handlers from GUI to Script

I recently wanted to use utils.setUrlParameters in a script but noticed that this utility function isn’t suggested when typing utils.setUrl ....

This made me realize how useful it would be if event handlers defined in the GUI could be easily converted into scripts—perhaps via a context menu option (right-click > Convert to Script).

Such a feature would allow developers to abstract and reuse logic more efficiently without having to manually reorganize everything from scratch. Ideally, multiple event handlers could be selected and converted at once.

Since every event handler already has a script equivalent, this idea doesn’t seem too far-fetched, at least in my opinion.

Curious to what y'all think!

:wave:

1 Like

I do think it should be a one-way system, where event handlers from the GUI can get converted into scripts, but not the other way around. That would probably be too much of a headache to implement, I'm guessing. :stuck_out_tongue:

@emozio,
Thanks for your feedback. I've submitted a feature request for this. :grinning:

1 Like