Jump to content

how do I get the handle of 3 identics windows


Recommended Posts

If you don't have to get them in the order that you created them then you can use WinList() to retrieve all the IE windows.

Link to comment
Share on other sites

$oIE is an object instance and not the handle to the window. To get the handle you need: $hwnd = _IEPropertyGet($oIE, 'hwnd').

Actually Authenticity is correct about the "handle". I have always use the "object instance" as the "handle" to manipulate the Internet Explorer. That's why _IECreate() returns the "object instance"

8)

NEWHeader1.png

Link to comment
Share on other sites

why is'nt this code working ? the msgbox appears before the page load completly.

#include <IE.au3>
$oIE1 = _IECreate ("http://www.yahoo.com") ;Open IE and go to yahoo
$hwnd1 = _IEPropertyGet($oIE1, 'hwnd')    ;retrieve the handle
WinSetState($hwnd1,"",@SW_MAXIMIZE) ;set to max
sleep(3000)                                           ;wait 3sec
send("{F5}")                       ;refresh
_IELoadWait($hwnd1)     ;wait for the page to be completely loaded
MsgBox(0,"","the page is loaded !")
Link to comment
Share on other sites

  • Developers

thank you :D

Now I would like just to check if the page is fully loaded, but not to wait, because I want the program to

do other things while the page is loading.

is there a way to do that ?

Reread your own question and try to think about what you just wrote here.

Don't you think you're somewhat vague here to say the least?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

You can put the things you want to do in a loop and exit it if _IEPropertyGet($oIE1, 'busy') returns false or you can look here to see the InternetExplorer.Applocation object model and see what event gets fired and when. You'll need to see the example in the help file in the function ObjEvent().

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...