COM interface with explorer issue
-
- Posts: 9
- Joined: 26 Mar 2016, 10:23
COM interface with explorer issue
Ok so I have a window which I need to logout of.. When I do this however, I need to click() on a button which opens a new tab. The logout is on the bottom of this new tab window. Of course, ComOBJCreate() is attached to the first window. and I need to access the second. Are there any suggestions on how to get the Com object of the new window so that I can interact with that windows controls.
Re: COM interface with explorer issue
Well, you could get it by window title or webpage name/url (see WBGet & IEGet here) ...
... or you could utilize the fact that that the new window should be the last item in the shell.application->windows collection. You could do this by getting the window count, clicking the link, waiting for the window count to increase, then grabbing the last window:
... or you could utilize the fact that that the new window should be the last item in the shell.application->windows collection. You could do this by getting the window count, clicking the link, waiting for the window count to increase, then grabbing the last window:
Code: Select all
windows := ComObjCreate("shell.application").windows()
count := windows.count
; Click Link Here
while (count = windows.count)
sleep 100
wb := windows.item(windows.count - 1)
Who is online
Users browsing this forum: Bing [Bot] and 144 guests