Sign in to follow this  
Followers 0
JustinReno

FINALLY SWB IS HERE

39 posts in this topic

#1 ·  Posted (edited)

THE ENCYRPTION WORKS!!!!!! YAY!

I TEMPORARILY REMOVED THE SOURCE, THERE SHOULD BE A REALLY BIG UPDATE SOON...

Edited by JustinReno

Share this post


Link to post
Share on other sites



UGH! MOD DELETE THIS DOUBLE TOPIC! I WAS IN A HIRRY AND MUST HAVE DUBBLED DCLICKED POST NEW TOPIC! sorry////

If no body replies in the other one, i think you can delete it...

Share this post


Link to post
Share on other sites

No Comments, Suggestions, Critiicism?????

Share this post


Link to post
Share on other sites

Unable to run, too many undeclared variables, i think you should post the full script and the ini attached.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

OOPS, I forgot to put the includes and the ini is auto generated at start if you enter prefs. edited first post!

Edited by JustinReno

Share this post


Link to post
Share on other sites

Have to wait till the page is loaded before it can exit.

Share this post


Link to post
Share on other sites

Hey... Pretty nice!! Great start!

Share this post


Link to post
Share on other sites

yeah, thats an case limitation, you have to wait for autoit to finsh one thing until you can do another thing..thx, you guys like it?

Share this post


Link to post
Share on other sites

nice work.. I'm impressed..

try to find out for example how hard it would be (or how easy) to implement tabbed browsing in this..


Share this post


Link to post
Share on other sites

yeah, i was thinking about how hard it would have been for tabbed browsing, but i might wait awhile and look around on the tabs function.

Share this post


Link to post
Share on other sites

ha, cool!

Share this post


Link to post
Share on other sites

yeah, thats an case limitation, you have to wait for autoit to finsh one thing until you can do another thing..thx, you guys like it?

Since you are merely embedding a IE browser inside a GUI you simply are using IELoadWait. But if you take a look at the IELoadWait function you can see how it works, thus being able to add in the GUIGetMsg register for the exit message. I'm sure Dale wouldn't mind you adding in a If then statement into IELoadWait for your specific use but you may want to check with him. It is easily possible to program it yourself as well. Not only could you just modify IELoadWait but you might be able to do it yourself. Since the IE window is embedded why not check out IEPropertyGet, and look at statustext. I'm not sure but once IE loads a page it says complete or done. Now if you were to do a check instead of using _IELoadWait, and make your own do a check until the status bar text is complete this would allow you to check if the close button was clicked.

yeah, i was thinking about how hard it would have been for tabbed browsing, but i might wait awhile and look around on the tabs function.

Valuater tried, and it is very difficult.

Share this post


Link to post
Share on other sites

NEW UPDATE!! Check 1st post

I'll help you out a little bit. Generally when you update something you post what you've changed. So far all I've seen different is that autoit is now the homepage.

Share this post


Link to post
Share on other sites

Nice job. Im using this in one of my projects and im giving alot of credits for the base of my Web Suite. Thanks again.


My Programs:Rock Paper ScissorsMy UDFs:NONE

Share this post


Link to post
Share on other sites

cool! what all does your websuite have, sounds interesting!

Share this post


Link to post
Share on other sites

ANOTHER UPDATE!!!:

BOOKMARKS AND A AUTO MYSPACE LOGIN!!! CHECK FIRST POST!!!

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

I have been working on this for a few hours now, this is what I have been doing.. Working on active favorites list (like IE), for the moment if you add a page to favorites using the button on the bottom, you have to exit the browser then reload it to have the favorite in the top menu.. more on this later in this post.. added menu options to print, print to default printer, save web page, Also it actually updates the url on the bottom to the page you are visiting, because before now it stays whatever you type, even of you go back, etc. now it shows actual url of page visiting, it also resolves the url as well, if you type www.google.com, it resolves to http://www.google.com, if you type www.filemirrors.com it resolves to http://www.findfiles.com/ ...it also now does not lock up the browser from doing anything if it is stuck trying to load the page.. before if it was on "loading", you could not do anything, now you can leave that page, or anything else.. Mind you there is alot of extra slop in there for the moment, I was using it to keep track of ideas and test changes I was making at the time, easily cleaned up though.. working on next making the changes ACTIVE, like if you set the home page in prefs, you needed to close browser to have the home button work after the change.. favs are the same for now, should be an easy fix, but haven't got to that yet.. Let me know what you think of the changes I have introduced.. :) Be careful of the word wrapping in the code box!

