Jump to content
Sign in to follow this  
JustinReno

Probably the smallest browser

Recommended Posts

This is a VERY simple and small web browser code.

It doesn't have any include files! And its only 12 lines of code. I thought it was sort of cool, but is kind of useless at the same time.

UPDATED!:

Opt("GUIResizeMode",1)
$Form1_1 = GUICreate("Simple Web Browser Mini", 660, 482, "", "", 0x00CF0000, 0x00010000)
$Obj1 = ObjCreate("Shell.Explorer.2")
$Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 658, 452)
$Button1 = GUICtrlCreateButton("URL", 8, 456, 643, 25, 0)
GUISetState(@SW_SHOW)
While GUIGetMsg() <> -3
    If GUIGetMsg() = $Button1 Then $Obj1.Navigate (InputBox("Simple Web Browser Mini", "What is the URL you want to visit?"))
WEnd
Edited by JustinReno

Share this post


Link to post
Share on other sites

Interesting.


Spoiler

 

"If a vegetarian eats vegetables,What the heck does a humanitarian eat?"

"I hear voices in my head, but I ignore them and continue on killing."

"You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring."

An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.

 

 

Share this post


Link to post
Share on other sites

And what do you do if you have removed IE from your system?..;)

EDIT: It is only small because you don't count the dependencies..:)

Edited by Uten

Share this post


Link to post
Share on other sites

@Valuater: Its a bit awkward, but It did make the script much smaller!

@AlmarM: Thanks! :)

@Uten: I guess it wouldn't work on a computer without IE, and your right, with the dependencies it would be big.

Thanks for the feedback!

Share this post


Link to post
Share on other sites

8 lines :)

$Form1_1 = GUICreate("Simple Web Browser Mini", 660, 482)
$Obj1 = ObjCreate("Shell.Explorer.2")
$Obj1_ctrl = GUICtrlCreateObj($Obj1, 0, 0, 658, 452)
$Button1 = GUICtrlCreateButton("URL", 8, 456, 643, 25, 0)
GUISetState(@SW_SHOW)
While GUIGetMsg() <> -3
If GUIGetMsg() = $Button1 Then $Obj1.Navigate(Inputbox("Simple Web Browser Mini", "What is the URL you want to visit?"))
Wend

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...