I have the a similar thing in my program. I used error handling and recursion.
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
Sub AttachScreen (counter as int)
Playback.Logging = False 'Turn off logging or a lot of errors are created in the error log
On Error Goto Errorstatement
'Try to attach here
if (counter <50) then 'It hasn't failed enough times to be of concern
AttachScreen(counter+1) 'if it fails, try again and increase the counter
'it failed more than 50 times
MsgBox("Augh! Its broken!"
Playback.Logging = True
The pity condition of mine is, that TP is not able to identify all the objects in my application. It only indentifies windows and frames....
My application is built in AR Remedy..
I am trying to add the .olb &.tlb files of AR-Remedy as reference and try to make tp recognize.. the objects
The other way i could have opt is with bitmap events..
But they too r not reliable always..