gbm wrote:I was able to accomplish it using a loop and WinWaitActive.
It seems strange that what looks like an event driven function (OnWin) would only work for the first event. Kind of defeats the purpose.
Probably a bit late, but use
Exit at the end of your function. E.G.
Code: Select all
OnWin("Exist","Notepad",Func("Callback_Event"))
Callback_Event(this){
;Do stuff
s:=this.event
msgbox,%s%
Exit
}
Something that I've been struggling with is using OnWin() to target the resize event of a 'FileSelectFile' dialog... I.E.
Code: Select all
OnWin("Move","Open - (64-Bit) ahk_class #32770 ahk_exe AutoHotkey.exe",Func("Callback_DLGResize"))
Doesn't seem to call the DLG Resize event at all... (P.S. I am calling from a seperate AHK script, if that makes a difference.