ControlClick() fails for button in a Hidden GUI

Recommended Posts

CraigA 0

CraigA 0

I am attempting to use _Singleton() and a hidden AutoIt3 GUI so a message can be sent from a second instance of a script to the initial instance of a script. The GUI operates in event mode.

From within _Singleton(), ControlCommand($ScriptName, "", "[CLASS:ListBox; INSTANCE:1]", "AddString", $requestedState) adds a message to a ListBox in the GUI. This does not generate an event so I placed a button that can be clicked to generate an event.

Share this post

Link to post

Share on other sites

CraigA 0

CraigA 0

I received an IM type reply to try this: Opt("WinDetectHiddenText", 1) but the problem remains.

Prior to my post above, I also tried a checkBox and using ControlEnable($ScriptName, "", "[CLASS:Button; INSTANCE:2]") to check or uncheck to generate an event but same results: no event fired if GUISetState(@SW_HIDE).

Does anyone know if ControlCommand($ScriptName, "", "[CLASS:ListBox; INSTANCE:1]", "AddString", $requestedState) might be generating an event that KODA did not include?

KODA did generate AmsgList1Click() but ControlClick($ScriptName, "", "[CLASS:ListBox; INSTANCE:1]")does not fire an event when the GUI is hidden.

This creates a GUI that is not actually hidden but appears offscreen and does not appear in the taskbar or alt-tab list and also does not take focus when it appears, so effectively it is hidden but the events still fire.