Possible to edit component event from script console?

I am trying to do a change on a number of component ‘mouseClicked’ event scripts. This involves accessing the text in the script, parsing, and adding in a value. Is this possible?

I have attempted to get the text with the following;’

window = system.gui.getWindow(‘Ovr_West_animate1’)
strTest = window.getRootContainer().getComponent("_test").mouseClicked

I get a ‘<CompoundCallable with 0 callables>’ in the interpreter. Any other ideas on how to do this?

Thanks

I think there technically is a way (I’m not sure right now how) to do that, it definitely isn’t supported and you’d probably be better off changing the script to refer to a property, then change that property.

Consider exporting the window in question as XML (via the clipboard, shift-right-click in the nav tree) and editing there. Search the XML for m="setJythonCode" to locate the scripts. Then replace the window XML with the edits.

I ended up changing it via XML, it seemed to work quite well. Thanks for the help.

1 Like