10-17-2007, 05:27 PM
If QM runs in remote computer, it should recognize windows well. If QM runs in local computer that controls the remote computer, it cannot recognize windows in the remote computer, because in local computer whole remote view is just an image, not windows. That is why your macro finds the window that displays the image.
----
Try function WinC.
Or get window handles with GetWindowList, then search for a child window or accessible object or html element in each window.
Let's say there are two "Untitled - Notepad" windows. One contains text "one", another contains text "two". How to find the window that contains "one"?
Using WinC:
Using GetWindowList:
Then:
----
Quote:I have one more question...
Try function WinC.
Or get window handles with GetWindowList, then search for a child window or accessible object or html element in each window.
Let's say there are two "Untitled - Notepad" windows. One contains text "one", another contains text "two". How to find the window that contains "one"?
Using WinC:
Using GetWindowList:
ARRAY(int) aw; int i h
GetWindowList 0 "" 3 0 0 aw
h=0
for i 0 aw.len
,if(!wintest(aw[i] "Untitled - Notepad" "Notepad")) continue
,Acc a=acc("" "TEXT" aw[i] "Edit" "one" 0x1804 0x0 0x20000040)
,err continue ;;the window does not contain object "one"
,h=aw[i]; breakThen:
