KingBeavii Posted May 8, 2012 Posted May 8, 2012 (edited) **UPDATED*AGAIN**the config file is now optional, but should still use the same formatt...This fixes a few things that i noticed were buggy.========================[home]use= 1tag=Homeurl=http://www.google.com[cust1]use=1tag=AutoIturl=http://www.autoitscript.com========================you can set 6 custom ( [cust1] to [cust6] )and 1 home page.*oh look, there's a minimize button , how the Func did I forget that*the progress bar is gone, i just hated it , no questions please.*technically they're profiles and not tabs, they're still experimental*uses less memory - depending on the quality of the porntube video you are watchingAnd Finally with out further delay, Here is some code......expandcollapse popup#include <WindowsConstants.au3> ;~ #include <ButtonConstants.au3> ;~ #include <GUIConstants.au3> ;~ Files to be #include <WinAPI.au3> ;~ Included #include <Array.au3> ;~ #include <IE.au3> ;~ Global $OBJexists[10], $OBJbank[10] ,$OBJ[10] ,$page[10] , $link[7][3] ,$loads = 1 ,$x = 0 ,$tab = 0 ; Declared Variables $link[0][0] = IniRead(@scriptdir&"\config.ini","home","use","1") ; $link[0][1] = IniRead(@scriptdir&"\config.ini","home","tag","Home") ; Customise Hompage $link[0][2] = IniRead(@scriptdir&"\config.ini","home","url","http://www.google.com") ; $link[1][0] = IniRead(@scriptdir&"\config.ini","cust1","use","0") ; $link[1][1] = IniRead(@scriptdir&"\config.ini","cust1","tag","Custom 1") ; Custom Link 1 $link[1][2] = IniRead(@scriptdir&"\config.ini","cust1","url","http://www.google.com") ; $link[2][0] = IniRead(@scriptdir&"\config.ini","cust2","use","0") ; $link[2][1] = IniRead(@scriptdir&"\config.ini","cust2","tag","Custom 2") ; Custom Link 2 $link[2][2] = IniRead(@scriptdir&"\config.ini","cust2","url","http://www.google.com") ; $link[3][0] = IniRead(@scriptdir&"\config.ini","cust3","use","0") ; $link[3][1] = IniRead(@scriptdir&"\config.ini","cust3","tag","Custom 3") ; Custom Link 3 $link[3][2] = IniRead(@scriptdir&"\config.ini","cust3","url","http://www.google.com") ; $link[4][0] = IniRead(@scriptdir&"\config.ini","cust4","use","0") ; $link[4][1] = IniRead(@scriptdir&"\config.ini","cust4","tag","Custom 4") ; Custom Link 4 $link[4][2] = IniRead(@scriptdir&"\config.ini","cust4","url","http://www.google.com") ; $link[5][0] = IniRead(@scriptdir&"\config.ini","cust5","use","0") ; $link[5][1] = IniRead(@scriptdir&"\config.ini","cust5","tag","Custom 5") ; Custom Link 5 $link[5][2] = IniRead(@scriptdir&"\config.ini","cust5","url","http://www.google.com") ; $link[6][0] = IniRead(@scriptdir&"\config.ini","cust6","use","0") ; $link[6][1] = IniRead(@scriptdir&"\config.ini","cust6","tag","Custom 6") ; Custom Link 6 $link[6][2] = IniRead(@scriptdir&"\config.ini","cust6","url","http://www.google.com") ; $GUI = GUICreate("Easy Google", @DesktopWidth,@DesktopHeight-30,0,0,$WS_POPUP) ; Create Browser GUI GUISetFont(10,800) $back = GUICtrlCreateButton("<<" ,2 ,4 ,25 ,23) ; $forward = GUICtrlCreateButton(" >>" ,27 ,4 ,25 ,23) ; $tabdown = GUICtrlCreateButton("<" ,152 ,4 ,20 ,23) ; Navigation Buttons $ext = GUICtrlCreateButton("0" ,171 ,4 ,17 ,23) ; $tabup = GUICtrlCreateButton(" >" ,537 ,4 ,20 ,23) ; GUISetFont(8,600) $reload = GUICtrlCreateButton("Reload" ,52 ,4 ,50 ,23) ; $home = GUICtrlCreateButton($link[0][1] ,102 ,4 ,50 ,23) ; More Navigation $url = GUICtrlCreateButton("GO" ,557 ,4 ,30 ,23,$BS_DEFPUSHBUTTON) ; Select ; Case $link[1][0] = 1 ; $cust1 = GUICtrlCreateButton($link[1][1] ,587 + ($x*64) ,4 ,64 ,23) ; Custom Link 1 $x += 1 ; Button Case $link[1][0] <> 1 ; $cust1 = "none" ; EndSelect ; Select ; Case $link[2][0] = 1 ; $cust2 = GUICtrlCreateButton($link[2][1] ,587 + ($x*64) ,4 ,64 ,23) ; Custom Link 2 $x += 1 ; Button Case $link[2][0] <> 1 ; $cust2 = "none" ; EndSelect ; Select ; Case $link[3][0] = 1 ; $cust3 = GUICtrlCreateButton($link[3][1] ,587 + ($x*64) ,4 ,64 ,23) ; Custom Link 3 $x += 1 ; Button Case $link[3][0] <> 1 ; $cust3 = "none" ; EndSelect ; Select ; Case $link[4][0] = 1 ; $cust4 = GUICtrlCreateButton($link[4][1] ,587 + ($x*64) ,4 ,64 ,23) ; Custom Link 4 $x += 1 ; Button Case $link[4][0] <> 1 ; $cust4 = "none" ; EndSelect ; Select ; Case $link[5][0] = 1 ; $cust5 = GUICtrlCreateButton($link[5][1] ,587 + ($x*64) ,4 ,64 ,23) ; Custom Link 5 $x += 1 ; Button Case $link[5][0] <> 1 ; $cust5 = "none" ; EndSelect ; Select ; Case $link[6][0] = 1 ; $cust6 = GUICtrlCreateButton($link[6][1] ,587 + ($x*64) ,4 ,64 ,23) ; Custom Link 6 $x += 1 ; Button Case $link[6][0] <> 1 ; $cust6 = "none" ; EndSelect ; GUISetFont(28,1200) $minimize = GUICtrlCreateButton("-" ,@desktopwidth-45 ,4 ,21 ,23) ; Minimize GUISetFont(22,1200) $exit = GUICtrlCreateButton("X" ,@desktopwidth-24 ,4 ,21 ,23) ; Exit GUISetFont(9,800) $goto = GUICtrlCreateInput("http://", 188, 5, 349, 21) ; GO $text = $link[0][2] GUISetBkColor(0x00000F) $OBJ[$tab] = ObjCreate("Shell.Explorer.2") ; $OBJbank [$tab] = GUICtrlCreateObj ($OBJ[$tab],3, 31, @DesktopWidth-6, @DesktopHeight-65) ; Embed IE $OBJexists[$tab] = 1 ; GUISetState() _IENavigate($OBJ[$tab], $link[0][2] ,0) ; Go to 'HOMEPAGE' While 1 $http = _IEPropertyget($OBJ[$tab], "locationurl") ; If $http <> $text Then ; $text = $http ; Detect and refresh the adress bar $loads = $loads + 1 ; without interupting user input GUICtrlSetData($goto,$text) ; EndIf ; $msg = GUIGetMsg() Select Case $msg = $back ; Go Back (but only if a back exists) If $loads > 3 Then $OBJ[$tab].GoBack $loads -= 1 EndIf Case $msg = $forward ; Go Forward $OBJ[$tab].GoForward $loads += 1 Case $msg = $reload ; Refresh $OBJ[$tab].Refresh Case $msg = $home ; Home _IENavigate($OBJ[$tab], $link[0][2] ,0) $loads += 1 Case $msg = $cust1 ; Cust 1 If $link[1][0]=1 Then _IENavigate($OBJ[$tab], $link[1][2] ,0) $loads += 1 EndIf Case $msg = $cust2 ; Cust 2 If $link[2][0]=1 Then _IENavigate($OBJ[$tab], $link[2][2] ,0) $loads += 1 EndIf Case $msg = $cust3 If $link[3][0]=1 Then _IENavigate($OBJ[$tab], $link[3][2] ,0) EndIf Case $msg = $cust4 If $link[4][0]=1 Then _IENavigate($OBJ[$tab], $link[4][2] ,0) $loads += 1 EndIf Case $msg = $cust5 If $link[5][0]=1 Then _IENavigate($OBJ[$tab], $link[5][2] ,0) $loads += 1 EndIf Case $msg = $cust6 If $link[6][0]=1 Then _IENavigate($OBJ[$tab], $link[6][2] ,0) $loads += 1 EndIf Case $msg = $url $address = GUICtrlRead($goto) _IENavigate($OBJ[$tab], $address,0) $loads += 1 Case $msg = $tabup $page[$tab]= _IEPropertyget($OBJ[$tab], "locationurl") GUICtrlSetState($OBJbank[$tab],$GUI_HIDE) GUICtrlSetState($OBJbank[$tab],$GUI_DISABLE) $loads = 0 $tab = $tab + 1 If $tab = 10 then $tab = 9 GUICtrlSetData($ext,$tab) Select Case $OBJexists[$tab] <> 1 $OBJ[$tab] = ObjCreate("Shell.Explorer.2") $OBJexists[$tab] = 1 $OBJbank[$tab] = GUICtrlCreateObj($OBJ[$tab],3, 31, @DesktopWidth-6, @DesktopHeight-65) ;_IENavigate($OBJ[$tab], IniRead(@scriptdir&"\config.ini","home","url","http://www.google.com") ,0) Case $OBJexists[$tab] = 1 GUICtrlDelete($OBJbank[$tab]) $OBJbank[$tab] = GUICtrlCreateObj($OBJ[$tab],3, 31, @DesktopWidth-6, @DesktopHeight-65) _IENavigate($OBJ[$tab], $page[$tab],0) EndSelect Case $msg = $tabdown $page[$tab]= _IEPropertyget($OBJ[$tab], "locationurl") GUICtrlSetState($OBJbank[$tab],$GUI_HIDE) GUICtrlSetState($OBJbank[$tab],$GUI_DISABLE) $loads = 0 $tab = $tab - 1 If $tab = -1 then $tab = 0 GUICtrlSetData($ext,$tab) Select Case $OBJexists[$tab] <> 1 $OBJ[$tab] = ObjCreate("Shell.Explorer.2") $OBJexists[$tab] = 1 $OBJbank[$tab] = GUICtrlCreateObj($OBJ[$tab],3, 31, @DesktopWidth-6, @DesktopHeight-65) GUICtrlSetData($ext,$tab) ;_IENavigate($OBJ[$tab], IniRead(@scriptdir&"\config.ini","home","url","http://www.google.com") ,0) Case $OBJexists[$tab] = 1 GUICtrlDelete($OBJbank[$tab]) $OBJbank[$tab] = GUICtrlCreateObj($OBJ[$tab],3, 31, @DesktopWidth-6, @DesktopHeight-65) _IENavigate($OBJ[$tab], $page[$tab],0) EndSelect Case $msg = $ext $dump=MsgBox(4,"Easy Google","This will delete all memory from profile"&$tab&" and load a empty profile."&@CRLF&@CRLF&"Do you wish to continue",-1) If $dump = 6 Then $page[$tab] = "" GUICtrlDelete($OBJbank[$tab]) $OBJbank[$tab] = GUICtrlCreateObj($OBJ[$tab],3, 31, @DesktopWidth-6, @DesktopHeight-65) EndIf Case $msg = $exit exit Case $msg = $minimize WinSetState("Easy Google","",@SW_MINIMIZE) Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Edited May 13, 2012 by KingBeavii
JohnOne Posted May 8, 2012 Posted May 8, 2012 i dont know what actually should i do now,, but i hope you can share your code... i will not run program, that i dont know actual code from others.. So is your whole computer just full of autoit scripts?No exe files at all? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Moderators Melba23 Posted May 8, 2012 Moderators Posted May 8, 2012 knightz93 (and anyone else who might think of posting something similar), Take a look at this - and then keep quiet. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
knightz93 Posted May 8, 2012 Posted May 8, 2012 (edited) Actually i mean,, code from this forum,, sorry for my bad english... and sorry becuase forgot about that.. sorry... .. thanks M23... Edited May 8, 2012 by knightz93 [font=verdana,geneva,sans-serif]I will do my best in this forum [/font][font=verdana,geneva,sans-serif]my code :[/font] WindowsSwitcher3d()
KingBeavii Posted May 8, 2012 Author Posted May 8, 2012 Hey, Just to clarify, I Intend to release the source at a later date. At the moment there are still a couple of kinks in the chain, and the code looks like a cheese cake that fell from orbit. But as with all scripts I have done, Once I believe it is functioning as (or beyond) planned. A complete rewrite is performed to 'clean' the code. Normally this also allows me to find and fix bugs at the same time as i am getting to the point where i can run scripts in my head.....
guinness Posted May 8, 2012 Posted May 8, 2012 KingBeavii, One suggestion from me would be when there is focus in the URL input, when I hit the enter key it would be great to navigate to the website. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
KingBeavii Posted May 8, 2012 Author Posted May 8, 2012 KingBeavii,One suggestion from me would be when there is focus in the URL input, when I hit the enter key it would be great to navigate to the website.Yeah, Working on that.
guinness Posted May 10, 2012 Posted May 10, 2012 A couple of points:You're using Select...EndSelect when in fact you can use If...EndIf.$x = $x + 1 can be shortened to $x += 1.You're presuming the height of the taskbar for everyone is 30 pixels and that it is located at the bottom of the screen. Why not use _GetDesktopArea as this is the visible working area of the desktop.Why not use a Switch...EndSwitch statement instead for GUIGetMsg. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
KingBeavii Posted May 12, 2012 Author Posted May 12, 2012 Updated Again.....As usual edited first post to incorporate the changes,A couple of points:You're using Select...EndSelect when in fact you can use If...EndIf.$x = $x + 1 can be shortened to $x += 1.You're presuming the height of the taskbar for everyone is 30 pixels and that it is located at the bottom of the screen. Why not use _GetDesktopArea as this is the visible working area of the desktop.Why not use a Switch...EndSwitch statement instead for GUIGetMsg. It would be helpful to me if you quoted the sections you are discussing. I dont see where If, EndIf improves the script. It can be used yes, but will extend the length of the script by $n*if's - 2.I tested your _GetDesktopArea func but it caused the GUI to be created, but not appear. will have a second when i have time.
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