I want to wait till the particular text appears on the window before it attaches and start other process.. Is there any way to do it as a global function .. so that we can just pass the attach name and the Text on that window to the function.. then it wait till the window with the text comesup then resumes.. any idea?
You can use following wait method code as per your requirement
Do While Not IEWindow("Application=IEXPLORE.EXE Caption='* - Microsoft Internet Explorer'", tpAttachNoWait).Exists
Pause 1, tpPauseSeconds
waittime = waittime + 1
If waittime > 120 Then
MsgBox "Window is not responding fast!!!"
waittime = 0