Jump to content

[solved] about _iecreate()


Recommended Posts

I would like to use _IEcreate() to open the IE windows, but cannot open the IE, and I don't know why,

my code is,

#include <IE.au3>  
$oIE = _IECreate ("www.baidu.com",0,1,1,0)

and click "F5", its shows as below,

--> IE.au3 T3.0-2 Error from function _IENavigate, $_IESTATUS_InvalidObjectType

Now I am using the latest version for AutoIt.

BTW, I could use Run & shellexecute to open the IE in my AutoIt, but it could not return the handle.

 

test2.au3

Edited by yjing1982
Link to comment
Share on other sites

Hello Yjing1982 and Welcome to the Forums,

when i run your test2.au3 it opens IE page fine with no problems.

A quick search of the error lead me to this Link . so basically start by trying this 

New security in Windows Vista causes a new browser window to be created when a browser is instructed to navigate to a URL in a different security zone.
This occurs as well with the initial creation and navigation initiated with _IECreate().
The new window is a new browser instance and the previous browser object variable no longer points to it.
There are several workarounds:
    1) add #RequireAdmin to your code (this is required even if the account is part of the Administrator's Group and will prompt for credentials if necessary),
    2) use _IEAttach() to connect to the new browser window
    3) add the target website to the Trusted Sites security zone in IE,
    4) turn off "Protected Mode" in IE,
    or 5) disable UAC. Care must be taken to understand the implications of disabling IE security features when accessing untrusted sites.
 

and if it doesn't work try downgrading to IE9

Edited by CrypticKiwi
Link to comment
Share on other sites

Hello Yjing1982 and Welcome to the Forums,

when i run your test2.au3 it opens IE page fine with no problems.

A quick search of the error lead me to this Link . so basically start by trying this 

and if it doesn't work try downgrading to IE9

I am glad to see your reply, CrypticKiwi. I will try it again following your instructions. 

I have solved the problem and it is for UAC, thanks a lot!

Edited by yjing1982
update
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

×
×
  • Create New...