Jump to content

Wait for update to finish how?


Recommended Posts

I need help with waiting for a program to finish updated before continuing the script.

It is Spyware Blaster... It uses not standard controls. After it updates an OK button appears, i tried waiting for it, but that does not work. None of the controls can be accessed via keyboard.

Is there a way to wait until the program is idle?

I really would prefer not to use sleep, as the updates could take 1 second or 1 minute depending on the number and the computer...

Link to comment
Share on other sites

what about ClassnameNN?

EDIT: or maybe you could use winwaitactive and then use the Title for the windows that pops up

Its ClassnameNN is ThunderRT6UserControlDC8 what can i do with that?

As for the window, the window never changes... it does not open a new one, just changes whats in the panel...

Link to comment
Share on other sites

then you could might use:

Do
    Sleep(200)
Until ControlCommand("Title","","ThunderRT6UserControlDC8","IsVisible","")

Tell me if it works.. else you can do another thing. if it for examples come with some text about it is done

EDIT: you should offcause change the Title to the window title for the specific window.

Edited by newbiescripter
Link to comment
Share on other sites

then you could might use:

Do
    Sleep(200)
Until ControlCommand("Title","","ThunderRT6UserControlDC8","IsVisible","")

Tell me if it works.. else you can do another thing. if it for examples come with some text about it is done

That did the trick. Thank you, this will come in handy in many programs... Thnx :)

Link to comment
Share on other sites

No problem :)

Yes it's quit smart when you for example makes an auto installer or something like that.

In some programs the ClassnameNN change, then you could try search for a specific string in the window. for example. "Update completed".

Besides using WinWait and specific strings (which didnt work) how can i wait for a specific string?

Link to comment
Share on other sites

Besides using WinWait and specific strings (which didnt work) how can i wait for a specific string?

If you will wait for a specific string in a control you could use this:

; See if the given text is in a special install window / Control:
; Navigate to My Network Places and from the Network Tasks menu, click Add a network place.
; when the Add Network Place Wizard pops up the msgbox should apear.

While 1

if StringInStr(ControlGetText("Add Network Place Wizard", "", "Static1"), "Welcome") = 1 then   
    ; maybe you should change the title in controlgettext to make it work cause i'm not using the english version of windows
    MsgBox(0,"title","We are now in the beginning of the add network guide")
endif

WEnd

; Maybe it doesn't work on your computer, since I've the danish version of XP I have just tried to make is as I think it is in the English version
; But you now know how to do and can just modifie it a little.

I hope that this will help you.

tell me if it works for you.. :)

Regards

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