JustinReno Posted August 25, 2007 Posted August 25, 2007 (edited) Welcome to Simple Web Browser's little brother SWBMINI! Features: 1. VERY SMALL COMPILED 2. 19 lines of code without comments 3. Browse Easily Not very usefull but anyone can add on to it and make it they're own. Have fun! CODE #include <GUIConstants.au3> ;Makes the gui possible #Include <ie.au3> ;Makes browsing the internet possible $Form1 = GUICreate("Simple Web Browser MINI Version", 628, 436, 193, 115) ;Creates the GUI $Obj1 = ObjCreate("Shell.Explorer.2") ;Creates the Internet Explorer Object $Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 626, 412) ;Set Object on the GUI $Button1 = GUICtrlCreateButton("URL", 0, 416, 627, 17, 0) ;Makes the Browse URL Button GUICtrlSetFont(-1, 10, 800, 0, "Arial Black") ;Sets the Font of the Button _IENavigate($Obj1, "www.google.com") ;Before the GUI is shown, browse to google. Sorta like a homepage GUISetState(@SW_SHOW) ;Shows the GUI While 1 ;Creates a loop to capture the GUI Messages like close and the url button $nMsg = GUIGetMsg() ;Gets the Message Switch $nMsg Case $GUI_EVENT_CLOSE ;If you pressed the close button Exit ;It will exit Case $Button1 ;If you pressed the URL Button $URL = InputBox("SWBmini", "Type in the url you wish to go to:") ;Asks what url you want to go to _IENavigate($Obj1, $URL) ;Navigate to the URL. This is what requires the IE.au3 at the top EndSwitch WEnd ;This ends the loop And there is also one that opens the last page you browsed: 27 Lines of code CODE #include <GUIConstants.au3> ;Makes the gui possible #Include <ie.au3> ;Makes browsing the internet possible Global $ini = @ScriptDir & "\swb.ini" ;INI To Store Last WEBSITE Visited $Form1 = GUICreate("Simple Web Browser MINI Version", 628, 436, 193, 115) ;Creates the GUI $Obj1 = ObjCreate("Shell.Explorer.2") ;Creates the Internet Explorer Object $Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 626, 412) ;Set Object on the GUI $Button1 = GUICtrlCreateButton("URL", 0, 416, 627, 17, 0) ;Makes the Browse URL Button GUICtrlSetFont(-1, 10, 800, 0, "Arial Black") ;Sets the Font of the Button5 $iniread = iniread($ini, "URL", "LAST URL", "");Reads the ini so it can navigate to the last URL If $iniread = "" Then ;If the ini doesnt have a previous saved url then write the default as google.com iniwrite($ini, "URL", "LAST URL", "www.google.com") ;Writes google into the homepage endif $iniread1 = iniread($ini, "URL", "LAST URL", "");Reads the ini so it can navigate to the last URL _IENavigate($Obj1, ""&$iniread1&"") ;Before the GUI is shown, browse to google. Sorta like a homepage GUISetState(@SW_SHOW) ;Shows the GUI While 1 ;Creates a loop to capture the GUI Messages like close and the url button $update = _IEPropertyGet($Obj1, "locationurl") ;Gets the URL from internet explorer IniWrite($ini, "URL", "LAST URL", $update) ;Writes the URL to the ini to navigate on startup $nMsg = GUIGetMsg() ;Gets the Message Switch $nMsg Case $GUI_EVENT_CLOSE ;If you pressed the close button Exit ;It will exit Case $Button1 ;If you pressed the URL Button $URL = InputBox("SWBmini", "Type in the url you wish to go to:") ;Asks what url you want to go to _IENavigate($Obj1, $URL) ;Navigate to the URL. This is what requires the IE.au3 at the top EndSwitch WEnd ;This ends the loop Edited August 25, 2007 by JustinReno
James Posted December 31, 2007 Posted December 31, 2007 JUSTIN NO MORE WEB BROWSERS. You can be thrown overboard and fed to the little sharks now! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
JustinReno Posted December 31, 2007 Author Posted December 31, 2007 Have you even bothered to check the date on this?
BrettF Posted December 31, 2007 Posted December 31, 2007 No? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
James Posted December 31, 2007 Posted December 31, 2007 Still, no more! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
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