instead of the way the current gui commands/functions work, even in ahk v2, I'd like to see 'ahk v3' or a patch to make it work like this:
Code: Select all
gui(Window) {
label(My Window)
gui(Button) {
label(My Button)
parent(My Window) ; not required because it's nested under My Window, but this can be used to override its parent
callback(My-Button-Event)
style(Default)
font(Segoe UI)
enabled(True)
vert-margin(10)
horiz-margin(10)
min-width(60)
min-height(20)
stretchable-width(100)
stretchable-height(40)
}
}
By doing things this way, it would be simple to add a condition for the "enabled" option for a button, for example:
Code: Select all
gui(Window) {
label(My Window)
gui(Button) {
label(My Button)
parent(My Window) ; not required because it's nested under My Window, but this can be used to override its parent
callback(My-Button-Event)
style(Default)
font(Segoe UI)
if (myVar = 1)
enabled(True)
else
enabled(False)
vert-margin(10)
horiz-margin(10)
min-width(60)
min-height(20)
stretchable-width(100)
stretchable-height(40)
}
}