Jump to content

win title match mode


chun914
 Share

Recommended Posts

Are there any ways to match only the win title, but not the visible window text

Matches partial titles from the start, and ignore the visable text.

for example..

2 windows

window title : ABC - 12345678 [orginal] - DEF - Active

window title : ABC - 23456789 [copy] - DEF - Active

program will read the no. "12345678" | "23456789" from file

and open the windows

winactive("ABC - " & $number, "")

but there'll be some error window pop up from the : ABC - 23456789 [copy] - DEF - Active

that window will have the title : Error

now..

i check for

WinExists("Error","")

but ^ this code always look into other window's visible text, and cause error....

is there any way i can check only title = "Error" and do not look into the visible text ?

Link to comment
Share on other sites

  • Moderators

The help file is quite specific.

Opt('WinTitleMatchMode', 2)
Global $Win = 'ABC - ', $GetTitle
While 1
    $GetTitle = WinGetTitle($Win)
    If WinExists($Win) Then MsgBox(64, 'Info', 'The full Title is: ' & @CR & $GetTitle)
    Sleep(10)
WEnd

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...