- 1 year ago
How can I hide a popup window in an AutoIt script?
Comment
1 / 1
To hide a popup window in an AutoIt script, you can use the WinSetState
function with the @SW_HIDE
parameter. Here's how you can do it:
autoit#include <WinAPI.au3>
Local $hWnd = WinGetHandle("Popup Window Title")
If $hWnd Then
_WinAPI_ShowWindow($hWnd, @SW_HIDE)
EndIf
Replace "Popup Window Title"
with the title of the popup window you want to hide. This script first gets the handle of the popup window using WinGetHandle
and then uses _WinAPI_ShowWindow
to hide the window.
Remember that the title of the window should match exactly for this approach to work. If you're encountering issues, you can use tools like AutoIt Window Info (available in the AutoIt installation) to verify the correct title of the window.