Hello everybody! I need to run two codes in separate loops, one in the main window and another when the second window is called, all in OnEvent mode! But in practice, when the second window opens, the second loop somehow disables "events", see the sample code below: #include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) Global $hGUI1, $hGUI2 = 9999, $hButton1, $hButton2, $hButton3 = 9999 ; Predeclare the variables with dummy values to prevent firing the Case statements gui1() Func