kaotkbliss Posted December 11, 2009 Share Posted December 11, 2009 (edited) I'm using labels on a tab that are variable and depending on what buttons are pressed, the labels are changed. I don't want to use input boxes because of restrictions I want in place. the problem is, when I switch to a different tab, the labels are seen on the other tab as well. If I can't figure this out, then I will probably have to try and get everything in 1 window without tabs. expandcollapse popup#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <ChangeResolutionEx.au3> Global $name Global $curdeskW=@DesktopWidth Global $curdeskH=@DesktopHeight _ChangeScreenResEx(1,1024,768,-1,-1) Global $install=RegRead("HKEY_CURRENT_USER\SOFTWARE\Terisi","FilesDir") Global $character=IniRead($install&"\cdat.ini","Characters",1,"") Global $centerW=@DesktopWidth/2 Global $centerH=@DesktopHeight/2 GUICreate("Quest for Terisi",300,75,$centerW-150,$centerH-50) If $character="" Then $play=GUICtrlCreateButton("PLAY",30,25,50,25) GUICtrlSetState($play, $GUI_DISABLE) ElseIf $character<>"" Then $play=GUICtrlCreateButton("PLAY",30,25,50,25) EndIf $CC=GUICtrlCreateButton("Create Character",120,25,60,40,$BS_MULTILINE) $exit=GUICtrlCreateButton("Exit",215,25,50,25) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg=$CC Then GUIDelete() Character() ElseIf $msg=$exit Then _ChangeScreenResEx(1,$curdeskW,$curdeskH,-1,-1) Exit(1) ElseIf $msg=$play Then GUIDelete() game() ElseIf $msg=$GUI_EVENT_CLOSE Then _ChangeScreenResEx(1,$curdeskW,$curdeskH,-1,-1) Exit(1) EndIf WEnd Func Character() GUICreate("Character Creation",@DesktopWidth,@DesktopHeight,0,0) $tab=GUICtrlCreateTab(0.15*@DesktopWidth,0,0.70*@DesktopWidth,0.90*@DesktopHeight) $porttab=GUICtrlCreateTabItem("Portrait") $name=GUICtrlCreateInput("",$centerW-70,0.75*@desktopHeight,150,20) GUICtrlCreateLabel("Name",$centerW-10,0.78*@desktopheight) GUICtrlSetLimit ($name,25,3) $gender=GUICtrlCreateCombo("",0.70*@desktopwidth,0.25*@desktopHeight,75,20) GUICtrlSetData(-1, "Male|Female", "Male") GUICtrlCreateLabel("Profession",0.70*@desktopwidth,0.35*@desktopheight) $prof=GUICtrlCreateCombo("",0.70*@desktopwidth,0.37*@desktopHeight,100,20) GUICtrlSetData(-1, "Rune Crafter|Assassin|Weapon Crafter|Bodyguard|Hacker|Spell Weaver|Armor Crafter", "Bodyguard") $chartab=GUICtrlCreateTabItem("Stats") $ws=1 GUICtrlCreateLabel("Melee",650,100) $wslabel=GUICtrlCreateLabel($ws,750,100,12,12) $wsu=GUICtrlCreateButton("+",765,100,15,15) $wsd=GUICtrlCreateButton("-",785,100,15,15) GUICtrlSetState($wsd, $GUI_DISABLE) $bs=1 GUICtrlCreateLabel("Ranged",650,150) $bslabel=GUICtrlCreateLabel($bs,750,150,12,12) $bsu=GUICtrlCreateButton("+",765,150,15,15) $bsd=GUICtrlCreateButton("-",785,150,15,15) GUICtrlSetState($bsd, $GUI_DISABLE) $s=1 GUICtrlCreateLabel("Strength",650,200) $slabel=GUICtrlCreateLabel($s,750,200,12,12) $su=GUICtrlCreateButton("+",765,200,15,15) $sd=GUICtrlCreateButton("-",785,200,15,15) GUICtrlSetState($sd, $GUI_DISABLE) $agi=1 GUICtrlCreateLabel("Agility",650,250) $agilabel=GUICtrlCreateLabel($agi,750,250,12,12) $agiu=GUICtrlCreateButton("+",765,250,15,15) $agid=GUICtrlCreateButton("-",785,250,15,15) GUICtrlSetState($agid, $GUI_DISABLE) $t=1 GUICtrlCreateLabel("Toughness",650,300) $tlabel=GUICtrlCreateLabel($t,750,300,12,12) $tu=GUICtrlCreateButton("+",765,300,15,15) $td=GUICtrlCreateButton("-",785,300,15,15) GUICtrlSetState($td, $GUI_DISABLE) $w=1 GUICtrlCreateLabel("Health",650,350) $wlabel=GUICtrlCreateLabel($w,750,350,12,12) $wu=GUICtrlCreateButton("+",765,350,15,15) $wd=GUICtrlCreateButton("-",785,350,15,15) GUICtrlSetState($wd, $GUI_DISABLE) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi-$agi GUICtrlCreateLabel("Attribute Points Remaining",675,400) $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) GUISetState() ;$skilltab=GUICtrlCreateTabItem("Skills") GUICtrlCreateTabItem("") $done=GUICtrlCreateButton("Done",$centerW-25,0.90*@DesktopHeight, 50, 20) While 1 $msg = GUIGetMsg() If $msg = $wsu Then $ws=$ws+1 GUICtrlDelete($wslabel) GUICtrlDelete($attrpntlabel) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $wslabel=GUICtrlCreateLabel($ws,750,100,12,12) $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $wsd Then $ws=$ws-1 GUICtrlDelete($wslabel) GUICtrlDelete($attrpntlabel) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $wslabel=GUICtrlCreateLabel($ws,750,100,12,12) $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $bsu Then $bs=$bs+1 GUICtrlDelete($bslabel) GUICtrlDelete($attrpntlabel) $bslabel=GUICtrlCreateLabel($bs,750,150,12,12) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $bsd Then $bs=$bs-1 GUICtrlDelete($bslabel) GUICtrlDelete($attrpntlabel) $bslabel=GUICtrlCreateLabel($bs,750,150,12,12) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $sd Then $s=$s-1 GUICtrlDelete($slabel) GUICtrlDelete($attrpntlabel) $slabel=GUICtrlCreateLabel($s,750,200,12,12) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $su Then $s=$s+1 GUICtrlDelete($slabel) GUICtrlDelete($attrpntlabel) $slabel=GUICtrlCreateLabel($s,750,200,12,12) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $tu Then $t=$t+1 GUICtrlDelete($tlabel) GUICtrlDelete($attrpntlabel) $tlabel=GUICtrlCreateLabel($t,750,300,12,12) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $td Then $t=$t-1 GUICtrlDelete($tlabel) GUICtrlDelete($attrpntlabel) $tlabel=GUICtrlCreateLabel($t,750,300,12,12) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $wd Then $w=$w-1 GUICtrlDelete($wlabel) GUICtrlDelete($attrpntlabel) $wlabel=GUICtrlCreateLabel($w,750,350,12,12) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $wu Then $w=$w+1 GUICtrlDelete($wlabel) GUICtrlDelete($attrpntlabel) $wlabel=GUICtrlCreateLabel($w,750,350,12,12) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $agiu Then $agi=$agi+1 GUICtrlDelete($agilabel) GUICtrlDelete($attrpntlabel) $agilabel=GUICtrlCreateLabel($agi,750,250,12,12) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg = $agid Then $agi=$agi-1 GUICtrlDelete($agilabel) GUICtrlDelete($attrpntlabel) $agilabel=GUICtrlCreateLabel($agi,750,250,12,12) $attrpnt=30-$ws-$bs-$s-$t-$w-$agi $attrpntlabel=GUICtrlCreateLabel($attrpnt,735,425,12,12) If $attrpnt<>0 Then GUICtrlSetState($su, $GUI_ENABLE) GUICtrlSetState($bsu, $GUI_ENABLE) GUICtrlSetState($wsu, $GUI_ENABLE) GUICtrlSetState($tu, $GUI_ENABLE) GUICtrlSetState($wu, $GUI_ENABLE) GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $agi<2 Then GUICtrlSetState($agid, $GUI_DISABLE) ElseIf $agi>1 Then GUICtrlSetState($agid, $GUI_ENABLE) EndIf If $agi>17 Then GUICtrlSetState($agiu, $GUI_DISABLE) ElseIf $agi<18 Then GUICtrlSetState($agiu, $GUI_ENABLE) EndIf If $ws<2 Then GUICtrlSetState($wsd, $GUI_DISABLE) ElseIf $ws>1 Then GUICtrlSetState($wsd, $GUI_ENABLE) EndIf If $ws>17 Then GUICtrlSetState($wsu, $GUI_DISABLE) ElseIf $ws<18 Then GUICtrlSetState($wsu, $GUI_ENABLE) EndIf If $w<2 Then GUICtrlSetState($wd, $GUI_DISABLE) ElseIf $w>1 Then GUICtrlSetState($wd, $GUI_ENABLE) EndIf If $w>17 Then GUICtrlSetState($wu, $GUI_DISABLE) ElseIf $w<18 Then GUICtrlSetState($wu, $GUI_ENABLE) EndIf If $t<2 Then GUICtrlSetState($td, $GUI_DISABLE) ElseIf $t>1 Then GUICtrlSetState($td, $GUI_ENABLE) EndIf If $t>17 Then GUICtrlSetState($tu, $GUI_DISABLE) ElseIf $t<18 Then GUICtrlSetState($tu, $GUI_ENABLE) EndIf If $s<2 Then GUICtrlSetState($sd, $GUI_DISABLE) ElseIf $s>1 Then GUICtrlSetState($sd, $GUI_ENABLE) EndIf If $s>17 Then GUICtrlSetState($su, $GUI_DISABLE) ElseIf $s<18 Then GUICtrlSetState($su, $GUI_ENABLE) EndIf If $bs<2 Then GUICtrlSetState($bsd, $GUI_DISABLE) ElseIf $bs>1 Then GUICtrlSetState($bsd, $GUI_ENABLE) EndIf If $bs>17 Then GUICtrlSetState($bsu, $GUI_DISABLE) ElseIf $bs<18 Then GUICtrlSetState($bsu, $GUI_ENABLE) EndIf If $attrpnt=0 Then GUICtrlSetState($su, $GUI_DISABLE) GUICtrlSetState($bsu, $GUI_DISABLE) GUICtrlSetState($wsu, $GUI_DISABLE) GUICtrlSetState($tu, $GUI_DISABLE) GUICtrlSetState($wu, $GUI_DISABLE) GUICtrlSetState($agiu, $GUI_DISABLE) EndIf ElseIf $msg=$GUI_EVENT_CLOSE Then _ChangeScreenResEx(1,$curdeskW,$curdeskH,-1,-1) Exit(1) ElseIf $msg=$done Then $spot=1 $ccheck=IniRead($install&"\cdat.ini","Characters",$spot,"") While $ccheck<>"" If $ccheck<>"" Then $spot=$spot+1 EndIf $ccheck=IniRead($install&"\cdat.ini","Characters",$spot,"") WEnd IniWrite($install&"\cdat.ini","Characters",$spot,$name) IniWrite($install&"\cstat.ini",$name,1,$gender) IniWrite($install&"\cstat.ini",$name,2,$ws) IniWrite($install&"\cstat.ini",$name,3,$bs) IniWrite($install&"\cstat.ini",$name,4,$s) IniWrite($install&"\cstat.ini",$name,5,$t) IniWrite($install&"\cstat.ini",$name,6,$w) IniWrite($install&"\cstat.ini",$name,7,$prof) IniWrite($install&"\cstat.ini",$name,8,$agi) EndIf WEnd EndFunc Func game() EndFunc also if there is a better way to write some things, feel free to let me know, I am just a beginner. Edited November 4, 2010 by kaotkbliss 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 11, 2009 Share Posted December 11, 2009 It would probably be easier to update instead of recreating the labels, look at GUICtrlSetData in helpfile. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
kaotkbliss Posted December 11, 2009 Author Share Posted December 11, 2009 That's exactly what I was looking for! thanks! it took me a couple times of reading over the help file and then some experimenting to get it (help file wasn't very clear on this I don't think) 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! 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