acidfear Posted January 17, 2007 Posted January 17, 2007 (edited) I've tried searching around and haven't found a soultion yet. I tired using guiswitch but it didn't work. My questions is, how do i get the 2 (or more later on) tabs to show the same menu ? All the options of the 'URLS" tab on the "Leeched" tab, the buttons and progress bar and list? expandcollapse popup#include <GUIConstants.au3> ;=================================GUI========================================= $Form1 = GUICreate("PoXee", 358, 444, 201, 125) $menu = GUICtrlCreateMenu("&File") $eMenu = GUICtrlCreateMenuitem("Exit",$menu) $hMenu = GUICtrlCreateMenu("&Help") $aMenu = GUICtrlCreateMenuitem("About", $hMenu) $tab = GUICtrlCreateTab(0, 48, 100, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $tab1 = GUICtrlCreateTabItem("Leeched") $tab2 = GUICtrlCreateTabItem("URLS") $progress = GUICtrlCreateProgress(0, 0, 353, 9) GUICtrlSetData(-1, 25) $pList = GUICtrlCreateList("", 0, 64, 353, 357) $pLabel = GUICtrlCreateLabel("", 0, 424, 187, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $nLabel = GUICtrlCreateLabel("", 192, 424, 163, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $save = GUICtrlCreateButton("Save", 296, 16, 57, 17, 0) $exit = GUICtrlCreateButton("Exit", 296, 40, 57, 17, 0) $load = GUICtrlCreateButton("Load", 216, 16, 57, 17, 0) $clear = GUICtrlCreateButton("Clear", 216, 40, 57, 17, 0) $leech = GUICtrlCreateButton("Leech", 144, 24, 57, 17, 0) GUICtrlCreateTabitem ("") ;============================================================================== GUISetState(@sw_show) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $exit ExitLoop Case $msg = $tab if guictrlread($tab) = 1 then WinSetTitle("URLS","","") if guictrlread($tab) = 2 Then WinSetTitle("LEECHED", "","") Case Else ;;; EndSelect WEnd Edited January 17, 2007 by acidfear
Moderators SmOke_N Posted January 17, 2007 Moderators Posted January 17, 2007 (edited) Not quite sure on what you mean:CODEexpandcollapse popup#include <GUIConstants.au3> ;=================================GUI========================================= $Form1 = GUICreate("PoXee", 358, 444, 201, 125) $menu = GUICtrlCreateMenu("&File") $eMenu = GUICtrlCreateMenuitem("Exit",$menu) $hMenu = GUICtrlCreateMenu("&Help") $aMenu = GUICtrlCreateMenuitem("About", $hMenu) $progress = GUICtrlCreateProgress(0, 0, 353, 9) GUICtrlSetData(-1, 25) $pList = GUICtrlCreateList("", 0, 64, 353, 357) $pLabel = GUICtrlCreateLabel("", 0, 424, 187, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $nLabel = GUICtrlCreateLabel("", 192, 424, 163, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $save = GUICtrlCreateButton("Save", 296, 16, 57, 17, 0) $exit = GUICtrlCreateButton("Exit", 296, 40, 57, 17, 0) $load = GUICtrlCreateButton("Load", 216, 16, 57, 17, 0) $clear = GUICtrlCreateButton("Clear", 216, 40, 57, 17, 0) $leech = GUICtrlCreateButton("Leech", 144, 24, 57, 17, 0) $tab = GUICtrlCreateTab(0, 48, 100, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $tab1 = GUICtrlCreateTabItem("Leeched") $tab2 = GUICtrlCreateTabItem("URLS") GUICtrlCreateTabitem ("") ;============================================================================== GUISetState(@sw_show) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $exit ExitLoop Case $msg = $tab if guictrlread($tab) = 1 then WinSetTitle("URLS","","") if guictrlread($tab) = 2 Then WinSetTitle("LEECHED", "","") Case Else ;;; EndSelect WEndoÝ÷ Û÷(uæèÄêܡף®¶sb6æ6ÇVFRfÇC´uT6öç7FçG2æS2fwC° £³ÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÔuTÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓТb33c´f÷&ÓÒuT7&VFRgV÷CµõVRgV÷C²Â3SÂCCBÂ#Â#R¢b33c¶ÖVçRÒuT7G&Ä7&VFTÖVçRgV÷C²f×´fÆRgV÷C²¢b33c¶TÖVçRÒuT7G&Ä7&VFTÖVçVFVÒgV÷C´WBgV÷C²Âb33c¶ÖVçR¢b33c¶ÖVçRÒuT7G&Ä7&VFTÖVçRgV÷C²f×´VÇgV÷C²¢b33c¶ÖVçRÒuT7G&Ä7&VFTÖVçVFVÒgV÷C´&÷WBgV÷C²Âb33c¶ÖVçR¢b33c·F"ÒuT7G&Ä7&VFUF"ÂCÂÂr¤uT7G&Å6WDföçBÓÂÂCÂÂgV÷CµFöÖgV÷C²¢b33c·&öw&W72ÒuT7G&Ä7&VFU&öw&W72ÂÂ3S2¤uT7G&Å6WDFFÓÂ#R¢b33c·Æ7BÒuT7G&Ä7&VFTÆ7BgV÷C²gV÷C²ÂÂcBÂ3S2Â3Sr¢b33c·Æ&VÂÒuT7G&Ä7&VFTÆ&VÂgV÷C²gV÷C²ÂÂC#BÂrÂr¤uT7G&Å6WDföçBÓÂÂCÂÂgV÷CµFöÖgV÷C²¢b33c¶äÆ&VÂÒuT7G&Ä7&VFTÆ&VÂgV÷C²gV÷C²Â"ÂC#BÂc2Âr¤uT7G&Å6WDföçBÓÂÂCÂÂgV÷CµFöÖgV÷C²¢b33c·6fRÒuT7G&Ä7&VFT'WGFöâgV÷Cµ6fRgV÷C²Â#bÂbÂSrÂr¢b33c¶WBÒuT7G&Ä7&VFT'WGFöâgV÷C´WBgV÷C²Â#bÂCÂSrÂr¢b33c¶ÆöBÒuT7G&Ä7&VFT'WGFöâgV÷C´ÆöBgV÷C²Â#bÂbÂSrÂr¢b33c¶6ÆV"ÒuT7G&Ä7&VFT'WGFöâgV÷C´6ÆV"gV÷C²Â#bÂCÂSrÂr¢b33c¶ÆVV6ÒuT7G&Ä7&VFT'WGFöâgV÷C´ÆVV6gV÷C²ÂCBÂ#BÂSrÂr¢b33c·F#ÒuT7G&Ä7&VFUF$FVÒgV÷C´ÆVV6VBgV÷C²¢b33c·F#"ÒuT7G&Ä7&VFUF$FVÒgV÷CµU$Å2gV÷C²¤uT7G&Ä7&VFUF&FVÒgV÷C²gV÷C²£³ÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓФuT6WE7FFR7u÷6÷r ¥vÆR¢b33c¶×6rÒuTvWD×6r¢6VÆV7@¢66Rb33c¶×6rÒb33c´uTôUdTåEô4Äõ4P¢WDÆö÷¢66Rb33c¶×6rÒb33c¶W@¢WDÆö÷¢66Rb33c¶×6rÒb33c·F ¢bwV7G&Ç&VBb33c·F"ÒFVâvå6WEFFÆRgV÷CµU$Å2gV÷C²ÂgV÷C²gV÷C²ÂgV÷C²gV÷C²¢bwV7G&Ç&VBb33c·F"Ò"FVâvå6WEFFÆRgV÷C´ÄTT4TBgV÷C²ÂgV÷C²gV÷C²ÂgV÷C²gV÷C²¢¢¢¢¢¢66RVÇ6P¢³³°¢VæE6VÆV7@¥tVæ? Edit: Added Codeboxes Edit2: Posted the same example twice Edited January 17, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
acidfear Posted January 17, 2007 Author Posted January 17, 2007 (edited) The first block of code you wrote works perfect, just what i needed. The second block doesn't though. Thanks !!! Was all i had to do is add the "" to the if statements? If i wanted to add a input box on the URLS tab, how could i do it without it showing up on the Leech tab? You don't have to give any code, maybe some functions that could help. Edited January 17, 2007 by acidfear
Moderators SmOke_N Posted January 17, 2007 Moderators Posted January 17, 2007 The first block of code you wrote works perfect, just what i needed. The second block doesn't though. Thanks !!!They both work now... I don't know what the hell I was doing, but I kept posting your original code. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
acidfear Posted January 17, 2007 Author Posted January 17, 2007 Ok, I've arised at another problem :/. The tabs both show each default layout just fine. But when I add to the listbox in the url tab, it also shows the results on the Leech tab. Is there an effective way of preventing this?
Moderators SmOke_N Posted January 17, 2007 Moderators Posted January 17, 2007 Ok, I've arised at another problem :/. The tabs both show each default layout just fine. But when I add to the listbox in the url tab, it also shows the results on the Leech tab. Is there an effective way of preventing this?When you need something tab specific, then just create it under the specific tab. If you need something in general for all tabs, then create it before or after the tabs. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Paulie Posted January 17, 2007 Posted January 17, 2007 (edited) Ok, I've arised at another problem :/. The tabs both show each default layout just fine. But when I add to the listbox in the url tab, it also shows the results on the Leech tab. Is there an effective way of preventing this?Isn't that exactly what you wanted to happen in the first question?You basically just asked for a cheeseburger without cheese.Then again, I can't help you much, so i don't have much room to talk :"> Edited January 17, 2007 by Paulie
CompWiz Posted January 17, 2007 Posted January 17, 2007 If you want to add an Input Box or any other command that will only show up on one tab its simple. All you need to do is place the code under the GUICtrlCreateTabItem for the tab you want it on. I added an Input Box on the URLs tab in the code below but I took out your list that was there becase two controls over lapping is not a good thing and I didn't know where you wanted it to show up so just add it back in where ever you need it. CODE#include <GUIConstants.au3> ;=================================GUI========================================= $Form1 = GUICreate("PoXee", 358, 444, 201, 125) $menu = GUICtrlCreateMenu("&File") $eMenu = GUICtrlCreateMenuitem("Exit",$menu) $hMenu = GUICtrlCreateMenu("&Help") $aMenu = GUICtrlCreateMenuitem("About", $hMenu) $tab = GUICtrlCreateTab(0, 48, 100, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $progress = GUICtrlCreateProgress(0, 0, 353, 9) GUICtrlSetData(-1, 25) ;$pList = GUICtrlCreateList("", 0, 64, 353, 357) $pLabel = GUICtrlCreateLabel("", 0, 424, 187, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $nLabel = GUICtrlCreateLabel("", 192, 424, 163, 17) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") $save = GUICtrlCreateButton("Save", 296, 16, 57, 17, 0) $exit = GUICtrlCreateButton("Exit", 296, 40, 57, 17, 0) $load = GUICtrlCreateButton("Load", 216, 16, 57, 17, 0) $clear = GUICtrlCreateButton("Clear", 216, 40, 57, 17, 0) $leech = GUICtrlCreateButton("Leech", 144, 24, 57, 17, 0) $tab1 = GUICtrlCreateTabItem("Leeched") ;add any code here you want and it will only show up on the Leeched tab $tab2 = GUICtrlCreateTabItem("URLS") $input = GUICtrlCreateInput("Text Here", 15, 100, 200, 17) ;add any code here and it will only show up on the URLs tab GUICtrlCreateTabitem ("") ;============================================================================== GUISetState(@sw_show) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $exit ExitLoop Case $msg = $tab if guictrlread($tab) = 1 then WinSetTitle("URLS","","") if guictrlread($tab) = 2 Then WinSetTitle("LEECHED", "","") Case Else ;;; EndSelect WEnd
acidfear Posted January 17, 2007 Author Posted January 17, 2007 (edited) Yeah, I am starting to grab a hold of how these tabs are starting to work. It took a couple of reviews over the fixed code for me to realize it. I now realize how simple my problem was to fix. Thanks for taking the time to help! Edited January 17, 2007 by acidfear
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