help assigning dynamically named variable to gui.add()

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
chipy
Posts: 3
Joined: 29 Nov 2017, 23:43
GitHub: iamchipy

help assigning dynamically named variable to gui.add()

01 Dec 2017, 15:36

hey everyone, this is a rather niche issue so i might just not be searching for help correctly but maybe you guys can direct me.

I'm trying to build a GUI that can be fed a dynamic number of inputs(read from a file) and have it display them for editing and then save back to file.
I'm not sure this is best but i'm trying to adapt my code from AHK_L so it's kinda bumpy so i've made this simplified version to try and help to diagnose what I'm doing wrong.
I think my primary issue is that i do not know how to assign a dynamic variable to a GUI control, which i need to do so that the gui can handle 10 20 or 50 items with connected variables. However, i do not know how to save them with the AHK v2 output system which seems to use a OOP style that i know very little about. (it's possible i'm just looking at the wrong version of AHK's manual and it's all there but maybe not and i could really use help to save me time from someone that knows.)

here is my code (i'm using "2.0-alpha")

"cfg.ini"

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



script

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

HotKeyIt
Posts: 1607
Joined: 29 Sep 2013, 18:35
Contact:

Re: help assigning dynamically named variable to gui.add()

01 Dec 2017, 16:55

Try this:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

chipy
Posts: 3
Joined: 29 Nov 2017, 23:43
GitHub: iamchipy

Re: help assigning dynamically named variable to gui.add()

01 Dec 2017, 17:11

wow thanks! it does seem to work, i'll be taking time tonight to decode the changes to make sure i understand them. thanks for the prompt response bro!

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 2 guests