Jump to content

Internet Explorer


Recommended Posts

Hello,

I can't find any information on the IE functions, except for the samples in the AutoIt 1.. 2.. 3..

Am I a total retard or isn't this documented?

Thank you!

Retard! Nah, just kidding, it is in the help file. An easy way to access it is to open a script up, type _IE and then press F1, it will open the helpfile with all the _IE functions, there waiting to be read!

Best of Luck, J.B.

Link to comment
Share on other sites

Alrighty, thanks. I've never used the help file before, but settles with the online docs :)

Now I have another problem. How can I use the IE functions on an already existing IE window? I only see _IECreate as a possible way to create an IE object.

Thanks!

Edit:

This is how I'm doing it now, btw.

$ie = ControlGetHandle($win, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]")

_IENavigate($ie, "http://www.google.com/")

And this is the error I get:

rror from function _IENavigate, $_IEStatus_InvalidDataType

Edited by SaphuA
Link to comment
Share on other sites

You have a type string as $ie when you need a object, the same thing is laid out in http://www.autoitscript.com/forum/index.php?showtopic=74865 without any response to it.

But I found a way to get around it. Find _IEAttach and the same properties apply to the $ie before you call _IENavigate. If you need help I'll be back around about 9:00 from now

Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Link to comment
Share on other sites

You have a type string as $ie when you need a object, the same thing is laid out in http://www.autoitscript.com/forum/index.php?showtopic=74865 without any response to it.

But I found a way to get around it. Find _IEAttach and the same properties apply to the $ie before you call _IENavigate. If you need help I'll be back around about 9:00 from now

Ah _IEAttachs seems to be of good use, but I was unable to implement it so far.

#include <IE.au3>
$win = WinGetHandle("SaphuA")
if $win == "" then
else
    $ie = _IEAttach($win, "embedded")
    _IENavigate($ie, "http://www.google.nl")
endif

Gives me:

--> IE.au3 V2.4-0 Warning from function _IEAttach, $_IEStatus_NoMatch

--> IE.au3 V2.4-0 Error from function _IENavigate, $_IEStatus_InvalidDataType

On the left is the component with the IE Controll and on the right is the AutoIt Window Info.

Posted Image

Edited by SaphuA
Link to comment
Share on other sites

One explanation would be that you have more than one window with the same title... and the other, the one you get the handle for, has no embedded webbrowser control. Suggest you do some testing to insure you found the right window (like minimize it using WinSetState).

It does work. If you have the AutoIt Help File open, the small change to your script works for me:

#include <IE.au3>
$win = WinGetHandle("AutoIt Help")
if $win == "" then
else
    $ie = _IEAttach($win, "embedded")
    _IENavigate($ie, "http://www.google.nl")
endif

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...