DaleHohm Posted March 23, 2012 Posted March 23, 2012 Changes to new versions of IE do seem to require an update to the example. On my system, the popup title is now "Message from webpage" and the instance of the browser control is 2 for some reason instead of 1. The following works for me: #include <IE.au3> $oIE = _IE_Example("form") $oSubmit = _IEGetObjByName($oIE, "submitExample") Local $hwnd = _IEPropertyGet($oIE, "hwnd") _IEAction($oSubmit, "focus") ;ControlSend($hwnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") ControlSend($hwnd, "", "", "{Enter}") ; Wait for Alert window, then click on OK WinWait("Message from webpage", "ExampleFormSubmitted") ControlClick("Message from webpage", "ExampleFormSubmitted", "[CLASS:Button; TEXT:OK; Instance:1;]") _IELoadWait($oIE) 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
GoldenMike Posted March 23, 2012 Author Posted March 23, 2012 Dale, This works for me. thank you. I will explore further.
whanenbu Posted March 26, 2012 Posted March 26, 2012 This does not work for me. The error code returns 1 which indicates that it did work, but nothing happens and I also tried the space instead of enter. It appears IE9 is the issue. Also, my instance is 4. WinWait stops script because the box never appears. I have to use the WinActive and then Send("{ENTER}") and this works but is risky. Any ideas?
kalel69 Posted August 28, 2012 Posted August 28, 2012 Dale, Thanks. Your suggestion of looking at the second example worked perfectly for me. I did realize the example needs to be updated for IE9. So I did that as well. I also know this post is a bit old, but I wanted to let folks know that if you have that issue, Dales suggestion does solve it. Thanks!
xjiang Posted October 24, 2012 Posted October 24, 2012 Hi, Dale To the same question, how to deal with a "File open" dialog, like this: #include <IE.au3> $oIE = _IE_Example("form") $oSubmit = _IEGetObjByName($oIE, "fileExample") _IEAction($oSubmit, "click") MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & '$oSubmit' & @lf & @lf & 'Return:' & @lf & $oSubmit) ;### Debug MSGBOX when the file windows is open, the script is paused too. when i use _IEAction($oSubmit, "focus") ControlSend($hwnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") it doesn't work too. If the script isn't paused, i think i can WinActivate(), ControlSetText() and ControlClick() to deal with that window. so i can't figure out a method, can you help to check? Thanks.
DaleHohm Posted October 29, 2012 Posted October 29, 2012 It's not the same question. See my sig for suggestions for input type=file 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
sammy1983 Posted May 27, 2015 Posted May 27, 2015 (edited) Hi Dale,I wanna echo the same question again."my problem is that my code actually stops while the window is open, so anything that is being coded haults."$oForm = _IEFormGetObjByName($oIE, "owner.iolWebServiceSubmitAction") $oStatus = _IEGetObjById($oForm, "statuselect") _IEFormElementOptionSelect($oStatus, "DISABLED", 1, "byText") When the above code is executed, an IE popup message appears and the script halts there unless I click on "Ok" or "Cancel" manually. Not able to automate this. I tried the 2 part of _IEAction example but of no luck. Any help is highly appreciated. Thanks. Edited May 27, 2015 by sammy1983
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now