I guess Im not completely clear on what youre asking. Do you want the above script debugged? Or wanting to add to the existing script, functions that do what youre wanting? Would need to know a little more about the software/dats you are wanting to check for in order to assist.