Sign in to follow this  
Followers 0
bhumis

_IECreate gives error - vbs file opens in IE

5 posts in this topic

Hi everyone,

I am new to AutoIT. I searched this forum before posting this topi and could not find a solution.

I have a vbs app which opens in IE browser. Before opening IE browser it gives "File Download" security warning.

I am using _IECreate to open the vbs app and it gives IE.au3 (560) : ==> The requested action with this object has failed.:

ex:

_IECreate("file:///C:/Program%20Files%20(x86)/auto-config/config_wizard.vbs")

When i try to to open this it gives File Download dialog. Before that _IECreate gives error.

Is there anyway that i can get handle for this vbs file that opens in IE. Any help is appreciated.

Thanks,

bhumis

Share this post


Link to post
Share on other sites



I'm curious why you are opening a VBS file using IE? It seems IE is doing exactly what I would think it'd do in this situation, try to download the file.

Can you describe your entire situation in greater detail?

Share this post


Link to post
Share on other sites

Mitchell,

We have a vbs wizard and when i double click on it it opens in IE browser only (it is written that way) and there are few pages in that browser window where i ave to enter values in it and connect to some other server.

That's the requirement. The vbs wizard will open up only in browser. _IEAttach is not working if i give the URL or title of the browser window. The only way that i can get the object for this browser window is to get the IE object by getting the handle of the IEFrame.

If i have more than one browsers open (say for ex: junkins browser and some other browser opened before), how do i get handle for this vbs browser window?

I do not know how to attach the snapshot here to show you the vbs browser window. I will figure out and then attach the snapshot.

Thanks,

bhumis

Share this post


Link to post
Share on other sites

Is your VBS opening in IE because you have associated IE with the VBS file type? If not then the VBS might be opening the IE window. If that's the case then whatever is in the VBS may be able to be converted to AutoIt.

What happens when you run on the command line: "wscript <vbs>" where <vbs> is your VBS filename?

Share this post


Link to post
Share on other sites

The default "open with" setting is nto IE for vbs file. That's the mechanism. When i run the vbs file from the cmd line using wscript it opens in IE without any "File download warning" windows.

I am not able to get the handle of this browser window using _IEAttach function passing "URL". It gives me handle only if i say "IEFRAME" instead of url. Anyway i am trying to get teh hanlde by getting all teh window handles of all teh open browsers.

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