CODE

#NoTrayIcon

#RequireAdmin

#include <GUIConstants.au3>

#include <IE.au3>

#include <INet.au3>

_IEErrorHandlerRegister()

Global $oIE = ObjCreate("Shell.Explorer.2")

Global $ini = @ScriptDir & "\swb.ini"

Global $favs = @ScriptDir & "\favs.ini"

Global $read_height = IniRead($ini, "Display", "Height", "")

Global $read_width = IniRead($ini, "Display", "Width", "")

Global $read_homepage = IniRead($ini, "Settings", "Homepage", "")

Global $read_starthomepage = IniRead($ini, "Settings", "StartHomepage", "")

;Global $fav_menu = IniRead($favs, "Links", "Link1", "")

;Global $fav_menu = IniReadSectionNames(@ScriptDir & "Favs.ini")

;Global $i = $fav_menu

$filez = FileOpen("Favs.ini", 0)

;$linez = FileReadLine($filez)

Global $fav_menu = FileReadLine($filez)

FileClose($filez)

If $read_height = "" Then

IniWrite($ini, "Display", "Height", "600")

IniWrite($ini, "Display", "Width", "800")

$read_height = 600

$read_width = 800

EndIf

If $read_starthomepage = "" Then

$read_starthomepage = "1"

$read_homepage = "www.google.com"

EndIf

If $read_starthomepage = "0" Then $read_homepage = "about:blank"

$gui_main = GUICreate("Simple Web Browser", $read_width, $read_height + 20, -1, -1, $WS_CLIPSIBLINGS + $WS_OVERLAPPEDWINDOW)

$file_menu = GUICtrlCreateMenu("File")

$fm_open = GUICtrlCreateMenuItem("Open...", $file_menu)

$fm_print = GUICtrlCreateMenuItem("Print...", $file_menu)

$fm_defprint = GUICtrlCreateMenuItem("Print to Default Printer...", $file_menu)

$fm_SaveSource = GUICtrlCreateMenuItem("Save Source", $file_menu)

$fm_SavePage = GUICtrlCreateMenuItem("Save Page...", $file_menu)

$fm_sep = GUICtrlCreateMenuItem("", $file_menu)

$fm_exit = GUICtrlCreateMenuItem("Exit", $file_menu)

$view_menu = GUICtrlCreateMenu("View")

$vm_status = GUICtrlCreateMenuItem("Status Bar", $view_menu)

GUICtrlSetState(-1, $GUI_CHECKED)

$tool_menu = GUICtrlCreateMenu("Tools")

$tm_pref = GUICtrlCreateMenuItem("Preferences...", $tool_menu)

$favorite_menu = GUICtrlCreateMenu("Favorites")

$tm_fave = GUICtrlCreateMenuItem($fav_menu , $favorite_menu)

$about_menu = GUICtrlCreateMenu("Help")

$am_about = GUICtrlCreateMenuItem("About", $about_menu)

$gui_iewindow = GUICtrlCreateObj($oIE, 0, 0, $read_width, $read_height - 45)

GUICtrlSetResizing($gui_iewindow, $GUI_DOCKAUTO)

$address_bar_label = GUICtrlCreateLabel("Enter Address: ", 0, 562, 85, -1)

;$urlz = _IEPropertyGet($oIE, "locationurl")

$address_bar_input = GUICtrlCreateInput($read_homepage, 76, 559, 200, -1)

;$address_bar_input = GUICtrlCreateInput($urlz, 76, 559, 200, -1)

$address_bar_go = GUICtrlCreateButton("Go >>", 280, 557, 50, -1, $BS_DEFPUSHBUTTON)

$address_bar_stop = GUICtrlCreateButton("Stop", 332, 557, 50, -1)

$address_bar_back = GUICtrlCreateButton("Back", 383, 557, 50, -1)

$address_bar_home = GUICtrlCreateButton("Home", 434, 557, 50, -1)

$address_bar_favsadd = GUICtrlCreateButton("Add to Favorites", 485, 557, 95, -1)

$status_bar = GUICtrlCreateLabel("Loading: " & $read_homepage & "...", 0, 584, $read_width, $read_height, BitOR($SS_SIMPLE, $SS_SUNKEN))

GUISetState(@SW_SHOW, $gui_main)

Fadein()

SoundPlay("C:\WINDOWS\Media\notify.wav", 0)

