Jump to content

check ie link clicked


Recommended Posts

okay i have an embeded ie now how do i check if the user clicked a link get the url of the link and disable the link from opening a new window.

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

Try IE.au3

i have already gone through that it doesnt help me check if a link is clicked

read the first post :/

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

okay i have an embeded ie now how do i check if the user clicked a link get the url of the link and disable the link from opening a new window.

This type of interaction (which requires COM event processing) is outside the design scope for IE.au3. It can be done, but it turns out to be difficult for the AutoIt COM implementation to help you with it.

This is because AutoIt deals with events asynchronously... ObjEvent essentially "registers interest" in an application's COM events rather than inserting stself into the COM processing flow like Javascript in a browser does, for example. What this means is that AutoIt will not miss any events, but it cannot reliably influence the program flow and outcome because the event may already have occurred and the application has moved past it before AutoIt ever knows about it. This is why you cannot use AutoIt directly to prevent the link in your example from opening a new window...

One thing you can do is to rewrite the HTML for the links in question so that they do what you want them to do before anyone can click on them. If that is not viable, then you can inject your own event processing Javascript into the page (onclick event handler for example) and let Javascript do the work for you since it is a part of the event processing flow.

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