Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
Grovkillen
- Automation Wizard
- Posts: 1132
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
-
Contact:
Post
by Grovkillen » Thu Dec 17, 2020 11:52 am
I need to set the window handle to zero before running the GetWindowHandle command just to be sure that the value isn't from a previous check. I would expect the command to return zero if nothing is found.
Code: Select all
Let>WINDOW_HANDLE=0
GetWindowHandle>Window Title*,WINDOW_HANDLE
-
JRL
- Automation Wizard
- Posts: 3530
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Thu Dec 17, 2020 3:38 pm
Well... apparently if no window is found the result is not set to anything. Since window handles are always a number, rather than presetting the result value to "0" I'd set it to a text value perhaps "BLANK" or even "ZERO". After the GetWindowHandle> function if the result is still set to the preset text, you'll know that no window was found.