Component Scripting for Template

Looking at some old posts, adding the script to the template instance might not be available (?), but there are workarounds. Seems like you cannot get the event to fire at all.

One thing that I have used lately has been putting the script on the Template itself (not the template instance) that calls this potential GUI scenario and changes a component. This isn't a good code block, but it works:

currentWindow = 'Window_Path_That_Has_The_Image'
try:
	image = system.gui.getWindow(currentWindow).getRootContainer().getComponent('Image')
	image.visible = 0
except:
	pass

Previous posts: