Sign in to follow this  
Followers 0
benzmaster

how do I get the handle of 3 identics windows

15 posts in this topic

Hi,

if I launch 3 IE windows.

how do I get their respective handle ?

WingetHandle is based on the title of the window, but if the titles are the same, how can I do ?

thx

Benz

Share this post


Link to post
Share on other sites



$oIE1 = _IECreate()

$oIE2 = _IECreate()

...etc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

thx !

Share this post


Link to post
Share on other sites

mmh... are you sure.. ?

it's not working

#include <IE.au3>
$oIE1 = _IECreate ("http://www.google.Fr")
MsgBox(0, "handle read was:", $oIE1)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

mmh... are you sure.. ?

it's not working

#include <IE.au3>
$oIE1 = _IECreate ("http://www.google.Fr")
MsgBox(0, "handle read was:", $oIE1)
$oIE is an object instance and not the handle to the window. To get the handle you need: $hwnd = _IEPropertyGet($oIE, 'hwnd').

Share this post


Link to post
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

Share this post


Link to post
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 !")

Share this post


Link to post
Share on other sites

thx !!!!!!!

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

thx !!!!!!!

I just said/explained that above. I hardly ever use the "handle" with IE.

Thats why I use the IE as the 'handle" in the first post, I figured that was what you wanted!!

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

sorry but I don't understand what you mean.

_IELoadWait() pause the script while the page is loading.

I would like my script just to check if the page is fully loaded.

Share this post


Link to post
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().

Share this post


Link to post
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
Sign in to follow this  
Followers 0