html=<html><head></head><body><p>Hello</p></body></html> Gui, Add, ActiveX, w500 h500 x0 y0 vdoc, HTMLFile doc.write(html) Gui, Show, w500 h500 Center, HTML Gui ComObjConnect(doc, Document) return GuiClose: ExitApp
HTML Based GUI (_L)
Started by
FischGeek
, Jul 20 2012 01:16 AM
6 replies to this topic
#1
Posted 20 July 2012 - 01:16 AM
I'm playing around with HTML based GUIs, but I can't seem to get rid of the VScroll in the GUI. What am I missing?
#2
Posted 20 July 2012 - 02:36 AM
Sure, try this...
From here http://www.autohotke...pic.php?t=79654
Gui, Add, ActiveX, w500 h500 x0 y0 vdoc, browser
doc.silent := true
ComObjConnect(doc,"IE_")
IE_DocumentComplete(doc) {
doc.Document.Body.Style.Overflow := "hidden"
}
Gui, Show, w500 h500 Center, HTML Gui
return
GuiClose:
Gui, Destroy
ExitAppFrom here http://www.autohotke...pic.php?t=79654
#3
Posted 20 July 2012 - 03:48 AM
DocumentComplete won't fire unless you load a document, such as about:blank. Even after adding
I did something similar via CSS for the new AutoHotkey_L v1.1.08 installer. I also used
There's something odd about using MSHTML (HTMLFile) directly vs using a WebBrowser (Shell.Explorer) control. I don't recall exactly what.
doc.Navigate("about:blank"), the event would not fire until I replaced "browser" with "Shell.Explorer", although they appear to be the same type of object (note: it's a WebBrowser object, not a document).I did something similar via CSS for the new AutoHotkey_L v1.1.08 installer. I also used
background-color: ButtonFace and cursor: default to make it more like an ordinary GUI. Once v1.1.08 is installed, Installer.ahk is in the AutoHotkey directory. You might want to take a look at gui_KeyDown() which gets "keyboard accelerators" such as Tab and Enter working.There's something odd about using MSHTML (HTMLFile) directly vs using a WebBrowser (Shell.Explorer) control. I don't recall exactly what.
#4
Posted 20 July 2012 - 05:28 AM
What about this?:
html=
(
<!DOCTYPE html><html><head>
<STYLE TYPE="text/css" MEDIA=screen>
<!--
html { overflow:hidden}
-->
</STYLE></head>
<body>look: no scroll bar!</body></html>
)
Gui, Add, ActiveX, w500 h500 x0 y0 vdoc, HTMLFile
doc.write(html)
Gui, Show, w500 h500 Center, HTML Gui
ComObjConnect(doc, Document)
return
GuiClose:
ExitApp
#5
Posted 20 July 2012 - 01:29 PM
Yep! :wink: - That's what led me to looking for how to make an html based gui. I was very impressed by the installer. Thank you for the source code.Once v1.1.08 is installed, Installer.ahk is in the AutoHotkey directory.
#6
Posted 21 July 2012 - 06:12 AM
Maybe this? Additionally, I remember not being able set the body background color in the initial html (There's something odd about using MSHTML (HTMLFile) directly vs using a WebBrowser (Shell.Explorer) control. I don't recall exactly what.
<body style='background-color:%color%;overflow:hidden'></body> ) when using MSHTML:%html%, though you could set it afterwards ( Document.Body.Style.backgroundcolor := color ). I never had this issue when using the HTMLfile object & then writing the html.
#7
Posted 21 July 2012 - 09:22 AM
Scripts supposedly don't work with MSHTML:%html% either, but they seem to work with HTMLfile.
Anyway, I'm fairly certain you get the same type of host window, the same rendering engine etc., but using Shell.Explorer gives you more control - you get all the methods and events of the WebBrowser control instead of just a document object. The downside is that you have to load a document (like about:blank) and then wait for it to initialize before getting a handle on the document object.
Anyway, I'm fairly certain you get the same type of host window, the same rendering engine etc., but using Shell.Explorer gives you more control - you get all the methods and events of the WebBrowser control instead of just a document object. The downside is that you have to load a document (like about:blank) and then wait for it to initialize before getting a handle on the document object.




