Troubleshooting
Problem
This technote states the FindWindow API function in IBM® Rational® Robot does not work if only the class name is passed as a parameter.
Symptom
If you try to use the FindWindow API function, passing only the class name and an empty string for the caption, Robot is unable to detect the window. This can be reproduced by opening Notepad and trying to execute the line:
ret = FindWindow("Notepad", "")
Cause
The problem is that SQABasic does not have an equivalent to VBNullString
Resolving The Problem
The workaround is to change the data type for the second parameter in the declaration of the FindWindow function from 'String' to 'Any', and then pass 0& as the second parameter when calling the function.
For example, the following code will return the handle of the first window found with the class name "Notepad":
|
Historical Number
8782
Was this topic helpful?
Document Information
More support for:
Rational Robot
Software version:
2003.06.00, 2003.06.10, 2003.06.12, 2003.06.13, 2003.06.14, 2003.06.15, 2003.06.16, 7.0, 7.0.0.1, 7.0.0.2, 7.0.0.3, 7.0.1, 7.0.1.1, 7.0.1.2, 7.0.0.4, 7.0.1.3, 7.0.2
Operating system(s):
Windows
Document number:
334189
Modified date:
16 June 2018
UID
swg21151084