Sign in to follow this  
Followers 0
cypher175

No @ERROR for _IECreate with $f_wait set to 1 if IE is closed before page is 100% loaded..?

5 posts in this topic

How come no @ERROR is set if the IE page is closed before its finished 100% loading..??

Try the below code and right after the IE page is opened, close it before its done loading an nothing else happens, no @ERROR is set..??

Is there any way to detect if the IE page was closed before it was 100% done finished loading..??

#NoTrayIcon
#include<IE.au3>
    $IE = _IECreate("www.autoitscript.com",0,1,1,0)
    If @error Then 
        MsgBox(0,"_IECreate", "FAILED")
    EndIf

$f_wait Optional: specifies whether to wait for page to load before returning

0 = Return immediately, not waiting for page to load

1 = (Default) Wait for page load to complete before returning

Share this post


Link to post
Share on other sites



Anybody know anything about this at all..??

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

$IE = _IECreate("www.autoitscript.com",0,1,1,0)

The bold parameter is $fWait, and not the one after that.. I'm not sure if you knew this.

More importantly, if you close the IE window that it creates before the page is completely loaded it will throw an $_IEStatus_LoadWaitTimeout after a while, indicating that the page or window hasn't loaded.

Try this code to see:

#include<IE.au3>

_IELoadWaitTimeout(1000)
$IE = _IECreate("www.autoitscript.com",0,1,1)
If @error Then 
    MsgBox(0,"_IECreate", "FAILED")
EndIf

( watch the output in SciTe4AutoIt3 )

Share this post


Link to post
Share on other sites

aight thanx Manadar, that seems to work..

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