Writes to ActiveX using HTMLFile are continually appended

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
elmo
Posts: 113
Joined: 09 Oct 2013, 09:08

Writes to ActiveX using HTMLFile are continually appended

11 Feb 2014, 17:31

All of this code works

Code: Select all

; add to gui
Gui , Add , ActiveX , x8 y8 w128 h128 vguiThisHTML , HTMLFile
However, if I call the "SUB" Label three (3) times, then the displayed ActiveX browser will stack all three (3) instances of the displayHTML variable.

Code: Select all

SUB:
; write contents of "displayHTML" var to ActiveX object
guiThisHTML.write(displayHTML)
return
How can I empty the ActiveX object before writing into it again?
Thanks for any help.
lexikos
Posts: 9592
Joined: 30 Sep 2013, 04:07
Contact:

Re: Writes to ActiveX using HTMLFile are continually appende

11 Feb 2014, 19:47

iirc, .open() before writing and .close() afterward.
elmo
Posts: 113
Joined: 09 Oct 2013, 09:08

Re: Writes to ActiveX using HTMLFile are continually appende

11 Feb 2014, 19:57

Thank you lexikos,

I will try that method and report the result.
elmo
Posts: 113
Joined: 09 Oct 2013, 09:08

Re: Writes to ActiveX using HTMLFile are continually appende

17 Feb 2014, 10:25

Yes, thank you again, that worked perfectly.

I've also discovered your amazing installer.ahk and can see where you used these methods with shell.explorer and the .document element.

Code: Select all

wb.Document.open()
wb.Document.write(html)
wb.Document.Close()

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 210 guests