Jump to content

_IEImgClick waiting


DataFever
 Share

Recommended Posts

I am trying to automate a process which includes clicking on an image on a web page. Upon being clicked, there is a dialog box that pops up and asks me "Are you sure?" with Yes and No options.

I would love to have the script select Yes, but the script is rather dead at this point, having never returned from the _IEImgClick function call. I can manually click on Yes and the script resumes execution, but the whole point is to have this process automated.

I have attempted to use a workaround which involves setting the focus on the image in question and then sending {ENTER} to the window. Unfortunately, the image does not take focus. I know that I have identified the correct image object because I can perform _IEAction($oImg, "click") and the dialog box appears and the script is once more hung. But _IEAction($oImg, "focus") does not put focus on the image.

Is there any way around this issue?

Link to comment
Share on other sites

Can you provide a reproducer?

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

I managed to find a solution for the situation that I was encountering. I compiled a short script that waited for the popup window to become active and then clicked on the Yes button. I then called that script (using ShellExecute) just before calling _IEImgClick. Works like a charm.

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