Sign in to follow this  
Followers 0
Gid

Extra Children Found

3 posts in this topic

I set up this simple script that has multiple children... 15 to be exact. When I run the script it duplicates somehow one of the submenu's... "Clothing/Disguise" to be exact. Any ideas/suggestions? I swear it has to be something simple but it has me stumped... being pretty new around here.

Here is the script:

#include <guiconstants.au3>

$Screen = 1

$PeopleMain = GUICreate ("Description", 200, 400)

$Menu = GUICtrlCreateList ("", 0, 0, 100, 400)

GUICtrlSetData (-1, "Age|Appearance|Body Type|Clothing/Disguise|Clothing/Disguise|Demeanor|Eye Color|Facial Shape|Gender|Hand|Height|Race|Speech|Suspect|Teeth|Victim", "Age" )

GUISetState()

$AgeSubMenu = GUICreate ("Age", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Whoops", 0, 0, 50, 25 )

GUISetState()

$AppearaceSubMenu = GUICreate ( "Appearance", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Yargh!!", 0, 0, 50, 25 )

GUISetState()

$BodyTypeSubMenu = GUICreate ( "Body Type", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Ploghoo", 0, 0, 50, 25 )

GUISetState()

$ClothingMenu = GUICreate ( "Clothing/Disguise", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Gloober", 0, 0, 50, 25 )

GUISetState()

$DemeanorMenu = GUICreate ( "Demeanor", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Wersn", 0, 0, 50, 25 )

GUISetState()

$EyeColorMenu = GUICreate ( "Eye Color", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Kilik", 0, 0, 50, 25 )

GUISetState()

$FacialShapeMenu = GUICreate ( "Facial Shape", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Kanga", 0, 0, 50, 25 )

GUISetState()

$GenderMenu = GUICreate ( "Gender", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Cancer", 0, 0, 50, 25 )

GUISetState()

$HandMenu = GUICreate ( "Hand", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("tarian", 0, 0, 50, 25 )

GUISetState()

$HeightMenu = GUICreate ( "Height", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Vegi", 0, 0, 50, 25 )

GUISetState()

$RaceMenu = GUICreate ( "Race", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Mo", 0, 0, 50, 25 )

GUISetState()

$SpeechMenu = GUICreate ( "Speech", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Mari", 0, 0, 50, 25 )

GUISetState()

$SuspectMenu = GUICreate ( "Suspect", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Jangowo", 0, 0, 50, 25 )

GUISetState()

$VictimMenu = GUICreate ( "Victim", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Ttooto", 0, 0, 50, 25 )

GUISetState()

$TeethMenu = GUICreate ( "Teeth", 200, 400, 100, 0, $WS_CHILD, -1, $PeopleMain )

GUICtrlCreateButton ("Jigaboo", 0, 0, 50, 25 )

GUISetState()

Do

Sleep (10)

$Data = GUICtrlRead ($Menu)

If $Data = "Age" And Not ($Screen = 1) Then

$Screen = 1

GUISetState (@SW_SHOW, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Appearance" And Not ($Screen = 2) Then

$Screen = 2

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_SHOW, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Body Type" And Not ($Screen = 3) Then

$Screen = 3

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_SHOW, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Clothing/Disguise" And Not ($Screen = 4) Then

$Screen = 4

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_SHOW, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Demeanor" And Not ($Screen = 5) Then

$Screen = 5

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_SHOW, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Eye Color" And Not ($Screen = 6) Then

$Screen = 6

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_SHOW, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Facial Shape" And Not ($Screen = 7) Then

$Screen = 7

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_SHOW, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Gender" And Not ($Screen = 8) Then

$Screen = 8

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_SHOW, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Hand" And Not ($Screen = 9) Then

$Screen = 9

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_SHOW, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Height" And Not ($Screen = 10) Then

$Screen = 10

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_SHOW, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Race" And Not ($Screen = 11) Then

$Screen = 11

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_SHOW, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Speech" And Not ($Screen = 12) Then

$Screen = 12

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_SHOW, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Suspect" And Not ($Screen = 13) Then

$Screen = 13

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_SHOW, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Victim" And Not ($Screen = 14) Then

$Screen = 14

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_SHOW, $VictimMenu)

GUISetState (@SW_HIDE, $TeethMenu)

ElseIf $Data = "Teeth" And Not ($Screen = 15) Then

$Screen = 15

GUISetState (@SW_HIDE, $AgeSubMenu)

GUISetState (@SW_HIDE, $AppearaceSubMenu)

GUISetState (@SW_HIDE, $BodyTypeSubMenu)

GUISetState (@SW_HIDE, $ClothingMenu)

GUISetState (@SW_HIDE, $DemeanorMenu)

GUISetState (@SW_HIDE, $EyeColorMenu)

GUISetState (@SW_HIDE, $FacialShapeMenu)

GUISetState (@SW_HIDE, $GenderMenu)

GUISetState (@SW_HIDE, $HandMenu)

GUISetState (@SW_HIDE, $HeightMenu)

GUISetState (@SW_HIDE, $RaceMenu)

GUISetState (@SW_HIDE, $SpeechMenu)

GUISetState (@SW_HIDE, $SuspectMenu)

GUISetState (@SW_HIDE, $VictimMenu)

GUISetState (@SW_SHOW, $TeethMenu)

EndIf

Until GUIGetMsg () = -15

Share this post


Link to post
Share on other sites



Have you found your mistake yet?

GUICtrlSetData (-1, "Age|Appearance|Body Type|Clothing/Disguise|Clothing/Disguise|Demeanor|Eye Color|Facial Shape|Gender|Hand|Height|Race|Speech|Suspect|Teeth|Victim", "Age" )


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Have you found your mistake yet?

GUICtrlSetData (-1, "Age|Appearance|Body Type|Clothing/Disguise|Clothing/Disguise|Demeanor|Eye Color|Facial Shape|Gender|Hand|Height|Race|Speech|Suspect|Teeth|Victim", "Age" )

Yep! I officially feel stupid. Lol thanks Frost though. I looked at that a few times and don't know why I couldn't see it.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0