Renderer Posted September 7, 2015 Share Posted September 7, 2015 Hello guys! I need your advice regarding this little problem:I've tried to make AutoIT GUI display an onffline HTML file . I've used _IECreateEmbedded() to do that but it did not worked! Does someone have an idea on how to make an AutoIT GUI render an offline HTML file?I am waiting for your answers! Thanks in advance! Link to comment Share on other sites More sharing options...
Gianni Posted September 7, 2015 Share Posted September 7, 2015 (edited) Have a look to the example of the _IECreateEmbedded() function, then, in the _IENavigate() function, just use the full path of your local html file instead the url, that is: change the "http://www.autoitscript.com" with "c:\temp\myfile.html" for example Edited September 7, 2015 by Chimp Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Renderer Posted September 8, 2015 Author Share Posted September 8, 2015 Have a look to the example of the _IECreateEmbedded() function, then, in the _IENavigate() function, just use the full path of your local html file instead the url, that is: change the "http://www.autoitscript.com" with "c:\temp\myfile.html" for exampleIt doesn't work. Link to comment Share on other sites More sharing options...
Gianni Posted September 8, 2015 Share Posted September 8, 2015 it works well for me. I can open and view in a browser embedded in a GUI, any html files located on the local HD without problems.could you post your not working code? Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Renderer Posted September 8, 2015 Author Share Posted September 8, 2015 it works well for me. I can open and view in a browser embedded in a GUI, any html files located on the local HD without problems.could you post your not working code?i've got this message: Action canceledInternet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable. I'm more than sure that the code is correct. shot.bmp Link to comment Share on other sites More sharing options...
jguinch Posted September 8, 2015 Share Posted September 8, 2015 try to use the full path :_IENavigate($oIE, @ScriptDir & "\test.html") Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Renderer Posted September 8, 2015 Author Share Posted September 8, 2015 It works Link to comment Share on other sites More sharing options...
Gianni Posted September 8, 2015 Share Posted September 8, 2015 as jguinch say,or you can also try with this:#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> Local $oIE = _IECreateEmbedded(), $msg, $sHtml_File GUICreate("Embedded Web control Test", 640, 480, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) GUICtrlCreateObj($oIE, 10, 40, 600, 360) Local $GUI_Button_Home = GUICtrlCreateButton("Coose a web page from disk", 10, 420, 600, 30) GUISetState() ;Show GUI While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home _IEAction($oIE, "stop") $sHtml_File = FileOpenDialog("Choose a web page from disk", @ScriptDir & "\", "html page (*.htm;*.html)") _IENavigate($oIE, $sHtml_File, 0) EndSelect WEnd GUIDelete() Exit Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Renderer Posted September 8, 2015 Author Share Posted September 8, 2015 (edited) thanks to everyone for help. Edited September 8, 2015 by Renderer Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now