Jump to content

Catching and handling errors from 3rd party software


Recommended Posts

Hey guys,

First off, I'm an absolute newb at this but I'm willing to read help files and the like but I just don't know enough yet to know what functions to be looking up!

Anyway, I'm trying to automate a process that can take a lot of time if there's a lot of updates to run on our systems.

I have managed to make a script to automatically run each update that is selected but it runs off the assumption that every update has run successfully. Now I'm looking to try to handle the errors that the 3rd party software that actually does the updating can throw. After a successful update a child window is thrown that is easily identifiable using the title and its static text, ie, "Systems updater" "System update completed successfully."

It's very easy for me to generate all the possible errors manually (file not found, wrong file selected or whatever) but I need a way of getting my script to recognise which one has been triggered. I could use an untidy "Sleep -> Test to see if any of these windows is present -> Act if present, sleep again if not" but I'm guessing there must be a clever way of getting the script to catch any new window triggered (since one update may take 10 seconds but another may take 10minutes) and identify it?

I've had a look at the AutoIt v3 Window Info tool but don't know enough to know what info I need to steal from it or even how to catch when a window is triggered.

First question I guess is: Is there a way of saying "Wait for a new child window to appear in "Systems Updater" window" without having to sleep for a fixed time and testing for any window and then sleeping again?

If so, what do I need to compare to see what sort of window this new one is? Do I want to look at the Window Handle string from the summary tab in the window info AutoIt tool?

I hope I've said enough there but if not I can trim down my fail code and try to post it here if that'll help at all ... ?

Thanks in advance for any help (:

*edit - Also, is it possible to take the file that's being updated and add it to a winzip file automatically and just give it the same name and same path? So then database1 will have been added to database1.zip in the same dir and basically act as a backed up file. We have winzip pro if that makes any difference.*

Edited by yoinkster
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...