Jump to content

How to do _IEAttach?


Sybok
 Share

Recommended Posts

Hi, a newbie here.

I have a running browser, and (I think) I want to attach to the browser to determine when a page completes. The idea is that I do some stuff to kick off a report that takes awhile (perhaps 30 minutes). When the report is done, the browser completes loading the return page; for the 30 minutes, it has the hourglass and is waiting data from the server.

I wanted to do something like

$IEObj = _IEAttach ("This is the Title on my Browser")

_IELoadWait ($IEObj)

However, the IEAttach always returns the NoMatch error.

I tried specifying the second parameter, _IEAttach ("This is the Title on my Browser","Title") and _IEAttach ("This is the Title on my Browser", "title"), as well as trying variations on the title string (does it need the entire title, or can I just specify the first part of the title?).

Any clues to how I should do this?

Also, would I expect this to work with Firefox? I would prefer to use Firefox, although I can use IE if I have to.

Thanks for any help,

brew

Link to comment
Share on other sites

Hi, a newbie here.

I have a running browser, and (I think) I want to attach to the browser to determine when a page completes. The idea is that I do some stuff to kick off a report that takes awhile (perhaps 30 minutes). When the report is done, the browser completes loading the return page; for the 30 minutes, it has the hourglass and is waiting data from the server.

I wanted to do something like

$IEObj = _IEAttach ("This is the Title on my Browser")

_IELoadWait ($IEObj)

However, the IEAttach always returns the NoMatch error.

I tried specifying the second parameter, _IEAttach ("This is the Title on my Browser","Title") and _IEAttach ("This is the Title on my Browser", "title"), as well as trying variations on the title string (does it need the entire title, or can I just specify the first part of the title?).

Any clues to how I should do this?

Also, would I expect this to work with Firefox? I would prefer to use Firefox, although I can use IE if I have to.

Thanks for any help,

brew

Use autoit window info tool to get the exact title on the website. No it will NOT work in firefox hence the command name IE. Firefox doesn't support DOM object commands so you can't use firefox.

Link to comment
Share on other sites

Please see the docs in the helpfile for the various modes for _IEAttach... in particular:

Title = (Default) sub-string of main document title

WindowTitle = sub-string of full window title (instead of document title)

The document title is the string inside the HTML <TITLE> tag, it is not the full window title - use WindowTitle for that. Also not that both use a sub-string, which means any portion of the string will match.

ThatsGreat is right that you cannot use it with FireFox, but to be precise, FireFox does support the DOM (Document Object Model) -- this is what javascript on the HTML page can access, but it does not support COM which is what allows an external interface like AutoIt to automate the browser using the DOM.

Dale

Edited by DaleHohm

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

Please see the docs in the helpfile for the various modes for _IEAttach... in particular:

Title = (Default) sub-string of main document title

WindowTitle = sub-string of full window title (instead of document title)

The document title is the string inside the HTML <TITLE> tag, it is not the full window title - use WindowTitle for that. Also not that both use a sub-string, which means any portion of the string will match.

ThatsGreat is right that you cannot use it with FireFox, but to be precise, FireFox does support the DOM (Document Object Model) -- this is what javascript on the HTML page can access, but it does not support COM which is what allows an external interface like AutoIt to automate the browser using the DOM.

Dale

My bad thanks for the clarification. Always get DOM and COM mixed up xD.

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