Matt and Allen,
Thanks for taking the time to get back to me.
I have looked at that section of the help and use WaitWindow and then check if the window exists. After that is where I'm running into my problem. I know the window has a checkbox, I just don't know what the checkbox will say. I know the checkbox will be for one of two things. That is why I was trying:
I attempted at using Find, but everytime I used Exists after Find, it always comes back false. That may have to be with the way I am using Find though. I tried this:
result = process["Window"]("Information")["Find"]("Button", checkbox1)
I have a feeling I'm overlooking something very simple.
Here is what I'm trying to do. I message pops up. I grab what the message says, write it to a file and then clear the message. The message has a checkbox though that I want to check. The text for the checkbox could be one of two things. I am wondering how I can find the checkbox and check it no matter what the text for it is.
This would return an array of objects that have the ClrClassName of "CheckBox". The first 2 parameters signify PropertyNames and PropertyValues, and can be an array as well (which is normally the case for me). The 3rd parameter is for the depth to search, if you have panels or groupboxes in your messagebox then your depth would need to be greater than 1 probably. This 3rd parameter is optional, and there is a 4th parameter that is also optional (look up the FindAllChildren method in the help for more info).
I would then loop through the returned array and since you want all checkboxes checked simply check the property that states whether it is already checked (off the top of my head I can't remember it, maybe Checked or IsChecked) and if it is not checked then call the Click method of the checkbox.
<font class="small">Code:</font><hr /><pre> For intArrayCounter = 0 To UBound(arrCheckBoxObjects )
If arrCheckBoxObjects(intArrayCounter).Checked = False Then
You wouldn't even have to worry about if the checkbox exists because the FindAllChildren will only return the checkboxes that are present on the messagebox.