Sign in to follow this  
Followers 0

Add ability to search window titles using classname+regexp

8 posts in this topic

Posted

Hi all,

Sometimes we need to get title from not so standard windows, such as "Save As"..

For example (this is my case), i need to get title from saving dialog of MS Office applications - for MS Word i do that:

Opt("WinTitleMatchMode", 4)
$Title = WinGetTitle("classname=#32770", "FolderView")
If $Title = 0 Then $Title = WinGetTitle("classname=bosa_sdm_Microsoft Office Word 11.0", "FolderView")

ConsoleWrite($Title)oÝ÷ Ø­~趫²Æ²>¬ú"Ø­ßÛ'¢Ü(®HƧrw«,©ú· {bÂ)ev(Øb	bëaÆ®¶­sd÷BgV÷CµvåFFÆTÖF6ÖöFRgV÷C²ÂB¢b33cµFFÆRÒvävWEFFÆRgV÷C¶6Æ76æÖR·&VvWÖ&÷6÷6FÒâ¢gV÷C²ÂgV÷C´föÆFW%fWrgV÷C²

Because almoust all saving dialogs from MS xx have at the begining of class this: bosa_sdm

But this feature will be usefull not just in my case.

Thanks.

Share this post


Link to post
Share on other sites



Posted

Hi all,

Sometimes we need to get title from not so standard windows, such as "Save As"..

For example (this is my case), i need to get title from saving dialog of MS Office applications - for MS Word i do that:

Opt("WinTitleMatchMode", 4)
$Title = WinGetTitle("classname=#32770", "FolderView")
If $Title = 0 Then $Title = WinGetTitle("classname=bosa_sdm_Microsoft Office Word 11.0", "FolderView")

ConsoleWrite($Title)oÝ÷ Ø­~趫²Æ²>¬ú"Ø­ßÛ'¢Ü(®HƧrw«,©ú· {bÂ)ev(Øb	bëaÆ®¶­sd÷BgV÷CµvåFFÆTÖF6ÖöFRgV÷C²ÂB¢b33cµFFÆRÒvävWEFFÆRgV÷C¶6Æ76æÖR·&VvWÖ&÷6÷6FÒâ¢gV÷C²ÂgV÷C´föÆFW%fWrgV÷C²

Because almoust all saving dialogs from MS xx have at the begining of class this: bosa_sdm

But this feature will be usefull not just in my case.

Thanks.

just read the doc about advanced windows matching :)

Share this post


Link to post
Share on other sites

Posted

just read the doc about advanced windows matching

Oh, i read it many times, thanks, but still i do not understand how to combine class with regexptitle ?

Here what i am trying:

Opt("WinTitleMatchMode", 4)
$Title = WinGetTitle("[CLASS:bosa_sdm; REGEXPTITLE:(?i)(.*)]", "FolderView")
ConsoleWrite($Title)

I get 0 :)

I mean, i need to search for window with classname that starts from bosa_sdm, and ends with any string (.*) - I do not think that this is can be done now in AutoIt (using standard functions) - i wish i wrong.

Share this post


Link to post
Share on other sites

Posted (edited)

Oh, i read it many times, thanks, but still i do not understand how to combine class with regexptitle ?

Here what i am trying:

Opt("WinTitleMatchMode", 4)
$Title = WinGetTitle("[CLASS:bosa_sdm; REGEXPTITLE:(?i)(.*)]", "FolderView")
ConsoleWrite($Title)

I get 0 :)

I mean, i need to search for window with classname that starts from bosa_sdm, and ends with any string (.*) - I do not think that this is can be done now in AutoIt (using standard functions) - i wish i wrong.

perhaps it does not work but that what Jon intent to do perhaps I broke it when I try to simplifly the doubling chars. I have a look if I can reproduce :P

Edit: Wintitlematch is not need with this "Advanced Windows descriptions"

Edited by jpm

Share this post


Link to post
Share on other sites

Posted

First thing class and reggexptitle are indepedant I mean class is match as is and after the regexptitle will apply to those matched windows

That does not solved your issue

Share this post


Link to post
Share on other sites

Posted

Is this will be implemented some day? :) just bumping as Jon said :P

Share this post


Link to post
Share on other sites

Posted

It sounds to me like the most simple solution is to add a new CLASSREGEX property. Shouldn't be that hard (I haven't looked at the code)?

Share this post


Link to post
Share on other sites

Posted

It sounds to me like the most simple solution is to add a new CLASSREGEX property.

And most effective solution :D - it would be perfect if this property will be added.

Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0