Sign in to follow this  
Followers 0
Guest trewdy

Wintitlematchmode

2 posts in this topic

As with others, I'm being frustrated by uninstaller windows that do not change title from window to window. Hence, I'd like to be able to wait for a window based on title and a StringInStr match in the window text.

e.g.

WinWait("Norton Antivirus 2002 Professional Edition","restart")

I have not found documentation to support this, but it seems that this code will wait for an exact window text match on "restart" instead of just looking for "restart" within the window text string.

It seems like what I want is the functionality of WinTitleMatchMode=2 (match any substring) to also affect the way that WinWait matches the text. However, the documentation sounds as if WinTitleMatchMode only affects the title and does not affect the text.

If not, I think I'll have to do some like:

$i=0

While $i=0

WinWait("Norton Antivirus 2002 Professional Edition","")

$text = WinGetText("Norton Antivirus 2002 Professional Edition","restart")

$result = StringInStr($text,"restart")

If $result = 0 Then

$i = 0

Else

$i = 1

Endif

Can anybody clear this up?

Thanks.

Share this post


Link to post
Share on other sites



Interesting...

That must be why it seems to work with some versions of Norton uninstalls. It's strange that its not working with this one particular window though. I've even played around with the hidden text setting. AutoItSpy shows "restart" as a string inside of the window text (not hidden).

A collaborator on my script thinks he's got it figured out so I'll just have to wait to hear back from him.

Glad that WinWait is defaulted with the functionality that I wanted though.

Thanks Larry.

Share this post


Link to post
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
Sign in to follow this  
Followers 0