If I use the following, it works fine when the hotkey is pressed (the added object disappears).
Code: Select all
#IfWinExist ahk_class #32770
^F2::
WinHide ahk_class Listary_WidgetWin_1
return
#If
However, I am trying to make the object hidden by default. But if I remove the hotkey (or even if I remove the conditional directive altogether so that object should be hidden regardless of the presence of an active file dialog) it doesn't work. The object still displays in all dialogs.
How can I get the WinHide command above to be carried out automatically without requiring a hotkey to trigger it?