Code: Select all
fn1()
{
fn2()
{
}
}
Code: Select all
fn1()
{
fn2()
{
}
}
Code: Select all
fn1(function) {
%function%()
fn2() {
MsgBox('first nested function called')
}
fn3() {
MsgBox('second nested function called')
}
}
fn1('fn2')
fn1('fn3')
Code: Select all
BuildGui()
Code: Select all
BtnClicked(*)
Code: Select all
app:=Gui()
app.Add("Button","xm y+0" " w100" " vBtn1","Make Change")"
Code: Select all
app["Btn1"].Hwnd
I am not sure how you did that.
Code: Select all
MyGui := BuildGui()
MyGui.Show()
F3::MyGui.Click()
BuildGui() {
MyGui := Gui()
Button := MyGui.Add('Button', , 'OK')
Button.OnEvent('Click', Button_Click)
MyGui.DefineProp('Click', {Call: (this) => Button_Click()})
return MyGui
Button_Click(*) {
MsgBox A_ThisFunc
}
}
Replacing MyGui.DefineProp('Click', {Call: (this) => Button_Click()}) in your script with ObjBindMethod(myGui, 'Click') will do it.
That didn't work for me. The closest thing was to replace MyGui.DefineProp('Click', {Call: (this) => Button_Click()}) with MyGui.Click := Button_Click.
Code: Select all
MyGui.Click := Button_Click