Jump to content

Recommended Posts

Posted

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!

Posted (edited)

  On 1/27/2011 at 9:15 AM, 'zhaicheng said:

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

Posted

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

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
  • Recently Browsing   0 members

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