EscapeTheFate Posted October 8, 2007 Share Posted October 8, 2007 Okay well I'm having issues with the combo box..I tried to add in tabs and the combo box stopped working, as well, the user name label doesn't appear when you first start the script you have to go to the second tab then back to the first to see it..can anyone help please?CODE#include <IE.au3> #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <GUIDefaultConstants.au3> #include <AVIConstants.au3> #include <ComboConstants.au3> #include <DateTimeConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> #include <ListBoxConstants.au3> #include <ListViewConstants.au3> #include <SliderConstants.au3> #include <TreeViewConstants.au3> #include <UpDownConstants.au3> #include <GUIDefaultConstants.au3> #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <TabConstants.au3> #include <ProgressConstants.au3> #include <String.au3> #Include <GuiCombo.au3> $dir = "config" $parent1 = GUICreate("Program",295,450) $cancelbutton = GUICtrlCreateButton ( "Exit", 175, 385, 50) GUISetState (@SW_SHOW) Global $Tabs[6][4] Global $Tab2[6][4] Global $Tab3[6][4] Global $Tab4[6][4] ;;;;tab color ;;;login ;;;;login tab $font="Comic Sans MS" GUISetFont (10, 400, 2, $font) $t = "" $Tabs[0][0] = GUICtrlCreateTab (20, 20, 260,360) $Tabs[$t][0] = GUICtrlCreateTabitem ("Login " & $t) $Tabs[$t][1] = GUICtrlCreateLabel("User Name: ", 30, 65, 68, 15, $BS_CENTER) $Tabs[$t][2] = GUICtrlCreateLabel("", 109, 30, 100, 20, $BS_CENTER) $Tab2[0][0] = GUICtrlCreateTab (20, 20, 260,360) $Tab2[$t][0] = GUICtrlCreateTabitem ("Zone / Mob " & $t) GuiCtrlCreateGroup("Zone", 30, 295, 210, 40) GuiCtrlCreateGroup("Mob", 30, 335, 210, 40) $dir = "config" GUISetState (@SW_SHOW) GuiCtrlCreateGroup("Zone", 5, 295, 210, 40) GuiCtrlCreateGroup("Mob", 5, 335, 210, 40) Global $SelectaMob = " --Select a Mob--" $combozone = GUICtrlCreateCombo(" --Select a Zone--",10, 310, 200,-1) Dim $comboTalorn, $comboCatacombs Global $ZoneData = "Ta'lorn|Catacombs|Essence of Malice|The Shadowmist|-Starter zone-|Erathia's Magic Shop|Dwarven Armory|The Wilderness|Enchanted Forest|Bladeforge|Royal University|The Jail|Demon Gate|Forest of Jewels" Global $TalornData = "Snotling Armsbearer|Skulking Minion|Druchii Guardsman|Goblin Swordstealer|Accolyte of Darkness|Skaven Fleshweaver|Deathkissed Druid|Lamia Darkmaiden|Merciless Maidenslayer|Maniacal Paladin|Fallen Templar" Global $CatacombsData = "Hellfire Wurm|Wizard of Thunder|Leviathan|Flowstone Behemoth|Emerald Drake|Defiler of Justice|Soothsayer of Fate|Arbiter of Time|Soothsayer of Fate|Arbiter of Time" GUICtrlSetData($combozone,$ZoneData,$SelectaMob) while 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE or $msg = $cancelbutton Then ExitLoop Select Case $msg = $combozone GUICtrlDelete($comboCatacombs) GUICtrlDelete($comboTalorn) If GUICtrlRead($combozone) = "Ta'lorn" Then IniWrite($dir,"Zone","Zone","1") $comboTalorn = GUICtrlCreateCombo($SelectaMob,10, 350, 200,-1) GUICtrlSetData($comboTalorn,$TalornData,$SelectaMob) EndIf If GUICtrlRead($combozone) = "Catacombs" Then IniWrite($dir,"Zone","Zone","2") $comboCatacombs = GUICtrlCreateCombo($SelectaMob,10, 350, 200,-1) GUICtrlSetData($comboCatacombs,$CatacombsData,$SelectaMob) EndIf Case $msg = $comboTalorn $Pick = _GUICtrlComboGetCurSel($comboTalorn) If $Pick > 0 Then IniWrite($dir,"Zone","Mob",$Pick) EndIf Case $msg = $comboCatacombs $Pick = _GUICtrlComboGetCurSel($comboCatacombs) If $Pick > 0 Then IniWrite($dir,"Zone","Mob",$Pick) EndIf EndSelect WEnd $Tab2[$t][1] = GUICtrlCreateLabel("", 14, 30, 90, 20, $BS_CENTER) $Tab2[$t][2] = GUICtrlCreateLabel("", 109, 30, 100, 20, $BS_CENTER) sleep(10000000000) Link to comment Share on other sites More sharing options...
Nahuel Posted October 8, 2007 Share Posted October 8, 2007 Download Koda http://www.autoitscript.com/forum/index.php?showtopic=32299 It will help you. Link to comment Share on other sites More sharing options...
EscapeTheFate Posted October 8, 2007 Author Share Posted October 8, 2007 that just makes it so much more confusing :s Link to comment Share on other sites More sharing options...
Bert Posted October 8, 2007 Share Posted October 8, 2007 dude, your code is a mess. I'm trying to clean it up, but it will take a few minutes The Vollatran project  My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
EscapeTheFate Posted October 8, 2007 Author Share Posted October 8, 2007 Thanks alot! and I know I'm just starting to use autoit to write my own scripts...and I haven't learnt much sofar haha Link to comment Share on other sites More sharing options...
Bert Posted October 8, 2007 Share Posted October 8, 2007 I cleaned it up a bit, but you will need to do the rest. this should give you some direction. expandcollapse popup#include <IE.au3> #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #Include <GuiCombo.au3> Dim $comboTalorn, $comboCatacombs Global $ZoneData = "Ta'lorn|Catacombs|Essence of Malice|The Shadowmist|-Starter zone-|Erathia's Magic Shop|Dwarven Armory|The Wilderness|Enchanted Forest|Bladeforge|Royal University|The Jail|Demon Gate|Forest of Jewels" Global $TalornData = "Snotling Armsbearer|Skulking Minion|Druchii Guardsman|Goblin Swordstealer|Accolyte of Darkness|Skaven Fleshweaver|Deathkissed Druid|Lamia Darkmaiden|Merciless Maidenslayer|Maniacal Paladin|Fallen Templar" Global $CatacombsData = "Hellfire Wurm|Wizard of Thunder|Leviathan|Flowstone Behemoth|Emerald Drake|Defiler of Justice|Soothsayer of Fate|Arbiter of Time|Soothsayer of Fate|Arbiter of Time" Global $SelectaMob = " --Select a Mob--" Global $Tabs[6][4], $Tab2[6][4], $Tab3[6][4], $Tab4[6][4], $setfont ;;;;tab color ;;;login ;;;;login tab $t = "" $font="Comic Sans MS" $dir = "config" $parent1 = GUICreate("Program",295,450) $cancelbutton = GUICtrlCreateButton ( "Exit", 230, 415, 50) $Tabs[0][0] = GUICtrlCreateTab (20, 20, 260,390) $Tabs[$t][0] = GUICtrlCreateTabitem ("Login " & $t) $Tabs[$t][1] = GUICtrlCreateLabel("User Name: ", 30, 65, 68, 15, $BS_CENTER) $Tabs[$t][2] = GUICtrlCreateLabel("", 109, 65, 160, 20, $BS_CENTER+$SS_BLACKFRAME) $Tab2[$t][0] = GUICtrlCreateTabitem ("Zone / Mob " & $t) GuiCtrlCreateGroup("Zone", 30, 295, 240, 40) GuiCtrlCreateGroup("Mob", 30, 335, 240, 40) ;GuiCtrlCreateGroup("Zone", 5, 295, 210, 40) ;~ GuiCtrlCreateGroup("Mob", 5, 335, 210, 40) $combozone = GUICtrlCreateCombo(" --Select a Zone--",40, 310, 220,-1) ;~ $Tab2[$t][1] = GUICtrlCreateLabel("", 14, 30, 90, 20, $BS_CENTER) ;~ $Tab2[$t][2] = GUICtrlCreateLabel("", 109, 30, 100, 20, $BS_CENTER) GUICtrlSetData($combozone,$ZoneData,$SelectaMob) $setfont = GUISetFont (9, 400, 2, $font) GUISetState () while 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE or $msg = $cancelbutton ExitLoop Case $msg = $combozone GUICtrlDelete($comboCatacombs) GUICtrlDelete($comboTalorn) If GUICtrlRead($combozone) = "Ta'lorn" Then IniWrite($dir,"Zone","Zone","1") $comboTalorn = GUICtrlCreateCombo($SelectaMob,40, 350, 220,18) GUICtrlSetData($comboTalorn,$TalornData,$SelectaMob) EndIf If GUICtrlRead($combozone) = "Catacombs" Then IniWrite($dir,"Zone","Zone","2") $comboCatacombs = GUICtrlCreateCombo($SelectaMob,40, 350, 220,18) GUICtrlSetData($comboCatacombs,$CatacombsData,$SelectaMob) EndIf Case $msg = $comboTalorn $Pick = _GUICtrlComboGetCurSel($comboTalorn) If $Pick > 0 Then IniWrite($dir,"Zone","Mob",$Pick) EndIf Case $msg = $comboCatacombs $Pick = _GUICtrlComboGetCurSel($comboCatacombs) If $Pick > 0 Then IniWrite($dir,"Zone","Mob",$Pick) EndIf EndSelect WEnd The Vollatran project  My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Nahuel Posted October 8, 2007 Share Posted October 8, 2007 Aw, you beat me Anyway, here's mine expandcollapse popup#include <GUIConstants.au3> #include <ComboConstants.au3> #Include <GuiCombo.au3> $dir = "config" $t = "" Global $Tabs[6][4] Global $Tab2[6][4] Global $Tab3[6][4] Global $Tab4[6][4] Dim $comboTalorn, $comboCatacombs Global $ZoneData = "Ta'lorn|Catacombs|Essence of Malice|The Shadowmist|-Starter zone-|Erathia's Magic Shop|Dwarven Armory|The Wilderness|Enchanted Forest|Bladeforge|Royal University|The Jail|Demon Gate|Forest of Jewels" Global $TalornData = "Snotling Armsbearer|Skulking Minion|Druchii Guardsman|Goblin Swordstealer|Accolyte of Darkness|Skaven Fleshweaver|Deathkissed Druid|Lamia Darkmaiden|Merciless Maidenslayer|Maniacal Paladin|Fallen Templar" Global $CatacombsData = "Hellfire Wurm|Wizard of Thunder|Leviathan|Flowstone Behemoth|Emerald Drake|Defiler of Justice|Soothsayer of Fate|Arbiter of Time|Soothsayer of Fate|Arbiter of Time" Global $SelectaMob = " --Select a Mob--" #Region ### START Koda GUI section ### Form= $parent1 = GUICreate("Program", 299, 427, 256, 98) $Tabs[0][0]= GUICtrlCreateTab(8, 16, 281, 353) $Tabs[$t][0] = GUICtrlCreateTabItem("Login") $Tabs[$t][1] = GUICtrlCreateLabel("Username", 24, 72, 52, 17) $Tabs[$t][2] = GUICtrlCreateLabel("Password", 24, 104, 50, 17) $Input1 = GUICtrlCreateInput("My Username", 80, 72, 121, 21) $Input2 = GUICtrlCreateInput("MyPassword", 80, 104, 121, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) $Group1 = GUICtrlCreateGroup("Login", 16, 48, 265, 89) $Tab2[$t][0] = GUICtrlCreateTabItem("Zone/Mab") $Group2 = GUICtrlCreateGroup("Zone", 24, 64, 249, 73) $Group3 = GUICtrlCreateGroup("Mab", 24, 144, 249, 73) $combozone = GUICtrlCreateCombo("-Select a Zone-", 32, 96, 177, 100) GUICtrlSetData($combozone,$ZoneData) $comboTalorn = GUICtrlCreateCombo($SelectaMob, 32, 176, 177, 100) GUICtrlSetState(-1,$GUI_DISABLE) GUICtrlCreateGroup("Catacombs", 24, 224, 249, 73) $comboCatacombs = GUICtrlCreateCombo($SelectaMob, 32, 256, 177, 100) GUICtrlSetState(-1,$GUI_DISABLE) GUICtrlCreateTabItem("") $cancelbutton = GUICtrlCreateButton("Exit", 208, 384, 81, 33, $BS_DEFPUSHBUTTON) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $font="Comic Sans MS" GUISetFont (10, 400, 2, $font) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $combozone If GUICtrlRead($combozone) = "Ta'lorn" Then IniWrite($dir,"Zone","Zone","1") GUICtrlSetState($comboTalorn,$GUI_ENABLE) GUICtrlSetData($comboTalorn,$TalornData,$SelectaMob) EndIf If GUICtrlRead($combozone) = "Catacombs" Then IniWrite($dir,"Zone","Zone","2") GUICtrlSetState($comboCatacombs,$GUI_ENABLE) GUICtrlSetData($comboCatacombs,$CatacombsData,$SelectaMob) EndIf Case $comboTalorn $Pick = _GUICtrlComboGetCurSel($comboTalorn) If $Pick > 0 Then IniWrite($dir,"Zone","Mob",$Pick) EndIf Case $comboCatacombs $Pick = _GUICtrlComboGetCurSel($comboCatacombs) If $Pick > 0 Then IniWrite($dir,"Zone","Mob",$Pick) EndIf Case $cancelbutton Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
EscapeTheFate Posted October 8, 2007 Author Share Posted October 8, 2007 wow thanks both of you so much and now I see what I was doing wrong haha 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