#Persistent ComObjError(0) FixIE(True, "0") html = (

This is some text

) x := new HtmlControl(html, "w500 h500") ;Gui, Show return MyLabel: ;ToolTip, % ++count Count++ x.MyText := "Some more text: " Count return Reset: x.Style.Sheet.cssText := "" return GuiClose: ExitApp return class HtmlControl { __New(html, Options="", Title="") { global wb ;Gui, Add, ActiveX, vWB %Options%, Shell.Explorer wb := ComObjCreate("InternetExplorer.Application") ;wb.FullScreen := true wb.Visible := true wb.AddressBar := false ComObjConnect(wb, new this.IEHandler()) wb.Navigate("about:blank") while wb.readystate != 4 sleep, 50 wb.document.Write("" A_ScriptName "" html "") Buttons := wb.document.getElementsByTagName("BUTTON") while Button := Buttons.Item(A_Index-1) { this.Buttons[A_Index] := Button ComObjConnect(Button, new this.ButtonHandler()) } ;MsgBox, % ComObjType(wb, "Name") this.wb := wb } __Set(Name, Value) { if this.wb { Element := this.wb.document.getElementByID(Name) if Element return Element.InnerText := Value } } __Get(Name) { if (Name != "wb" && this.wb) { Element := this.wb.document.getElementByID(Name) if Element return Element } } __Delete() { this.wb.Quit() } class IEHandler { onQuit(p*) { SetTimer, GuiClose, -0 } } class ButtonHandler { onClick(Button) { Label := Button.GetAttribute("Label") if IsLabel(Label) SetTimer, %Label%, -0 } } }