Sign in to follow this  
Followers 0
yaofei

_IEImgClick

7 posts in this topic

I have a question about _IEImgClick.

The _IEImgClick will call a javascript that will call an ocx(Activex contorl)'s method to pop up a dialog.

The question is , whether the $f_wait is 1 or 0, the code after IEImgClick continues to execute only after the ocx's pupup dialog is closed.

How to avoid this ? I want to ControlClick on the ocx's dialog. Any solution?

Thanks very much

Share this post


Link to post
Share on other sites



_IEImgClick($oIE, "test","name",0,0) //will show ocx dialog with button ok and cancel

$tmp = WinGetHandle("title name") // autoit will not run to here until the ocx dialog closed ,the runtime engine is blocked here

ControlClick($tmp,"","OK")

Share this post


Link to post
Share on other sites

The second example for _IEAction has a workaround for this sort of situation. Get a reference to the Img forst with _IEGetObjByName($oIE, "name")

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

Share this post


Link to post
Share on other sites

The workaround doesn't work.

$tmp = _IEGetObjByName ($oIE, "btnImg")

_IEAction ($tmp, "click")

MsgBox(1,1,1) // the message box will show up until the ocx dialog is closed manually.

ControlClick("title","","OK") // this sentence will not fire until the ocx dialog is closed manually。

Any ideas?

Share this post


Link to post
Share on other sites

That is not the second example for _IEAction

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

Share this post


Link to post
Share on other sites

The second example of IEAction work perfectly.

DaleHohm, Thanks very much for your help

Share this post


Link to post
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
Sign in to follow this  
Followers 0