![](https://secure.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle_images%2Fortem%2Fprofile%2Fdefault_large.png)
Flash/HTML in Gui
Have you any idea to screen a flash element or a html file in the gui?
pleas can you help me with code...
![Flash/HTML in Gui: post #1](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
![Flash/HTML in Gui: post #2](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
![Flash/HTML in Gui: post #3](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
there used to be a thing called IE.ahk, that is no longer supported.. that would have done it..
most of the latest posts say to use COM.. but there are no examples of how to embed a HTML control into a GUI.. it seems to be assumed that just because there is a way to do this with COM that we should know how to modify the GUI to embed a control of this type into it.
tank has something called IWeb.. but I couldnt work out how that would display HTML within a specific custom GUI.. and theres that post asking for web recorder help... that is supposed to somehow allow you to create HTML documents..
The gui docs say to use some IE_functions .. and there are many examples around that use these functions.. but they are from IE.ahk and dont work anymore. The help sends you to a deprecated method which refers to another deprecated method, which refers to yet another deprecated method, which refers to the standard COM lib.. which then tells you how to do EVERYTHING under the sun EXCEPT how to display HTML within a custom gui.
If your head isnt bleeding after 5 hours of searching this forum to solve this problem, then my hat's off to you.
There are many examples of people loading hidden urls, and accessing DOM.. but this is not embedding a html control into a gui..
I would like to just load HTML into a variable and display it in my GUI or tooltip...
htmlCSS:="<span style='background-color: #ffffff; color: #000000;'><font color=blaa><b>Anything</b></font></span>"
If I find a way to do it.. I will post it here.. because this is the first post you are sent to when looking for help on this subject.
![Flash/HTML in Gui: post #4](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
I assume you mean this, which should lead you to this example. Since that example is a but a snippet of an actual example, see this post by Sean. Here's a stripped down version:most of the latest posts say to use COM.. but there are no examples of how to embed a HTML control into a GUI..
COM_AtlAxWinInit() [color=DarkRed]Gui[/color], +Resize +LastFound [color=DarkRed]Gui[/color], Show, w500 h500 pweb := COM_AtlAxCreateControl( [color=DarkRed]WinExist[/color](), [color=CornFlowerBlue]"Shell.Explorer"[/color]) COM_Invoke(pweb, [color=CornFlowerBlue]"Navigate2"[/color], [color=CornFlowerBlue]"http://www.autohotkey.com/forum/topic59563.html"[/color] ) [color=DarkRed]Return[/color] GuiClose: [color=DarkRed]Gui[/color], Destroy COM_Release(pweb), COM_AtlAxWinTerm() [color=DarkRed]ExitApp[/color]
![Flash/HTML in Gui: post #5](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
This got me thinking, what about creating an HTML-Based GUI? Here is a basic example: ( NOTE - please excuse the blandness - I'm not a webpage developerI would like to just load HTML into a variable and display it in my GUI or tooltip...
![:p](http://www.autohotkey.com/board/public/style_emoticons/default/tongue.png)
![Flash/HTML in Gui: post #7](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
![Flash/HTML in Gui: post #8](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
I just wanted to be able to display some dynamically formatted data, but to be able to also attach functions and write back into the document.. :shock:
Im assuming then that AHK could access the .innerHTML property of any element with just a ...
pweb.document.all.ELEMENTID.innerHTML:="blaaa"
where ELEMENTID is the ID of any DIV / SPAN, etc...
but now you have me wondering too.. does that mean we could we also call javascript functions? If so how would that work?
pweb.document.all.JS_FUNCTION_NAME() ?
![Flash/HTML in Gui: post #9](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
I was using tabs2 within a GUI and needed to display my html report under one of the tabs.. but it kept destroying all the other controls and tabs and flooding out to the edge of the gui....
Turns out you need to place the IE control inside another control, and reference that instead...
So after including COM.ahk and creating the basic GUI and tabs... you add a groupbox to bound the HTML, get the handle into a hwnd.. and create your explorer shell within it.
;create your GUI first.. then this will add a tab with IE in it.. gui,tab,2 Gui, Add, GroupBox, h400 hwndGroupArea, Html Area html:="<html><body><b>stuff </b>here</body></html>" COM_AtlAxWinInit() pweb := COM_AtlAxCreateControl( GroupArea, "Shell.Explorer") COM_Invoke(pweb, "Navigate2", "" ) COM_Invoke(pweb, "stop") COM_Invoke(pweb, "document.write",html) GuiClose: Gui, Destroy COM_Release(pweb), COM_AtlAxWinTerm() ExitApp
![Flash/HTML in Gui: post #10](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
does that mean we could we also call javascript functions? If so how would that work?
pweb.document.all.JS_FUNCTION_NAME() ?
pweb.document.parentwindow.execscript("JS_FUNCTION_NAME()")this has so been explored like a gaggilion times tho
![Flash/HTML in Gui: post #11](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
WIN or LEARN.
Also, is there a groupbox style that make the border invisible? Looks a bit sloppy like this as the browser does not seem to fit neatly inside the groupbox outline.
#SingleInstance force Gui, Add, Tab2, x1 y1 w820 h630 vMyTab gtabclick, tab1|tab2 loop, 2 { html%a_index% = <html><body>Page%a_index%</body></html> Gui, Tab, %a_index% Gui, Add, GroupBox, x10 y25 w800 h600 hwndGroupArea%a_index%, } Gui, -caption +LastFound Gui, Show, w820 h630 COM_AtlAxWinInit() pweb1 := COM_AtlAxCreateControl( GroupArea1, "Shell.Explorer") pweb2 := COM_AtlAxCreateControl( GroupArea2, "Shell.Explorer") return tabclick: gui, submit, nohide if mytab = tab1 { COM_Invoke(pweb1, "stop") COM_Invoke(pweb1, "document.write",html1) } else if mytab = tab2 { COM_Invoke(pweb2, "stop") COM_Invoke(pweb2, "document.write",html2) } Return Guiescape: GuiClose: Gui, Destroy COM_Release(pweb), COM_AtlAxWinTerm() ExitApp
![Flash/HTML in Gui: post #12](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
Marine Corps Gen. Joseph Dunford told senators at his Joint Chiefs of Staff confirmation hearing : “If you want to talk about a nation that could pose an existential threat to the United States, I'd have to point to Russia. And if you look at their behavior, it's nothing short of alarming.”
COM_Invoke(pweb1, "document.body.innerHTML",html1)instead of document write if you wish to overwrite
or close the document between calls by calling
COM_Invoke(pweb1, "document.write",html1) COM_Invoke(pweb1, "document.close") ; you have to close the document between calls
![Flash/HTML in Gui: post #13](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
WIN or LEARN.
![Flash/HTML in Gui: post #14](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
Marine Corps Gen. Joseph Dunford told senators at his Joint Chiefs of Staff confirmation hearing : “If you want to talk about a nation that could pose an existential threat to the United States, I'd have to point to Russia. And if you look at their behavior, it's nothing short of alarming.”
This got me thinking, what about creating an HTML-Based GUI? Here is a basic example:I would like to just load HTML into a variable and display it in my GUI or tooltip...
@jethrow, I think it would be good to post your example/idea in its own thread as it can be overlooked here - and that's a pity.
![Flash/HTML in Gui: post #15](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)