Jump to content

Using regular expression to match a window?


Recommended Posts

Is it possible to use regular expression to match a window ’s text ,not a title or classname?

Although I can solve the problem by first getting the text by using "WinGetText" Function, and then matching with "StringRegExp".

Is there any direct way?

Many thanks!

Link to comment
Share on other sites

Is it possible to use regular expression to match a window ’s text ,not a title or classname?

Although I can solve the problem by first getting the text by using "WinGetText" Function, and then matching with "StringRegExp".

Is there any direct way?

Many thanks!

is a PsaltyDS alternative...

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

That is built into Autoit with "WinTitleMatchMode" Mode 4

WinWait('[REGEXPTITLE:(?i)Windows Media]')  ;RE for Windows Media anywhere in title case insensitive

WinWait('[REGEXPTITLE:xplorer²; REGEXPCLASS:ATL:ExplorerFrame]')   ;RE for xplorer² anywhere in title & Class ATL:ExplorerFrame
It comes in handy when matching Titles or Classes with a colon ":" in them

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...