I would like to clean up my Drop Down List

Ask gaming related questions (AHK v1.1 and older)
thrawn5499
Posts: 74
Joined: 26 Sep 2017, 15:36

I would like to clean up my Drop Down List

19 Oct 2017, 12:32

Ok SO I am making a Gui for my brother so he can make cards and print them for the SWCCG. It is coming along pretty good with the help I have gotten here. I have reached a point where I am adding more functions, and I am not happy with the way I am currently doing my DDLs. I am sure there is a much better way. when I started it was really short and simple, however as I keep adding more things to happen depending on which DDL selection is made the code is getting longer. there are also a few things I would like to do but haven't got it figured out yet. If I was starting over I would probably have gone a different route in a few places, but just added things to keep the code working. I will post the code, and a link to some images that are being used. I am not going to upload all the images at this time, as it would take too much time and is not needed. I will add enough to give the idea of what is going on.
here is the code.

Code: Select all

#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%
;#if !procExist("Snagit32.exe")



/*
 *		Arrow keys move image
 *		Shift + Arrow Up Zooms in
 *		Shift + Arrow Down Zooms out
 */
 
;Settings
	vert	:= 220	;	vertical start position of img in gui
	lat		:= 72	;	lateral start postition of img in gui
	dist 	:= 8  	; 	number of pixels per movement. Bigger numbers = faster movement.


Gui, Color,, WHITE

Gui, Add, Picture, x72 y220 vMyPicture +BackgroundTrans
Gui Add, Button, x700 y150  w88 h25 gpic2, New Image...
gui, font, cblack s15, Arial
   Gui Add, Button, x354 y796  w20 h20 gzoom+, +
    Gui Add, Button, x330 y796  w20 h20 gzoom-, -
    gui, font,

Gui add, Picture, x72 y220 w390 h274 +BackgroundTrans vpic2 gpic2, ;add if you want to be able to add picture by clicking in pic area


;Gui add, Picture, x94 y504 w55 h25 +BackgroundTrans vpwr gpwr, %ImageFile%
;Gui add, Picture, x200 y504 w55 h25 +BackgroundTrans vabl gabl, %ImageFile%
Gui add, Picture, x300 y504 w150 h25 +BackgroundTrans v3rd g3rd, %ImageFile%





Gui add, Picture, x447 y558 w28 h28 +BackgroundTrans vwep1 gwep1, %ImageFile%




Gui +Resize


WinSet, TransColor, WHITE



Gui Add, Picture, x15 y30 w498 h692 +BackgroundTrans vpic grebimg, %A_scriptdir%\Reb_char2.png ; add char to use

Gui Add, Picture, x15 y30 w498 h692 +BackgroundTrans vimpchar, %A_scriptdir%\Imp-char.png ; add char to use 

Gui Add, Picture, x15 y30 w498 h692 +BackgroundTrans vsithchar, %A_scriptdir%\sith-char.png ; add char to use 

Gui Add, Picture, x15 y30 w498 h692 +BackgroundTrans vjedichar, %A_scriptdir%\jedi-char.png ; add char to use 
Gui Add, Picture, x15 y30 w498 h692 +BackgroundTrans vrebdroid, %A_scriptdir%\reb-droid.png ; add char to use 
Gui Add, Picture, x15 y30 w498 h692 +BackgroundTrans vrebalien, %A_scriptdir%\reb-alien.png ; add char to use 
Gui Add, Picture, x15 y30 w498 h692 +BackgroundTrans vimpdroid, %A_scriptdir%\imp-droid.png ; add char to use
Gui Add, Picture, x15 y30 w498 h692 +BackgroundTrans vimpalien, %A_scriptdir%\imp-alien.png ; add char to use 




Gui Add, Picture, x15 y30 w498 h692 +BackgroundTrans vimplocspace, %A_scriptdir%\imp-loc-sys-space.png ; add loc to use 

Gui Add, Picture, x15 y30 w498 h692 vpicbg, C:\AutoGUI\white.jpg



Gui Add, Text, x665 y504 w80 vpwr, Power:
Gui Add, edit, x700 y500 w30 r1 vpwr1, %pwr2%
gui, font, cblack s15, HelveticaLTStd-Bold
Gui add, text, x105 y504 w30 BackgroundTrans vpwr2, %pwr1%
gui, font,


gui, font, cblack s12, arial
Gui Add, Text, x620 y9 w57 , Properties:
gui, font,

Gui Add, Text, x608 y320 w100 vtext1, Upper Description:
Gui Add, edit, x700 y320 w250 r4 vupnum7, %upnum8%
gui, font, cblack s12, HelveticaLTStd-Cond
Gui add, text, x130 y130 W270 h68 BackgroundTrans vupnum8, %upnum8%
gui, font,

Gui Add, Text, x608 y385 w100 vtext2, Lower Description:
Gui Add, edit, x700 y385 w250 r4 vupnum9, %upnum10%
gui, font, cblack s12, HelveticaLTStd-Cond
Gui add, text, x100 y560 W335 h115 BackgroundTrans vupnum10, %upnum9%
gui, font,

