bucky002 Posted April 22, 2006 Posted April 22, 2006 (edited) I want to do this so maybe I could make a script so I could use a gui as a browser. I'm going to use Inetget to download the page then the gui to open it. Now how do I go about doing this? Or is there an easier way? Also, I don't have a sample code to give. Sorry. Edited April 22, 2006 by bucky002
Thatsgreat2345 Posted April 23, 2006 Posted April 23, 2006 (edited) inbed IE into a GUI with a com object and then naviagte to where ever ur .html file is i think that should work :-/ there was a post about this not to long ago Edited April 23, 2006 by thatsgreat2345
Thatsgreat2345 Posted April 23, 2006 Posted April 23, 2006 this should work expandcollapse popup#include <GUIConstants.au3> ; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI ; ; The full example is available in the test\ActiveX directory (TestXInternet.au3) ; ; See also: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp $oIE = ObjCreate("Shell.Explorer.2") ; Create a simple GUI for our output GUICreate ( "Embedded Web control Test", 640, 580,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj ( $oIE, 10, 40 , 600 , 360 ) $GUI_Button_Back = GuiCtrlCreateButton ("Back", 10, 420, 100, 30) $GUI_Button_Forward = GuiCtrlCreateButton ("Forward", 120, 420, 100, 30) $GUI_Button_Home = GuiCtrlCreateButton ("Home", 230, 420, 100, 30) $GUI_Button_Stop = GuiCtrlCreateButton ("Stop", 330, 420, 100, 30) GUISetState () ;Show GUI $file = FileOpenDialog("Choose HTMl File",@ScriptDir,"HTML (*.htm;*.html)") $oIE.navigate($file) ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home $oIE.navigate("J:\poop.html") Case $msg = $GUI_Button_Back $oIE.GoBack Case $msg = $GUI_Button_Forward $oIE.GoForward Case $msg = $GUI_Button_Stop $oIE.Stop EndSelect Wend GUIDelete () Exit
bucky002 Posted April 23, 2006 Author Posted April 23, 2006 (edited) How do I do that? Edit: We must have posted at the same time Edited April 23, 2006 by bucky002
Thatsgreat2345 Posted April 23, 2006 Posted April 23, 2006 i think this is how it would go expandcollapse popup#include <GUIConstants.au3> #include <INet.au3> ; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI ; ; The full example is available in the test\ActiveX directory (TestXInternet.au3) ; ; See also: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp $oIE = ObjCreate("Shell.Explorer.2") ; Create a simple GUI for our output GUICreate ( "Embedded Web control Test", 640, 580,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj ( $oIE, 10, 40 , 600 , 360 ) $GUI_Button_Back = GuiCtrlCreateButton ("Back", 10, 420, 100, 30) $GUI_Button_Forward = GuiCtrlCreateButton ("Forward", 120, 420, 100, 30) $GUI_Button_Home = GuiCtrlCreateButton ("Home", 230, 420, 100, 30) $GUI_Button_Stop = GuiCtrlCreateButton ("Stop", 330, 420, 100, 30) GUISetState () ;Show GUI $source = _INetGetSource("WWW.YOURSITEHERE.COM") $file = filewrite(@ScriptDir & "\source.html",$source) $oIE.navigate($file) ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home $oIE.navigate("www.google.com") Case $msg = $GUI_Button_Back $oIE.GoBack Case $msg = $GUI_Button_Forward $oIE.GoForward Case $msg = $GUI_Button_Stop $oIE.Stop EndSelect Wend GUIDelete () Exit
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