Jump to content
Sign in to follow this  

Can we run a conditional on the window's style or exstyle?

Recommended Posts


I want to check if a pop-up dialog appears. The title is random so I looked into using "Class" but since the main window and the pop-up use the same class I cannot use that approach.

I did notice the "Style", "Exstyle", and "Handle" are different and was wondering if I could use something like...

if Style = "0x960A0000" Then 
;Code here

Edited by harmor

Share this post

Link to post
Share on other sites

You can detect the styles with _WinAPI_GetWindowLong...

#Include <WinAPI.au3>
#Include <Constants.au3>
$hWnd = WinGetHandle("[ACTIVE]", "")
msgbox(0,""",_WinAPI_GetWindowLong($hWnd, $GWL_STYLE) & @crlf & _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE))

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.