I want to change some objects within the gui without closing the gui. In my test script I have two labels and 3 buttons. The first button shall change the first label, the second button shall change the second label and the third button shall close the gui. Here is the script: #include <GUIConstants.au3>
GuiCreate("Test", 300,90)
$Text1 = GuiSetControl("label", "Text1", 10,10,100,15)
$Text2 = GuiSetControl("label", "Text1", 10,25,100,15)
$Button1 = GuiSetControl("button", "Change 1", 10,55,80,25)
GuiSetControlNotify()
$Button2 = GuiSetControl("button", "Change 2", 100,55,80,25)
GuiSetControlNotify()
$Button3 = GuiSetControl("button", "Cancel", 190,55,80,25)
While GuiMsg() = 3
GuiWrite($Text1, 0, "Changed Text1")
Wend
While GuiMsg() = 4
GuiWrite($Text2, 0, "Changed Text2")
Wend
If $Button3 = GuiRead() Then msgbox(0,"Message", "Cancel button pushed.")
GuiDelete() But this doesn't work. I can change both labels. But sometimes I have to click twice on the buttons and sometimes the change buttons are closing the gui. I think the "message queue" noted in this post would help. Or is there any other way?