I'm testing AHKv2
here is a short script to test the GUI-function
my problem is, that »MyGui.Destroy()« does not Remove the window
it remains on the screen.
After reloading the script the window will be removed (off course)
What's wrong ?
Code: Select all
^1:: ;Strg+1
{
I:="0"
again:
I++
MyGui:=Gui()
MyGui.Opt("+AlwaysOnTop -Caption -SysMenu +Owner")
MyGui.BackColor := "blue"
MyGui.SetFont("cWhite s20 q5" , "Segoe")
MyGui.Add("Text","x20 y20" ,"I= " I)
MyGui.Show("x1100 y600 autosize")
if I>5
MyGui.Destroy() ;<----- will not remove the window
If msgbox("I = " I,,"R/C T10") = "Cancel"
{
MyGui.Destroy()
msgbox("exit",,"T1")
exit
}
goto again
}
need help
regards
MS