Jump to content

_IEAttach() sniping the good IE window/instance


Helena
 Share

Recommended Posts

_IEAttach() function is very powerfull when you don't need to wait for some IE com Events. But it become more

complex when you wait like me for some events for the active IE window (the active IE windows may change or user have more than one instance of iexplorer.exe with same page....)

so the idea is to attach Internet.Application (that is IEXPLORER.EXE) instead of shell.application to get the current window and catch events when window change or when data post...(excuse my poor english)

don't know if it is possible but i think it give more control and precision if we COM IEXPLORER.EXE than an window

Link to comment
Share on other sites

The shell.application collection includes all of the InternetExplorer.application windows (plus the file explorer windows and some other variants). _IEAttach() cycles through all of these windows and only pays attention to the InternetExplorer.application windows (by looking at the ObjName), so it does exactly what you are suggesting I think.

Perhaps you could focus on the trouble you are having rather than the architecture of IE.au3 in the beginning and be certain that you are using it most effectively? Make certain that you realize that _IEAttach allows you to attach to an IE window by title, by URL, by body text or by body HTML.

Dale

_IEAttach() function is very powerfull when you don't need to wait for some IE com Events. But it become more

complex when you wait like me for some events for the active IE window (the active IE windows may change or user have more than one instance of iexplorer.exe with same page....)

so the idea is to attach Internet.Application (that is IEXPLORER.EXE) instead of shell.application to get the current window and catch events when window change or when data post...(excuse my poor english)

don't know if it is possible but i think it give more control and precision if we COM IEXPLORER.EXE than an window

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

After reading your post again, I don't think I really have any idea what you are wanting to do.

Please try to explain again and use some examples.

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

After reading your post again, I don't think I really have any idea what you are wanting to do.

Please try to explain again and use some examples.

Dale

Thinks Dale !

So I will do all my best to explain that with an exemple (code) later (i'm not at home).

imagine that you are waiting for some urls (a given urls) in order to save forms elements value (or sent data/ http request) so the job is

Wait until current and active url is in urls list; (timer with loop here)

If yes (one of target urls is active and have a focus) then we attach it (_IEattach) and wait the submit form event to get data and, if page web changed without/or without submit event then wait again

We have an other problem:user may have more than one of the same target url page loaded , how we snipe the correct one without making events for all loaded pages...

I know it is very confused but i'll give later an exemple to explain my self.

Edited by Helena
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...