Gui Add, Text, x625 y272 w80 vtext3, Upper number:
Gui Add, edit, x700 y270 w30 r1 vupnum1, %upnum2%
gui, font, cblack s15, HelveticaLTStd-UltraComp
Gui add, text, x65 y617 w30 BackgroundTrans vupnum2, %upnum1%

gui, font,

Gui Add, Text, x625 y298 w80 vtext4, Lower number:
Gui Add, edit, x700 y295 w30 r1 vupnum3, %upnum4%
gui, font, cwhite s15, HelveticaLTStd-UltraComp
Gui add, text, x65 y652 w30 BackgroundTrans vupnum4, %upnum3%

gui, font,
Gui Add, Text, x665 y222 w80 vtext5, Name:
Gui Add, edit, x700 y220 w100 r1 vmyedit, %name%
gui, font, s15 HelveticaLTStd-Bold, 
Gui Add, text, BackGroundTrans x140 y80 W150 vname, %myedit%
gui, font,

Gui Add, Text, x640 y246 w80 vtext6, top number:
Gui Add, edit, x700 y245 w30 r1 vupnum5, %upnum6%
gui, font, cwhite s21, HelveticaLTStd-Bold
Gui add, text, x440 y75 w30 BackgroundTrans vupnum6, %upnum5%
gui, font, cblack s15, arial bold

Gui Add, Text, x70 y750 w500, To Add Pictures Click Location On Card.

gui, font, cblack s12, arial
Gui Add, Radio, x242 y878 w150 h20 gwhtbdr, White Border
Gui Add, Radio, x242 y900 w150 h20 gblkbdr, Black Border
gui, font,

Gui Add, Button, x21 y880 w75 h29 GPRINT, Export...
gui, font, cblack s12, arial
Gui Add, Text, x19 y9, Card Design:
Gui Add, Button, x21 y845 w75 h29 GGIMP, GIMP ;THIS WILL GET ADDED TO THE OTHER GUI POSITION WILL CHANGE FOR THAT

Gui Add, Text, x270 y798 , Zoom:
Gui Add, Text, x30 y798 , Move Image:


