Jump to content
Sign in to follow this  
Kornel

Detecting messagebox

Recommended Posts

Kornel

Hi, I'm looking for a function to detect unknown title window, which is msgbox. I only know that te diference by te msgbox and other windows is it style 0x94C801C5.

If anybody will know how to detect it, I'll be grateful.

Share this post


Link to post
Share on other sites
WolfWorld

Hi, I'm looking for a function to detect unknown title window, which is msgbox. I only know that te diference by te msgbox and other windows is it style 0x94C801C5.

If anybody will know how to detect it, I'll be grateful.

See WinList

Share this post


Link to post
Share on other sites
Kornel

ok, but I have a lot of diffrents titles, thats why I cant use that function. In most cases I just don't know what window will be appear, and what title it will have.

I'm must detect type of window, not title or content

Edited by Kornel

Share this post


Link to post
Share on other sites
WolfWorld

ok, but I have a lot of diffrents titles, thats why I cant use that function. In most cases I just don't know what window will be appear, and what title it will have.

I'm must detect type of window, not title or content

Don't put anything in and it will show all windows.

WinList()

Share this post


Link to post
Share on other sites
Kornel

It doesn't work

It shows all windows in whole Windows system (209 windows)... And when I put there main windows title, then it does not find msgbox windows..., with title "" it find only one window...

Is there any way to check window by a style or smoe window type?

Share this post


Link to post
Share on other sites
Kornel

ok, I have some progress, can you tell me how to check style of window? i cant find any function ;/

Share this post


Link to post
Share on other sites
Kornel

doesn't work for style... in help file wrote:

A special description can be used as the window title parameter. This description can be used to identify a window by the following properties:

TITLE - Window title 
CLASS - The internal window classname 
REGEXPTITLE - Window title using a regular exp<b></b>ression (if the regular exp<b></b>ression is wrong @error will be set to 2) 
REGEXPCLASS - Window classname using a regular exp<b></b>ression (if the regular exp<b></b>ression is wrong @error will be set to 2) 
LAST - Last window used in a previous AutoIt command 
ACTIVE - Currently active window 
X \ Y \ W \ H - The position and size of a window 
INSTANCE - The 1-based instance when all given properties match 
One or more properties are used in the title parameter of a window command in the format:

[PROPERTY1:Value1; PROPERTY2:Value2]

It seams the style option doesn't exist. Thats why I wrote this topic >_<

Share this post


Link to post
Share on other sites
Kornel

ok, I wrote a simple "child window finder", but I need to check style of window to be done

#Include <WinAPI.au3>
Func check_msgbox()
    Opt("WinTitleMatchMode",4)
    $asd=WinList()
    $wkpl=WinGetHandle("Main window")
    For $i = 1 to $asd[0][0]
        If $wkpl=_WinAPI_GetParent($asd[$i][1]) And $asd[$i][0]<>"Default IME" Then MsgBox(0,"open window",$asd[$i][0])
    Next
EndFunc

Share this post


Link to post
Share on other sites
monoceres

You can use _WinAPI_GetWindowLong to retrieve a windows style & exstyle.


Broken link? PM me and I'll send you the file!

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.