_IENavigate($oIE, $read_homepage)

_IELoadWaitTimeout (500)

_IELoadWait ($oIE)

$startz = _IEPropertyGet($oIE, "locationurl")

GUICtrlSetData ($address_bar_input , $startz)

$gui_pref = GUICreate("Preferences", 298, 230, 359, 233)

$group1 = GUICtrlCreateGroup("Settings", 16, 16, 265, 170)

$label_home = GUICtrlCreateLabel("Homepage:", 32, 40, 59, 17)

$input_add = GUICtrlCreateInput($read_homepage, 96, 40, 161, 21)

$label_start = GUICtrlCreateLabel("On Startup:", 32, 80, 58, 17)

$combo_startup = GUICtrlCreateCombo("", 96, 80, 161, 25)

If $read_starthomepage = "0" Then

GUICtrlSetData(-1, "Start with Homepage|Start with Blank Page", "Start with Blank Page")

Else

GUICtrlSetData(-1, "Start with Homepage|Start with Blank Page", "Start with Homepage")

EndIf

$pref_width_label = GUICtrlCreateLabel("Display Width", 32, 110, 58, 71)

$pref_width_input = GUICtrlCreateInput($read_width, 80, 115, 58, 20)

$pref_height_label = GUICtrlCreateLabel("Display Height", 32, 140, 58, 71)

$pref_height_input = GUICtrlCreateInput($read_height, 80, 145, 58, 20)

$button_apply = GUICtrlCreateButton("Apply", 120, 190, 75, 25, 0)

$button_close = GUICtrlCreateButton("Close", 208, 190, 75, 25, 0)

GUISetState(@SW_HIDE, $gui_pref)

While 1

If _IEPropertyGet($oIE, "busy") Then

$url = _IEPropertyGet($oIE, "locationurl")

_StatusChange("Loading: " & $url & "...")

Else

;$addyz = _IEPropertyGet($oIE, "locationurl")

;GUICtrlSetData ($address_bar_input , $addyz)

_StatusChange("Done..")

;$url = _IEPropertyGet($oIE, "locationurl")

;GUICtrlSetState($status_bar,$GUI_HIDE)

;GUICtrlSetData($status_bar, $url)

EndIf

$msg = GUIGetMsg()

Switch $msg

Case $GUI_EVENT_CLOSE

If WinGetHandle('') = $gui_main Then

;MsgBox(0, "Simple Web Browser", "Thank you for using Simple Web Browser")

;SoundPlay("C:\WINDOWS\Media\Windows XP Recycle.wav")

FadeOut()

Exit

Else

GUISetState(@SW_HIDE, WinGetHandle(''))

EndIf

;File Menu

Case $fm_exit

;MsgBox(0, "Simple Web Browser", "Thank you for using Simple Web Browser")

;SoundPlay("C:\WINDOWS\Media\Windows XP Recycle.wav")

FadeOut()

Exit

Case $fm_open

Local $file = FileOpenDialog("Select file...", @ScriptDir, "All Files (*.*)")

If @error <> 1 Then

_StatusChange("Loading: " & $file & "...")

_IENavigate($oIE, $file)

EndIf

Case $fm_print

_IEAction ($oIE, "print")

Case $fm_defprint

_IEAction ($oIE, "printdefault")

Case $fm_SavePage

_IEAction ($oIE, "saveas")

Case $fm_SaveSource

$source = InputBox("Simple Web Browser", "Whats is the Website URL you want to save the source from?")

$IE = _INetGetSource("" & $source & "")

FileWrite(@DesktopDir & "\websource.html", $IE)

MsgBox(0, "Simple Web Browser", "Saved to desktop as websource.html")

;View Menu

Case $vm_status

$size = WinGetPos("Simple Web Browser")

If BitAND(GUICtrlRead($vm_status), $GUI_CHECKED) = $GUI_CHECKED Then

GUICtrlSetState($vm_status, $GUI_UNCHECKED)

GUICtrlSetState($status_bar, $GUI_HIDE)

WinMove("Simple Web Browser", "", $size[0], $size[1], $size[2], $size[3] - 15)

Else

GUICtrlSetState($vm_status, $GUI_CHECKED)

GUICtrlSetState($status_bar, $GUI_SHOW)

WinMove("Simple Web Browser", "", $size[0], $size[1], $size[2], $size[3] + 15)

EndIf

; Favorites Menu

Case $tm_fave

