Auto Closing an HTML Dialog


Not sure if such a thing is possible but here goes…

I’m utilizing an HTML dialog within a Tool. As per SU standard practice when you hit the space bar it jumps you out of the tool (exits), however the HTML dialog is still left open. Is there a way to auto-close the HTML window when the tool is terminated? Note that I do not want to close the HTML dialog window on reset, just when the tool is exited.

I’ve looked around a bit for an answer but I did not turn up anything. This question is above my pay grade.


You can use the deactivate method in the tool interface to close the dialog.


Thank-you, I will give this a go and see if I can make it work.


This seems to work:

@dlg03.close if @dlg03.visible?

I guess this was a lot easier than I imagined.