Page 1 of 1

Dropdownlist not showing next selection

Posted: 25 Jun 2017, 17:56
by SkrillexAkaCraft
So i am working on a script that shows the prices off certain items at the moment but the problem is the last needed dropdownlist is not showing the list it needs to show hopefully someone can help me out!



Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


j1 = 
j2 = |Elrue|Blessed Elrue|Lucky Elrue|Lix|Blessed Lix|Lucky Lix|Xir|Blessed Xir|Lucky Xir
j3 = |N/A|
j4 = |N/A|
j5 = |Aim|Nature's Agility|Magical Defense|Shield Increase|Vitality|Mentality|Speed Increase|Concentration Increase|Divine Magic
j6 = |N/A|
j7 = |HP Potion|SP Potion|HP Regeneration|SP Regeneration|Antibiotic|Antitoxin|Bless|Immunity|Antitode|Cure|Protection|Quickness|Strength Increase|Rama
j8 = |Tier 1|

Home:
Gui, Home:Add, DropDownList, x10 y35 w120 h21 R5 gCategoryC vCategory Choose1 AltSubmit, Select Category|Enhancement|Weapons|Armour|Scrolls|Materials|Potions
Gui, Home:Add, Text, x10 y20 w120 h15, Category:
Gui, Home:Add, DropDownList, x10 y75 w120 h21 R5 gItemC vCategoryC Choose1 AltSubmit, %currentjob%
Gui, Home:Add, Text, x10 y60 w21 h13, Item:
Gui, Home:Add, Text, x10 y100 w21 h13, Tier:
Gui, Home:Add, DropDownList, x10 y115 w120 h21 R5 gTierC vItemC Choose1 AltSubmit, %currentjob%
Gui, Home:Add, Text, x285 y30 w75 h25, Price Range:
Gui, Home:Add, Edit, x220 y55 w65 h20 vItem1,
Gui, Home:Add, Edit, x345 y55 w65 h20 vItem2,
Gui, Home:Add, Text, x295 y60 w45 h15, From - To
Gui, Home:Show, w432 h204, Fiesta Online Price Checker
return

HomeGuiClose:
ExitApp

CategoryC:
Gui, Home:Submit, NoHide
   SubList:=j%Category% 
GuiControl,,CategoryC, %SubList%
return

ItemC:
Gui, Home:Submit, NoHide
   SubList:=j%Item% 
GuiControl,,ItemC, %SubList%
return

	
TierC:
Gui, Home:Submit, NoHide
SubList:=j%ItemC% 
GuiControl,,TierC, %SubList%
return
The last dropdown list needs to show tiers (Tier 1|Tier 2|.....) till tier 5 which it isn't doing right now

Re: Dropdownlist not showing next selection

Posted: 25 Jun 2017, 19:53
by divanebaba
Change this:

Code: Select all

ItemC:
Gui, Home:Submit, NoHide
   SubList:=j%Item% 
GuiControl,,ItemC, %SubList%
return
to this:

Code: Select all

ItemC:
Gui, Home:Submit, NoHide
   SubList:=j%CategoryC% 
GuiControl,,ItemC, %SubList%
return
I recommend to name the labels and variables of the DDL-Controls like in the sample below. The code tells you then, that DDL1 is controlling the contents of DDL2 and so on:
Spoiler