_StatusChange("Loading: " & $fav_menu & "...")

_IENavigate($oIE, $fav_menu)

_IELoadWaitTimeout (500)

_IELoadWait ($oIE)

$addyz = _IEPropertyGet($oIE, "locationurl")

GUICtrlSetData ($address_bar_input , $addyz)

_StatusChange("Done.")

; Tools Menu

Case $tm_pref

GUISetState(@SW_SHOW, $gui_pref)

Case $button_close

GUISetState(@SW_HIDE, $gui_pref)

Case $button_apply

$getwidth = GUICtrlRead($pref_width_input)

$getheight = GUICtrlRead($pref_height_input)

IniWrite($ini, "Display", "Width", $getwidth)

IniWrite($ini, "Display", "Height", $getheight)

$gethome = GUICtrlRead($input_add)

$getstarthome = GUICtrlRead($combo_startup)

If $getstarthome = "Start with Homepage" Then

IniWrite($ini, "Settings", "StartHomepage", "1")

Else

IniWrite($ini, "Settings", "StartHomepage", "0")

EndIf

IniWrite($ini, "Settings", "Homepage", $gethome)

GUISetState(@SW_HIDE, $gui_pref)

_StatusChange("Configuration written successfully.")

Sleep(1000)

;About Menu

Case $am_about

MsgBox(0, "Simple Web Browser", "Simple Web Browser was created purely in AutoitV3.")

; Address Bar Buttons

Case $address_bar_go

$addy = GUICtrlRead($address_bar_input)

_StatusChange("Loading: " & $addy & "...")

_IENavigate($oIE, $addy, 0)

_IELoadWaitTimeout (500)

_IELoadWait ($oIE)

$goz = _IEPropertyGet($oIE, "locationurl")

GUICtrlSetData ($address_bar_input , $goz)

_StatusChange("Done.")

Case $address_bar_stop

_IEAction($oIE, "stop")

Case $address_bar_favsadd

$addy = GUICtrlRead($address_bar_input)

$file = FileOpen("Favs.ini", 1)

FileWriteLine($file, $addy)

;IniWrite($favs, "Links", "Link1", $addy)

Case $address_bar_back

_IEAction($oIE, "back")

_IELoadWaitTimeout (500)

_IELoadWait ($oIE)

$backz = _IEPropertyGet($oIE, "locationurl")

GUICtrlSetData ($address_bar_input , $backz)

Case $address_bar_home

_IENavigate($oIE, $read_homepage)

_IELoadWaitTimeout (500)

_IELoadWait ($oIE)

$homez = _IEPropertyGet($oIE, "locationurl")

GUICtrlSetData ($address_bar_input , $homez)

;GUICtrlSetData($address_bar_input, $read_homepage)

;Case $address_bar_speak

;$txt = InputBox("Simple Web Browser", "Text to Speech is still very limited. For now you have to enter text in here. Easy way is to copy and paste the text.")

;Dim $voice = ObjCreate("Sapi.SpVoice")

;$empty = ""

;$txt2 = "" & $txt & ""

;If $txt2 = $empty Then

;Speak("You did not put input.", 0, 100)

;Else

;Speak($txt2, 0, 100)

;EndIf

EndSwitch

WEnd

Func _StatusChange($message)

GUICtrlSetData($status_bar, $message)

EndFunc ;==>_StatusChange

Func Speak($text, $Rate, $Volme)

$voice.Rate = $Rate

$voice.Volume = $Volme

$voice.Speak($text)

EndFunc ;==>Speak

Func FadeOut()

For $i = 250 To 0 Step - 10

WinSetTrans("Simple Web Browser", "", $i)

Next

EndFunc ;==>FadeOut

Func Fadein()

For $i = 0 To 250 Step 10

WinSetTrans("Simple Web Browser", "", $i)

Next

EndFunc ;==>Fadein

Edited by Stealth111

Share this post


Link to post
Share on other sites

there ok, alot of the functions were took out. i like that the fact you dont have to wait for it to load. i'll update you after i look at the source code you just gave me..

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

cool! what all does your websuite have, sounds interesting!

Hopefully Web Browser, FTP, POP3 and SMTP Email, maybe IRC Chat... Mind helping code? (Check PM box)

Edit: Just wanted to say that all ive pretty much done is rename and give creds, probably going to copy the about message and update it =)

Edited by Bradness

My Programs:Rock Paper ScissorsMy UDFs:NONE

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  
Followers 0