Gui Add, text,  x380 y799 w310.5 h16 BackgroundTrans vzoombox  %zoom% ;`%
gui, font, s10, wingdings 3
Gui Add, Button, gleft x130 y800 w26 h23,t
Gui Add, Button, gup x154 y780 w26 h23,p
Gui Add, Button, gdown x154 y820 w26 h23,q
Gui Add, Button, gright x178 y800 w26 h23,u
gui, font,
Gui Add, Button, x900 y880 w73 h29 gcancel, Cancel
Gui Add, Button, x820 y880 w73 h29 gok, OK 


Gui, Add, DropDownList ,x700 y43 w130 vfac, Allegiance||Rebellion|Empire


Gui, Add, DropDownList ,x700 y65 w130 vMyDropDown gShowHide, Character||Location|Effect|Admirals Order|Podracer|Devices|Weapons|Interrupt|Epic Event|Jedi Test|Objective|Creature|Vehicle|Starship|Defensive Shields|Other KEY Characteristics|

Gui, add, DropDownList, x700 y87 w130 gShowHide grebimg VChar, Rebel||Imperial|Alien|Rebel Droid|Imperial Droid|Droid|Republic|Jedi Master|Dark Jedi Master|Alien / Imperial|Alien / Rebel|Darth Maul|First Order|

Gui, add, DropDownList, x700 y87 w130 gShowHide2 Vloc1, Site||Sector|System|

Gui, add, DropDownList, x700 y109 w130 gShowHide VTest3, Underground||Underwater|Cave|Exterior|Interior|Vehicle|Creature|

Gui, add, DropDownList, x700 y109 w130 gShowHide VTest4, Cloud||Asteroid|

Gui, add, DropDownList, x700 y109 w130 gShowHide VTest5, Space||

Gui, add, DropDownList, x700 y87 w130 gShowHide VTest6, Mobile||Utinni|Immediate|Starting|Political|
Gui, add, DropDownList, x700 y87 w130 gShowHide VTest7, Character Weapons||Vehicle Weapons|Starship Weapons|

Gui, add, DropDownList, x700 y87 w130 gShowHide VTest8, Used Interrupt||Lost Interrupt|Starting Interrupt|Out of Play Interrupt|Used or Lost Interrupt|Used or Starting Interrupt|Lost or Starting Interrupt|

Gui, add, DropDownList, x700 y87 w130 gShowHide2 VTest9, Transport||Battle|Creature|
Gui, add, DropDownList, x700 y109 w130 gShowHide VTest10, Enclosed||Open|
Gui, add, DropDownList, x700 y87 w130 gShowHide VTest11, Starfighter||Capital|

Gui, add, DropDownList, x700 y87 w130 gShowHide VTest12, Grabber||Senators|Spies|Scouts|Imperial Council Members|Heroic|



GuiControl, Hide, loc1
GuiControl, Hide, Test3
GuiControl, Hide, Test4
GuiControl, Hide, Test5
GuiControl, Hide, Test6
GuiControl, Hide, Test7
GuiControl, Hide, Test8
GuiControl, Hide, Test9
GuiControl, Hide, Test10
GuiControl, Hide, Test11
GuiControl, Hide, Test12
GuiControl, Hide, Test13
GuiControl, Hide, Test14
GuiControl, hide, pic
GuiControl, hide, impchar
GuiControl, hide, sithchar
GuiControl, hide, jedichar
GuiControl, hide, rebdroid
GuiControl, hide, rebalien
GuiControl, hide, impdroid
GuiControl, hide, impalien
GuiControl, hide, implocspace
GuiControl, Show, blkborder

;GuiControl, hide, lst
;GuiControl, show, pic2
;GuiControl, show, pic3
GuiControl, show, pwr
GuiControl, show, picbg
GuiControl, show, bdr
GuiControl, show, abl

settimer, name, 500
settimer, upnum2, 500
settimer, upnum4, 500
settimer, upnum6, 1000
settimer, upnum8, 500
settimer, upnum10, 500
settimer, pwr, 500



Gui Add, Picture, x0 y0 w1000 h925 +BackgroundTrans, %A_scriptdir%\gui.png
Gui Add, Picture, x15 y30 w498 h692 +BackgroundTrans, %A_scriptdir%\white-border.png
Gui Add, Picture, x15 y30 w498 h692 vblkborder +BackgroundTrans, %A_scriptdir%\black-border.png
 
Gui Show, w1000 h925, Card Editor
return


    
GuiClose:
GuiEscape:
ExitApp

GIMP: ; MAKE SURE THIS GETS MODIFIED FOR THE CORRECT WORKING DIRECTORYS AND MOVED TO TOP LEVEL GUI
RUN C:\Program Files\GIMP 2\bin\gimp-2.8.exe C:\Users\smoore\Desktop\AutoGUI\pint.xcf
RETURN

;SCREENSHOT WITH SNAGIT 10
#if !procExist("Snagit32.exe")
printscreen::Run "C:\Program Files (x86)\TechSmith\Snagit 10\Snagit32.exe"
#if

procExist(proc){
    process, exist,% proc
    return errorlevel
}
;
PRINT:
SEND {PrintScreen}

RETURN



 pic2:
{
FileSelectFile, ImageFile
size	:= 500 ;vzoom
GuiControl, , MyPicture, *w%size% *h-1 *x%lat% *y%vert% %ImageFile%
}
return
RedrawImage:

    GuiControl,, MyPicture , *w%size% *h-1 %ImageFile%
    GuiControl, MoveDraw , MyPicture , x%lat% y%vert%    
	Exit


;HotKeys 
#IfWinActive Card Editor
	Up::
		vert-=dist  ;  shorthand for "vert := vert - dist"
		goto RedrawImage
 
	Down::
		vert+=dist
		goto RedrawImage
 
	Left::
		lat-=dist
		goto RedrawImage
 
	Right::
		lat+=dist
		goto RedrawImage
        
        
     zoom+:  ;  zoom in
		size+=(dist*2)
        height+=(dist*2)
		vert-=dist
		lat-=dist
        goto zoombox
     

		
	Zoom-:  ;  zoom out
	    size-=(dist*2)
        height-=(dist*2)
		vert+=dist
		lat+=dist
        goto zoombox
   
		
        
        WheelUp::  ;  zoom in
		size+=(dist*1.1)
        height+=(dist*1.1)
		vert-=dist
		lat-=dist
        goto zoombox
		
        
        WheelDown::  ;  zoom out
	    size-=(dist*1.1)
        height-=(dist*1.1)
		vert+=dist
		lat+=dist
        goto zoombox
	

pic3:
{
FileSelectFile ImageFile
Gui add, Picture, x432 y75 w33 h33 , %ImageFile%
GuiControl, show, pic3 ;%ImageFile%
}

Return


bdr:
{
FileSelectFile ImageFile
Gui add, Picture, x15 y30 w498 h692 +BackgroundTrans, %ImageFile%
GuiControl, show, bdr ;%ImageFile%
}

Return

3rd:
{
FileSelectFile ImageFile
Gui add, Picture, x299 y507 w150 h26 +BackgroundTrans, %ImageFile%
GuiControl, show, 3rd ;%ImageFile%
}

Return

upnum:
{
FileSelectFile ImageFile
Gui add, Picture, x59 y613 w18 h31 +BackgroundTrans, %ImageFile%
GuiControl, show, upnum ;%ImageFile%
}

Return
lownum:
{
FileSelectFile ImageFile
Gui add, Picture, x59 y648 w18 h31 +BackgroundTrans, %ImageFile%
GuiControl, show, lownum ;%ImageFile%
}
Return

wep1:
{
FileSelectFile ImageFile
Gui add, Picture, x447 y558 w28 h28 +BackgroundTrans, %ImageFile%
GuiControl, show, wep1 ;%ImageFile%
}
Return

rebimg:


GuiControlGet, Selection,, char
if (Selection = "Rebel")
{
Guicontrol, show, pic ; background of card type
GuiControl, hide, picbg
Guicontrol, hide, impchar
GuiControl, hide, sithchar
GuiControl, hide, jedichar
GuiControl, hide, rebdroid
GuiControl, hide, rebalien
GuiControl, hide, impdroid
GuiControl, hide, impalien

}

else if (Selection = "Imperial")
{
Guicontrol, hide, Pic
Guicontrol, show, impchar ; background of card type
GuiControl, hide, picbg
GuiControl, hide, sithchar
GuiControl, hide, jedichar
GuiControl, hide, rebdroid
GuiControl, hide, rebalien
GuiControl, hide, impdroid
GuiControl, hide, impalien
}

;else if (Selection = "Alien")
;{
;Guicontrol, hide, Pic
;Guicontrol, show, impchar ; background of card type
;GuiControl, hide, picbg
;GuiControl, hide, rebdroid
;GuiControl, hide, rebalien

;}
else if (Selection = "Rebel Droid")
{
Guicontrol, hide, Pic
Guicontrol, hide, impchar ; background of card type
GuiControl, hide, picbg
GuiControl, hide, sithchar
GuiControl, hide, jedichar
GuiControl, show, rebdroid
GuiControl, hide, rebalien
GuiControl, hide, impdroid
GuiControl, hide, impalien
}

else if (Selection = "Imperial Droid")
{
Guicontrol, hide, Pic
Guicontrol, hide, impchar ; background of card type
GuiControl, hide, picbg
GuiControl, hide, sithchar
GuiControl, hide, jedichar
GuiControl, hide, rebdroid
GuiControl, hide, rebalien
GuiControl, show, impdroid
GuiControl, hide, impalien
}
;else if (Selection = "Droid")
;{
;Guicontrol, hide, Pic
;Guicontrol, show, impchar ; background of card type
;GuiControl, hide, picbg
;GuiControl, hide, rebdroid
;GuiControl, hide, rebalien
;}

;else if (Selection = "Republic")
;{
;Guicontrol, hide, Pic
;Guicontrol, show, impchar ; background of card type
;GuiControl, hide, picbg
;}

else if (Selection = "Jedi Master")
{
Guicontrol, hide, Pic
Guicontrol, hide, impchar ; background of card type
GuiControl, hide, picbg
GuiControl, hide, sithchar
GuiControl, show, jedichar
GuiControl, hide, rebdroid
GuiControl, hide, rebalien
GuiControl, hide, impdroid
GuiControl, hide, impalien
}

else if (Selection = "Dark Jedi Master")
{
Guicontrol, hide, Pic
Guicontrol, hide, impchar ; background of card type
GuiControl, hide, picbg
GuiControl, show, sithchar
GuiControl, hide, jedichar
GuiControl, hide, rebdroid
GuiControl, hide, rebalien
GuiControl, hide, impdroid
GuiControl, hide, impalien
}

else if (Selection = "Alien / Imperial")
{
Guicontrol, hide, Pic
Guicontrol, hide, impchar ; background of card type
GuiControl, hide, picbg
GuiControl, hide, sithchar
GuiControl, hide, jedichar
GuiControl, hide, rebdroid
GuiControl, hide, rebalien
GuiControl, hide, impdroid
GuiControl, show, impalien
}

else if (Selection = "Alien / Rebel")
{
Guicontrol, hide, Pic
Guicontrol, hide, impchar ; background of card type
GuiControl, hide, picbg
GuiControl, hide, sithchar
GuiControl, hide, jedichar
GuiControl, hide, rebdroid
GuiControl, show, rebalien
GuiControl, hide, impdroid
GuiControl, hide, impalien

}

;else if (Selection = "Darth Maul")
;{
;Guicontrol, hide, Pic
;Guicontrol, show, impchar ; background of card type
;GuiControl, hide, picbg
;}

Else
{
Guicontrol,hide, Pic
Guicontrol, hide, impchar
Guicontrol,show,picbg
;gosub impchar
}
gosub fontcolor
return

/*
impchar:
GuiControlGet, Selection,, char
if (Selection = "Imperial")
{
Guicontrol, hide, Pic
Guicontrol, show, impchar ; background of card type
GuiControl, hide, picbg
}
Else
{
Guicontrol, hide, Pic
Guicontrol, hide, impchar
Guicontrol, show,picbg
}
return
*/


fontcolor:
GuiControlGet, Selection,, fac
if (Selection = "Empire")
{
gui font, s15 HelveticaLTStd-Bold cwhite, 
GuiControl font, name
GuiControl font, upnum8
GuiControl font, upnum10
}
else
{
gui font, s15 HelveticaLTStd-Bold cblack,
GuiControl font, name
GuiControl font, upnum8
GuiControl font, upnum10
}
Return

Name:

GuiControlGet, myedit,, ;Myedit
GuiControl, Text, name, %myedit% 
Return

upnum2:

GuiControlGet, upnum1,,
GuiControl, Text, upnum2, %upnum1% 
Return

upnum4:

GuiControlGet, upnum3,,
GuiControl, Text, upnum4, %upnum3% 
Return

upnum6:
GuiControlGet, upnum5,,
GuiControl, Text, upnum6, %upnum5% 
Return

upnum8:
GuiControlGet, upnum7,,
GuiControl, Text, upnum8, %upnum7% 
Return

upnum10:
GuiControlGet, upnum9,,
GuiControl, Text, upnum10, %upnum9% 
Return

pwr:
GuiControlGet, pwr1,,
GuiControl, Text, pwr2, %pwr1% 
Return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
zoombox:
;GuiControlGet, zoombox,,
zoom:=Round((size/500*100),1)

GuiControl, Text, zoombox, %zoom% 
;send {BACKSPACE}
goto RedrawImage
Return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ShowHide:
LOOP, 2 
{
GuiControlGet, Selection,, MyDropDown
if (Selection = "Character")
{
	;GuiControl, Show, pic3
    GuiControl, Show, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Show, text1
    GuiControl, Show, text2
    GuiControl, Show, text3
    GuiControl, Show, text4
    GuiControl, Show, text5
    GuiControl, Show, text6    
    GuiControl, Show, upnum7  ; upper description for character cards
    GuiControl, Show, upnum8  ; upper description for character cards
    GuiControl, Show, upnum9  ; lower description for character cards
    GuiControl, Show, upnum10 ; lower description for character cards
    GuiControl, Show, upnum1  ; upper number for character cards
    GuiControl, Show, upnum2  ; upper number for character cards
    GuiControl, Show, upnum3  ; lower number for character cards
    GuiControl, Show, upnum4  ; lower number for character cards
    GuiControl, Show, upnum5  ; top number for character cards
    GuiControl, Show, upnum6  ; top number for character cards
    GuiControl, Show, myedit  ;name for character cards
    GuiControl, Show, name  ;name for character cards
    GuiControl, Hide, implocspace
 
	
}
ELSE 
{
    GuiControl, Hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6    
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
}



GuiControlGet, Selection,, MyDropDown
if (Selection = "Effect")
{
	GuiControl, hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, show, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
    ;Gosub, ShowHide
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Admirals Order")
{
	GuiControl, hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
    ;Gosub, ShowHide
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Podracer")
{
	GuiControl, hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Devices")
{
	GuiControl, hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Weapons")
{
	GuiControl, hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Show, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
	GuiControl, Hide, implocspace
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Interrupt")
{
GuiControl, hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, show, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
	GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Epic Event")
{
	GuiControl, Hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Jedi Test")
{
	GuiControl, Hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Objective")
{
	GuiControl, Hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Creature")
{
	GuiControl, Hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Vehicle")
{
	GuiControl, hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, hide, Test8
    GuiControl, Show, Test9
    GuiControl, show, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Starship")
{
	GuiControl, hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, hide, Test8
    GuiControl, hide, Test9
    GuiControl, hide, Test10
    GuiControl, Show, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Defensive Shields")
{
	GuiControl, hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, hide, Test8
    GuiControl, hide, Test9
    GuiControl, hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	
}
GuiControlGet, Selection,, MyDropDown
if (Selection = "Other KEY Characteristics")
{
	GuiControl, hide, Char
    GuiControl, Hide, loc1
    GuiControl, Hide, Test3
    GuiControl, Hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, hide, Test8
    GuiControl, hide, Test9
    GuiControl, hide, Test10
    GuiControl, Hide, Test11
    GuiControl, hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	
}
GuiControlGet, Selection,, MyDropDown
 if (selection = "Location")
{
    GuiControl, Show, loc1
	GuiControl, Hide, Char
    GuiControl, show, Test3
    GuiControl, hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	GuiControl, hide, pic
    GuiControl, hide, impchar
	GuiControl, hide, sithchar
	GuiControl, hide, jedichar
	GuiControl, hide, rebdroid
	GuiControl, hide, rebalien
	GuiControl, hide, impdroid
	GuiControl, hide, impalien
}    
    gosub showhide2
}


gosub fontcolor
return

ShowHide2:
GuiControlGet, Selection,, MyDropDown
 if (selection = "Location")
{
    GuiControl, Show, loc1
	GuiControl, Hide, Char
    GuiControl, show, Test3
    GuiControl, hide, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
    GuiControl, Hide, implocspace
	GuiControl, hide, pic
    GuiControl, hide, impchar
	GuiControl, hide, sithchar
	GuiControl, hide, jedichar
	GuiControl, hide, rebdroid
	GuiControl, hide, rebalien
	GuiControl, hide, impdroid
	GuiControl, hide, impalien
}

GuiControlGet, Selection,, loc1
if (selection = "Sector")
{
	
	GuiControl, Hide, Char
    GuiControl, Hide, implocspace
    ;GuiControl, Hide, picbg
    GuiControl, Show, loc1
    GuiControl, Hide, Test3
    GuiControl, Show, Test4
    GuiControl, Hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
	GuiControl, hide, pic
    GuiControl, hide, impchar
	GuiControl, hide, sithchar
	GuiControl, hide, jedichar
	GuiControl, hide, rebdroid
	GuiControl, hide, rebalien
	GuiControl, hide, impdroid
	GuiControl, hide, impalien

}
GuiControlGet, Selection,, loc1
if (selection = "System")
{
	
    GuiControl, Hide, picbg
	GuiControl, Hide, Char
    GuiControl, Show, loc1
    GuiControl, Hide, Test3
    GuiControl, hide, Test4
    GuiControl, show, Test5
    GuiControl, show, implocspace
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, Hide, Test9
    GuiControl, Hide, Test10
    GuiControl, Hide, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
	GuiControl, hide, pic
    GuiControl, hide, impchar
	GuiControl, hide, sithchar
	GuiControl, hide, jedichar
	GuiControl, hide, rebdroid
	GuiControl, hide, rebalien
	GuiControl, hide, impdroid
	GuiControl, hide, impalien

}
GuiControlGet, Selection,, test9
if (selection = "Battle")
{
	
    GuiControl, Hide, implocspace
    GuiControl, Hide, Char
    GuiControl, hide, loc1
    GuiControl, Hide, Test3
    GuiControl, hide, Test4
    GuiControl, hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, show, Test9
    GuiControl, hide, Test10
    GuiControl, HIDE, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
	GuiControl, hide, pic
    GuiControl, hide, impchar
	GuiControl, hide, sithchar
	GuiControl, hide, jedichar
	GuiControl, hide, rebdroid
	GuiControl, hide, rebalien
	GuiControl, hide, impdroid
	GuiControl, hide, impalien

}
GuiControlGet, Selection,, test9
if (selection = "Creature")
{
	GuiControl, Hide, Char
    GuiControl, Hide, implocspace
    GuiControl, hide, loc1
    GuiControl, Hide, Test3
    GuiControl, hide, Test4
    GuiControl, hide, Test5
    GuiControl, Hide, Test6
    GuiControl, Hide, Test7
    GuiControl, Hide, Test8
    GuiControl, show, Test9
    GuiControl, hide, Test10
    GuiControl, HIDE, Test11
    GuiControl, Hide, Test12
    GuiControl, Hide, text1
    GuiControl, Hide, text2
    GuiControl, Hide, text3
    GuiControl, Hide, text4
    GuiControl, Hide, text5
    GuiControl, Hide, text6  
    GuiControl, Hide, upnum7  ; upper description for character cards
    GuiControl, Hide, upnum8  ; upper description for character cards
    GuiControl, Hide, upnum9  ; lower description for character cards
    GuiControl, Hide, upnum10 ; lower description for character cards
    GuiControl, Hide, upnum1  ; upper number for character cards
    GuiControl, Hide, upnum2  ; upper number for character cards
    GuiControl, Hide, upnum3  ; lower number for character cards
    GuiControl, Hide, upnum4  ; lower number for character cards
    GuiControl, Hide, upnum5  ; top number for character cards
    GuiControl, Hide, upnum6  ; top number for character cards
    GuiControl, Hide, myedit  ;name for character cards
    GuiControl, Hide, name  ;name for character cards
	GuiControl, hide, pic
    GuiControl, hide, impchar
	GuiControl, hide, sithchar
	GuiControl, hide, jedichar
	GuiControl, hide, rebdroid
	GuiControl, hide, rebalien
	GuiControl, hide, impdroid
	GuiControl, hide, impalien

}
return

whtbdr:
GuiControl, hide, blkborder
GuiControl, show, whtbdr
return

blkbdr:
GuiControl, Hide, whtbdr
GuiControl, show, blkborder
return


ok:
Gui, Submit
Return

cancle: 
Gui, Destroy
   
Return

here are some pictures https://imgur.com/a/SAZ5e
if there is something I have forgotten and it just does not load a picture let me know. Note that most of the Character pictures have not been uploaded. just 2 to see the change of picture and color change of the font.

I started playing with doing the DDL differently. But got stuck pretty quickly. here is that short code.

Code: Select all

#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%



gosub,faction
Rebellion=Character||Location|Effect|Admirals Order|Podracer|Devices|Weapons|Interrupt|Epic Event|Jedi Test|Objective|Creature|Vehicle|Starship|Defensive Shields|Other KEY Characteristics|
Empire=Character||Location|Effect|Admirals Order|Podracer|Devices|Weapons|Interrupt|Epic Event|Jedi Test|Objective|Creature|Vehicle|Starship|Defensive Shields|Other KEY Characteristics|

Gui, Add, DropDownList,gAPLY x12 y70 w100 vfac, %typ%
Gui, Add, DropDownList, x12 y90 w150 vtype
gui,Show
GuiControl,1: Choose,fac,Rebellion   ;-- << preselect
gosub,aply
return

;---------------------------------------------------------
Faction:
typ=
(Ltrim Join|
Rebellion
Empire
)
return
;---------------------------------------------------------

APLY:
gui,1:submit,nohide
guicontrol,1:,type,|
type=
If fac=Rebellion
   type=%Rebellion%
If fac=Empire
   type=%Empire%

guicontrol,1:,type,%type%
type=
return

GuiClose:
ExitApp
I could not figure out how to have images and other DDL show up with you made a selection in the 2nd DDL.
back to my other code and a few things I wanted to change/do. I would like only the top DDL to show up until either Rebellion or Empire is picked, then the next DDL can show up with Character as the default, and Rebel as the next DDL default. Also once the Faction and Character is picked I would like the Text and edit boxed to show up under the edit boxes. this set of text and edit boxes will change for each card type being made. If you notice I have them go away (except for power) when location is chosen. The power is starting to be handled differently. before You had to click and select and image. I am going to just have the user type in the value they want. It will require editing the character png files but that is not a problem. anyway I think I have added enough to start. I probably forgot something. please don't be to harsh on my SLOPPY code :oops: it has been a few years...
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

Re: I would like to clean up my Drop Down List

19 Oct 2017, 22:20

Code: Select all

Gui, Add, DropDownList ,x700 y43 w130 vfac, Allegiance||Rebellion|Empire


Gui, Add, DropDownList ,x700 y65 w130 vMyDropDown gShowHide, Character||Location|Effect|Admirals Order|Podracer|Devices|Weapons|Interrupt|Epic Event|Jedi Test|Objective|Creature|Vehicle|Starship|Defensive Shields|Other KEY Characteristics|

Gui, add, DropDownList, x700 y87 w130 gShowHide grebimg VChar, Rebel||Imperial|Alien|Rebel Droid|Imperial Droid|Droid|Republic|Jedi Master|Dark Jedi Master|Alien / Imperial|Alien / Rebel|Darth Maul|First Order|

Gui, add, DropDownList, x700 y87 w130 gShowHide2 Vloc1, Site||Sector|System|

Gui, add, DropDownList, x700 y109 w130 gShowHide VTest3, Underground||Underwater|Cave|Exterior|Interior|Vehicle|Creature|

Gui, add, DropDownList, x700 y109 w130 gShowHide VTest4, Cloud||Asteroid|

Gui, add, DropDownList, x700 y109 w130 gShowHide VTest5, Space||

Gui, add, DropDownList, x700 y87 w130 gShowHide VTest6, Mobile||Utinni|Immediate|Starting|Political|
Gui, add, DropDownList, x700 y87 w130 gShowHide VTest7, Character Weapons||Vehicle Weapons|Starship Weapons|

Gui, add, DropDownList, x700 y87 w130 gShowHide VTest8, Used Interrupt||Lost Interrupt|Starting Interrupt|Out of Play Interrupt|Used or Lost Interrupt|Used or Starting Interrupt|Lost or Starting Interrupt|

Gui, add, DropDownList, x700 y87 w130 gShowHide2 VTest9, Transport||Battle|Creature|
Gui, add, DropDownList, x700 y109 w130 gShowHide VTest10, Enclosed||Open|
Gui, add, DropDownList, x700 y87 w130 gShowHide VTest11, Starfighter||Capital|

Gui, add, DropDownList, x700 y87 w130 gShowHide VTest12, Grabber||Senators|Spies|Scouts|Imperial Council Members|Heroic|



GuiControl, Hide, loc1
GuiControl, Hide, Test3
GuiControl, Hide, Test4
GuiControl, Hide, Test5
GuiControl, Hide, Test6
GuiControl, Hide, Test7
GuiControl, Hide, Test8
GuiControl, Hide, Test9
GuiControl, Hide, Test10
GuiControl, Hide, Test11
GuiControl, Hide, Test12
GuiControl, Hide, Test13
GuiControl, Hide, Test14
So you're stacking all these DDLs on top of each other and hiding most of them, then later on in your code you're showing them as needed.

I would consider making a single DDL. You can use the GuiControl https://autohotkey.com/docs/commands/Gu ... htmcommand to overwrite the list of options, which can also be managed by an variable. Example:

Code: Select all

^2::
Gui, add, DropDownList, x700 y87 w130 gShowHide grebimg VChar, Rebel||Imperial|Alien|Rebel Droid|Imperial Droid|Droid|Republic|Jedi Master|Dark Jedi Master|Alien / Imperial|Alien / Rebel|Darth Maul|First Order|
Gui, Show
Sleep 5000
Test3_list:="|Underground||Underwater|Cave|Exterior|Interior|Vehicle|Creature|" ; note I added a | before the first parameter, Underground
GuiControl, , Char, %Test3_list%
return

ShowHide:
return
rebimg: ; honesty surprised you can put 2 g labels in a control
return
If you run that script as is, you'll see "Rebel" in the DDL. Then wait 5 seconds, and it'll change to "Underground".

The trick will be that you'll be using just one variable. So in your glabel to capture the value, depending on the value of the the displayed list (which could be tricky to manage), you'd store it in another var.

Code: Select all

ShowHide: ; probably rename since this isn't meant to show or hide anymore
Gui, Submit, NoHide
If !previous_var
{
character:=Char
previous_var:="character"
newlist:="|Site||Sector|System|"
}
else if (previous_var="character") ; important this is an else
{
loc1:=Char
previous_var:="loc1"
newlist:="|Underground||Underwater|Cave|Exterior|Interior|Vehicle|Creature|"
}
else if (previous_var="loc1")
{
; ...
}
GuiControl, , Char, %newlist%
return
Alternatively, you could do a counter++ variable (++ operator adds 1) to track how many times this label has been triggered (though technically, the way I have it set up is that's a finalized submission; if there's a misclick that can be a problem, you'll want to figure out an undo feature). And instead of checking the value of this "previous_var" character, you assign the value of Char :=Char to different variables and give a different newlist value. Actually, come to think of it, you could do something like this:

Code: Select all

; in the auto-execute section
list1:="Rebel||Imperial|Alien|Rebel Droid|Imperial Droid|Droid|Republic|Jedi Master|Dark Jedi Master|Alien / Imperial|Alien / Rebel|Darth Maul|First Order|" ; no | at start here, but you would want it in an undo feature. Not sure if | hurts outside of GuiControl
list2:="|Site||Sector|System|"
list3:="|Underground||Underwater|Cave|Exterior|Interior|Vehicle|Creature|"
counter:=1
Gui, add, DropDownList, x700 y87 w130 gShowHide VChar, % list%counter% ; or %list1%
; I remove "grebimg" because that appears to overwrite the ShowHide functionality?
Gui, Show
return

ShowHide:
Gui, Submit, NoHide
selection%counter%:=Char ; stores in selection1, selection2, etc. the value of the submitted Char value in that DDL
counter++
GuiControl, , Char, % list%counter%
MsgBox S1: %selection1%`nS2: %selection2%`nS3:%selection3%
return
The MsgBox is to demonstrate how the variables are getting updated with each selection.
thrawn5499
Posts: 74
Joined: 26 Sep 2017, 15:36

Re: I would like to clean up my Drop Down List

20 Oct 2017, 09:24

Interesting, Thanks Exaskryz. I will want more than One dropdown list though maybe not as many as I first had I might be able to change the contents of some of the DDL with a Var. I have done a little more to this other style I was trying. here is what I have.

Code: Select all

#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%



gosub,faction
Rebellion=Rebel||Rebel Droid|Droid|Republic|Jedi Master|Alien / Rebel|
Empire=Imperial||Alien|Imperial Droid|Droid|Dark Jedi Master|Alien / Imperial|Darth Maul|First Order|

gosub,type
gosub,location1

Gui, Add, DropDownList,gAPLY x12 y70 w100 vfac, %fac%
;Gui, Add, DropDownList, x12 y90 w150 vtype, Character||Location|Effect|Admirals Order|Podracer|Devices|Weapons|Interrupt|Epic Event|Jedi Test|Objective|Creature|Vehicle|Starship|Defensive Shields|Other KEY Characteristics|
;Gui, Add, DropDownList, x12 y110 w150 vchar

;GuiControl, Hide, type
GuiControl, Hide, char
Gui, Add, DropDownList, x12 y90 w150 vtype, %typ%
Gui, Add, DropDownList, x12 y110 w150 vchar, %char%
Gui, Add, DropDownList, x12 y130 w150 vloc1, %loc1%

gui,Show
GuiControl,1: Choose,fac,Rebellion   ;-- << preselect
GuiControl,1: Choose,type,Character 
GuiControl,1: Choose,loc1,Site 
gosub,aply
return

;---------------------------------------------------------
Faction:
fac=
(Ltrim Join|
Rebellion
Empire
)
return
;---------------------------------------------------------

;---------------------------------------------------------
type:
typ=
(Ltrim Join|
Character
Location
Effect
Admirals Order
Podracer
Devices
Weapons
Interrupt
Epic Event
Jedi Test
Objective
Creature
Vehicle
Starship
Defensive Shields
Other KEY Characteristics
)
return
;---------------------------------------------------------

;---------------------------------------------------------
location1:
loc1=
(Ltrim Join|
Site
Sector
System
)
return
;---------------------------------------------------------

APLY:
gui,1:submit,nohide
guicontrol,1:,char,|
char=
If fac=Rebellion
{
   char=%Rebellion%
   GuiControl, show, char
} 
  
If fac=Empire
{
   char=%Empire%
   GuiControl, show, char  
}
guicontrol,1:,char,%char%
char=
;---------------------------------------------------------
;guicontrol,1:,type,|
;type=
;if type=Location
;loc1=%loc1%
;guicontrol,1:,type,%typ%
;type=

return

GuiClose:
ExitApp



Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 78 guests