I've been struggling for a hour trying to write a script that I can't debug in the editor because of the nature of the program that I'm running. I wrote this test script and what I believe I've found is that WaitWindowOpen and WIN_USEHANDLE are not playing together well.If the WIN_USEHANDLE variable is set to 1 window_title must be a window handle
If I set WIN_USEHANDLE to 0 the following script runs without error. However If I set WIN_USEHANDLE to 1 this is what I see happening.
1- GetActiveWindow sets the variable "title" to the notepad window handle
2- WaitWindowOpen>notepad* executes, but according to the way I understand the Help for WaitWindowOpen> it should timeout instead
3- WaitWindowOpen>%title% times out, but according to the way I understand the Help for WaitWindowOpen> it should execute.
4- Changing the value of WF_TYPE has no effect except for WF_TYPE=3 and Notepad has no child windows
Code: Select all
Run>notepad.exe
Let>WIN_USEHANDLE=1
Let>WF_TYPE=0
Let>WW_TIMEOUT=2
GetActiveWindow>title,x,y
WaitWindowOpen>notepad*
MDL>Use Handle=%WIN_USEHANDLE%%CRLF%Win Result=%WW_RESULT%%CRLF%Title=%title%
WaitWindowOpen>%title%
MDL>Use Handle=%WIN_USEHANDLE%%CRLF%Win Result=%WW_RESULT%%CRLF%Title=%title%
CloseWindow>%title%