Loading Dropdownlist selection from INI file Topic is solved

Ask gaming related questions (AHK v1.1 and older)
Deaeth85
Posts: 3
Joined: 14 Apr 2024, 19:49
Contact:

Loading Dropdownlist selection from INI file

14 Apr 2024, 19:54

Code: Select all

IniRead, GearChestExcludeSelected, settings.ini, CommonOptions, GearChestExclude
IniRead, JewelChestExclude, settings.ini, CommonOptions, JewelChestExclude
...
...
Gui Add, Text, x150 y340 w200 h30, Gear Chests
Gui Add, DropDownList, x10 y360 w400 r5 vGearChestExclude, Exclude All|Don't Exclude Any|Epic and Higher|Legendary and Higher|Mythic
Gui Add, Text, x150 y390 w200 h30, Jewel Chests
Gui Add, DropDownList, x10 y410 w400 r5 VJewelChestExclude, Exclude All|Don't Exclude Any|Diamond and Higher||Opal and Higher|Emerald

The above is what I currently have of the important parts of the code, I have it working just fine for checkboxes, however no matter what I try I cannot seem to get it to populate the GUI with the selections for the above from the INI file. I've done about 3 hours of online searching and found a few answers but nothing that either a: made sense to me or b: worked. I've tried adding GuiControl,, GearChestExclude, %GearChestExclude% and multiple other forms of that with no success. Can someone break this down barney style to help end my frustration? LOL.
Deaeth85
Posts: 3
Joined: 14 Apr 2024, 19:49
Contact:

Re: Loading Dropdownlist selection from INI file

14 Apr 2024, 20:16

More lines of the code so you can see what I have that works versus what doesn't. Everything with checkboxes works, the ini is populated correctly, just not finding any way to get the dropdown list to populate from the INI file itself.

Code: Select all

IniRead, Token, settings.ini, CommonOptions, Token
IniRead, SellEx, settings.ini, CommonOptions, SellEx
IniRead, SellScrolls, settings.ini, CommonOptions, SellScrolls
IniRead, SellNoGold, settings.ini, CommonOptions, SellNoGold
IniRead, SellAll, settings.ini, CommonOptions, SellAll
IniRead, ExoticUpgrades, settings.ini, CommonOptions, ExoticUpgrades
IniRead, BuyEx, settings.ini, CommonOptions, BuyEx
IniRead, Chests, settings.ini, CommonOptions, Chests
IniRead, GearChestExclude, settings.ini, CommonOptions, GearChestExclude
IniRead, JewelChestExclude, settings.ini, CommonOptions, JewelChestExclude
IniRead, Bless, settings.ini, CommonOptions, Bless
IniRead, Daily, settings.ini, CommonOptions, Daily
IniRead, Weekly, settings.ini, CommonOptions, Weekly
IniRead, Events, settings.ini, CommonOptions, Events
IniRead, Mail, settings.ini, CommonOptions, Mail
IniRead, Awaken, settings.ini, CommonOptions, Awaken
IniRead, Crystal, settings.ini, CommonOptions, Crystal
IniRead, PTree, settings.ini, CommonOptions, PTree
...
...
Gui Tab, 2 ; Common Options
Gui Add, Picture, x450 y180 w400 h400, Images\chest.png
Gui Font, s15, Bold, Tahoma
Gui Add, Text, x0 y30 w900 h30 +0x200 +Center, CHECK ANY OPTIONAL BOXES TO DIRECT THE SCRIPT
Gui Font, s9 Bold, Tahoma
Gui Add, Checkbox, x10 y70 w600 h30 vToken Checked%Token%, Use Tavern Tokens/Craft Artifact (Will NOT work if Skip Claiming Beer selected in QoL section)
Gui Add, Checkbox, x10 y110 w600 h30 vSellEx Checked%SellEx%, Open Exotic Merchant (Master toggle that only goes to Exotic Merchant)
Gui Add, Radio, x20 y135 w400 h30 vSellScrolls Checked%SellScrolls%,  1. Sell ONLY Exotic Scrolls
Gui Add, Radio, x20 y160 w400 h30 vSellNoGold Checked%SellNoGold%, 2. Sell All But Gold Items
Gui Add, Radio, x20 y185 w400 h30 vSellAll Checked%SellAll%,  3. Sell All Exotic Items
Gui Add, Radio, x20 y210 w400 h30 vSellNone Checked%SellNone%, 4. Sell Nothing
Gui Add, Checkbox, x10 y240 w400 h30 vExoticUpgrades Checked%ExoticUpgrades%, Buy Exotic Upgrades (Requires Sell Exotic Items Checked)
Gui Add, Checkbox, x10 y270 w400 h30 vBuyEx Checked%BuyEx%, Buy Exotic Chests (Requires Sell Exotic Items Checked)
Gui Add, Checkbox, x10 y310 w400 h30 vChests Checked%Chests%, Open Chests - Choose an "Exclude from" option from the dropdowns below - Gifts will be opened as well
Gui Add, Text, x150 y340 w200 h30, Gear Chests
Gui Add, DropDownList, x10 y360 w400 r5 vGearChestExclude, Exclude All|Don't Exclude Any|Epic and Higher|Legendary and Higher|Mythic
Gui Add, Text, x150 y390 w200 h30, Jewel Chests
Gui Add, DropDownList, x10 y410 w400 r5 VJewelChestExclude, Exclude All|Don't Exclude Any|Diamond and Higher||Opal and Higher|Emerald
Gui Add, Checkbox, x10 y450 w400 h30 vBless Checked%Bless%, Upgrade Blessings - Will open Oracle chests even without Open Chests selected
Gui Add, Checkbox, x10 y490 w400 h30 vDaily Checked, Claim Daily Quests
Gui Add, Checkbox, x10 y530 w400 h30 vWeekly Checked%Weekly%, Claim Weekly Quests
Gui Add, Checkbox, x10 y570 w400 h30 vEvents Checked%Events%, Claim Basic Events
Gui Add, Checkbox, x10 y610 w400 h30 vMail Checked%Mail%, Check Mail
Gui Add, Checkbox, x10 y650 w400 h30 vAwaken Checked%Awaken%, Awaken Heroes
Gui Add, Checkbox, x10 y690 w400 h30 vCrystal Checked%Crystal%, Spend Pickaxes on Crystal
Gui Add, Checkbox, x10 y730 w600 h30 vPTree Checked%PTree%, Upgrade Personal Tree (Select options on next tab if upgrading)
Deaeth85
Posts: 3
Joined: 14 Apr 2024, 19:49
Contact:

Re: Loading Dropdownlist selection from INI file  Topic is solved

14 Apr 2024, 21:07

Ok, so for others struggling with this I finally figured it out. I had to move the whole IniRead section to below the Gui Add section, and add GuiControl, Choose, Name, %Name%. Hope this helps others!

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 58 guests