Here is a theoretical question
It's straightforward to made a function that creates GUIs with arbitrary numbers of EDIT boxes from one to ten (picking ten as an example).
Because it's a function, the variables that receive the input must be declared global both within the function and within the OK button's handler (also a function).
The beginning might look like this (copying from a working example I made today):
Code: Select all
gui_EditOnly( title, edit_options, optional_params) {
global GUI_EditOnly_1, GUI_EditOnly_2, GUI_EditOnly_3, GUI_EditOnly_4, GUI_EditOnly_5
, GUI_EditOnly_6, GUI_EditOnly_7, GUI_EditOnly_8, GUI_EditOnly_9, GUI_EditOnly_10
As I understand, the problem is that the variable GUI_EditOnly_%field_counter% on the line below must be a global, and not an object member.
Code: Select all
Gui, EditOnly:Add, Edit, x%x_value% y%y_value% w%edit_width% vGUI_EditOnly_%field_counter%, %edit_field_default%
Just curious!
Thanks in advance for any thoughts.