LordJugag Posted October 11, 2010 Share Posted October 11, 2010 My source is below... expandcollapse popup#NoTrayIcon #Include <INet.au3> #Include <String.au3> #include <GUIConstantsEx.au3> Global $oIE = ObjCreate("Shell.Explorer.2") Global $ini = "C:\Browser Database\Log.ini" Global $db = "C:\Browser Database\Database.ini" Global $_Next 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 $read_firstrecruit = IniRead($ini, "RECOMMENDATION", "FAVORIT", "") 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 = "http://www.google.com" EndIf If $read_firstrecruit = "" Then IniWrite($ini, "RECOMMENDATION", "FAVORIT", "http://www.autoitscript.com") EndIf $iniread = IniRead($ini, "URL", "LAST URL", "") If $read_starthomepage = "0" Then $read_homepage = $iniread $gui_main = GUICreate("", $read_width, $read_height + 20, -1, -1, 0x04000000 + 0x00CF0000) $file_menu = GUICtrlCreateMenu("File") $fm_open = GUICtrlCreateMenuItem("Open", $file_menu) $fm_sep = GUICtrlCreateMenuItem("", $file_menu) $fm_print = GUICtrlCreateMenuItem("Print", $file_menu) $fm_sep = GUICtrlCreateMenuItem("", $file_menu) $fm_savas = GUICtrlCreateMenuItem("Save As", $file_menu) $fm_SaveSource = GUICtrlCreateMenuItem("Save Source", $file_menu) $fm_sep = GUICtrlCreateMenuItem("", $file_menu) $fm_exit = GUICtrlCreateMenuItem("Exit", $file_menu) $fav_menu = GUICtrlCreateMenu("Favorites") $fav1 = GUICtrlCreateMenuItem("Google", $fav_menu) $fav2 = GUICtrlCreateMenuItem("AutoIT", $fav_menu) $tool_menu = GUICtrlCreateMenu("Recommendation") $tm_recommendation = GUICtrlCreateMenuItem("Recommend", $tool_menu) $about_menu = GUICtrlCreateMenu("About") $am_about = GUICtrlCreateMenuItem("About", $about_menu) $gui_iewindow = GUICtrlCreateObj($oIE, 0, 0, $read_width, $read_height - 15) GUICtrlSetResizing($gui_iewindow, 0x0001) $status_bar = GUICtrlCreateLabel("Loading: " & $read_homepage & "...", 0, 584, $read_width, $read_height, BitOR(11, 0x1000)) GUISetState() AnimateTitle($gui_main, "Browser - Created by Justin Reno/Modified by LordJugag", 100) $oIE.Navigate ($read_homepage) While 1 WinSetTitle($gui_main, "", "Browser - Created by Justin Reno/Modified by LordJugag - " & $oIE.locationURL ()) If $oIE.Busy () Then $url = $oIE.LocationURL () _StatusChange("Loading: " & $url & "...") Else _StatusChange("Done.") EndIf $msg = GUIGetMsg(1) Switch $msg[0] Case - 3 $update = $oIE.LocationURL () IniWrite($ini, "URL", "LAST URL", $update) Exit ;File Menu Case $fm_open Local $file = FileOpenDialog("Browser : Select file", @ScriptDir, "All Files (*.*)") If @error <> 1 Then _StatusChange("Loading: " & $file & "...") $oIE.Navigate ($file) EndIf Case $fm_print $oIE.document.parentwindow.Print () Case $fm_savas $oIE.document.execCommand ("SaveAs") Case $fm_SaveSource $IE = _INetGetSource("" & $update & "") FileWrite(@DesktopDir & "\websource.html", $IE) MsgBox(0, "Browser", "Saved to desktop as websource.html") Case $fm_exit $update = $oIE.LocationURL () IniWrite($ini, "URL", "LAST URL", $update) Exit ;Favorites Menu Case $fav1 $oIE.Navigate ("http://www.google.com") Case $fav2 $oIE.Navigate ("http://www.autoitscript.com") ;Recruiter Menu Case $tm_recommendation _Recommendation() $url = "http://aorr.110mb.com/Local Database.ini" $folder = "C:\Browser Database\" If Not FileExists($folder) Then DirCreate($folder) ;InetGet doesn't create the destination folder for you. InetGet($url,$folder & StringTrimLeft($url,StringInStr($url,"/",Default,-1))) ;About Menu Case $am_about MsgBox ( 0, 'About', 'Browser - version alpha') EndSwitch WEnd Func _StatusChange($message) GUICtrlSetData($status_bar, $message) EndFunc ;==>_StatusChange Func _Recommendation() $_Next = $_Next + 1 If $_Next > 9 Then GUICtrlSetState ( $tm_recommendation, $GUI_DISABLE ) MsgBox ( 0, 'Recommendation', 'Please try again later' ) EndIf ConsoleWrite ( "$_Next : " & $_Next & @Crlf ) Switch $_Next Case 1 $oIE.Navigate (IniRead($ini, "RECOMMENDATION", "FAVORIT", "")) Case 2 $oIE.Navigate (IniRead($db, "RECOMMENDATION", "RECOMMEND_1", "")) Case 3 $oIE.Navigate (IniRead($db, "RECOMMENDATION", "RECOMMEND_2", "")) Case 4 $oIE.Navigate (IniRead($db, "RECOMMENDATION", "RECOMMEND_3", "")) Case 5 $oIE.Navigate (IniRead($db, "RECOMMENDATION", "RECOMMEND_4", "")) Case 6 $oIE.Navigate (IniRead($db, "RECOMMENDATION", "RECOMMEND_5", "")) Case 7 $oIE.Navigate (IniRead($db, "RECOMMENDATION", "RECOMMEND_6", "")) Case 8 $oIE.Navigate (IniRead($db, "RECOMMENDATION", "RECOMMEND_7", "")) Case 9 $oIE.Navigate (IniRead($db, "RECOMMENDATION", "RECOMMEND_8", "")) EndSwitch EndFunc ;==>_Recommendation Func AnimateTitle($hGUI, $sTitle, $iBuf) $sTitle = StringSplit($sTitle, "") For $i = $iBuf To 0 Step - 1 WinSetTitle($hGUI, "", _StringRepeat(" ", $i) & $sTitle[1]) Next Local $s For $i = 1 To $sTitle[0] $s &= $sTitle[$i] WinSetTitle($hGUI, "", $s) Sleep(5) Next EndFunc ;==>AnimateTitle My Goals: 1) To use for Username Profile with instruction GuiCtrlCreateCombo or else, and instruction IniRead for read to read the list of users from a file located on server. 2) Counting visits to recommended addresses ==> Menu: Recommendation/Recommend, and sends information with result from count to a file located on server. I mention that I would like to count for each username profile, to see which is visitor and not. Not a created file to the list of users and counter, and I'd like to be an INI file or EXCEL Link to comment Share on other sites More sharing options...
LordJugag Posted October 18, 2010 Author Share Posted October 18, 2010 BUMP 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