Kornel Posted August 10, 2009 Share Posted August 10, 2009 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. Link to comment Share on other sites More sharing options...
WolfWorld Posted August 10, 2009 Share Posted August 10, 2009 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 Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets! Link to comment Share on other sites More sharing options...
Kornel Posted August 10, 2009 Author Share Posted August 10, 2009 (edited) 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 August 10, 2009 by Kornel Link to comment Share on other sites More sharing options...
WolfWorld Posted August 10, 2009 Share Posted August 10, 2009 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() Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets! Link to comment Share on other sites More sharing options...
Kornel Posted August 10, 2009 Author Share Posted August 10, 2009 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? Link to comment Share on other sites More sharing options...
WolfWorld Posted August 10, 2009 Share Posted August 10, 2009 Now just use any WinGet.. function to get the Class, Style and etc. $var = WinList() For $i = 1 to $var[0][0] WinGet...($var[$i][1]) Next Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets! Link to comment Share on other sites More sharing options...
Kornel Posted August 10, 2009 Author Share Posted August 10, 2009 ok, I have some progress, can you tell me how to check style of window? i cant find any function ;/ Link to comment Share on other sites More sharing options...
WolfWorld Posted August 10, 2009 Share Posted August 10, 2009 (edited) Use Opt("WinTitleMatchMode", 4) Now in all of Win.. Function you can use WinGetTitle('[Style:0x17CF0000; ExStyle:0x00000100]'...) Edited August 10, 2009 by athiwatc Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets! Link to comment Share on other sites More sharing options...
Kornel Posted August 10, 2009 Author Share Posted August 10, 2009 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 >_< Link to comment Share on other sites More sharing options...
Kornel Posted August 10, 2009 Author Share Posted August 10, 2009 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 Link to comment Share on other sites More sharing options...
monoceres Posted August 10, 2009 Share Posted August 10, 2009 You can use _WinAPI_GetWindowLong to retrieve a windows style & exstyle. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Kornel Posted August 10, 2009 Author Share Posted August 10, 2009 ok, thx it works now! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now