Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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').
Posted

$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

Posted

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 !")
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

Posted

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 ?

  • Developers
Posted

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.
  :)

Posted

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.

Posted

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().

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
×
×
  • Create New...