WinObj either cannot be identified or is not visible when I run my script.
BUT when I click "Debug" button in the error message box that appears, then open the object repository and highlight in application the WinObj, the WinObj gets highlighted. And when I resume running my script, the script runs fine --- the error doesn't occur anymore.
How can I prevent this error from happening?
UPDATE: My code goes roughly like this:
Public Function getText( winObjObject, textArray )
Dim textHolder
textHolder = winObjObject.GetVisibleText() '' this is where the error occurs
textArray = Split(textHolder, vbCrLf)
End Function