Jump to content
Sign in to follow this  
Guest trewdy


Recommended Posts

Guest trewdy

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.


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:


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


$i = 1


Can anybody clear this up?


Share this post

Link to post
Share on other sites
Guest trewdy


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