temp.ahk is a dynamically created and saved ahk-script.
ugly workaround. but seems working:
Code: Select all
DetectHiddenWindows,On
SetTitleMatchMode,1
winTC := sayHelloFunctionInc . " ahk_class AutoHotkey"
if(winexist(winTC)){
WinClose,% winTC
WinWaitClose,% winTC,,1
}
if(winexist(winTC)){
ToolTip, '%winTC%' already exist. cant RUN it `n (line:%A_LineNumber%) `n
return false
}
....
run, sayHelloFunctionInc