ice1000 Posted January 3, 2008 Share Posted January 3, 2008 My script was working perfectly until today. Now I get the following error: C:\Program Files\AutoIt3\Include\IE.au3 (3018) : ==> The requested action with this object has failed.: Return HWnd($o_object.HWnd()) Return HWnd($o_object.HWnd()^ ERROR I'm trying to get the handle of the IE window that is open. The relevant code is below. There is no other IE process running, just the one visible instance. Any ideas? #include <IE.au3> Opt("WinTitleMatchMode", 4) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase AutoItSetOption("WinTitleMatchMode",2) Dim $hIEWin = WinGetHandle("Internet Explorer") If @error Then Msgbox(0,"Error","Intnernet Explorer not open.") Exit EndIf Dim $oIE =_IEAttach($hIEWin, "HWND") Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 3, 2008 Share Posted January 3, 2008 My script was working perfectly until today. Now I get the following error: C:\Program Files\AutoIt3\Include\IE.au3 (3018) : ==> The requested action with this object has failed.: Return HWnd($o_object.HWnd()) Return HWnd($o_object.HWnd()^ ERROR I'm trying to get the handle of the IE window that is open. The relevant code is below. There is no other IE process running, just the one visible instance. Any ideas? #include <IE.au3> Opt("WinTitleMatchMode", 4);1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase AutoItSetOption("WinTitleMatchMode",2) Dim $hIEWin = WinGetHandle("Internet Explorer") If @error Then Msgbox(0,"Error","Intnernet Explorer not open.") Exit EndIf Dim $oIE =_IEAttach($hIEWin, "HWND") Other than there being no point in setting WinTitleMatchMode to 4 and then immediately setting it to 2, it works fine for me. How do you make it fail? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
ice1000 Posted January 3, 2008 Author Share Posted January 3, 2008 Other than there being no point in setting WinTitleMatchMode to 4 and then immediately setting it to 2, it works fine for me. How do you make it fail? Ahhh that was a line left over as I was trying to get the substring title match mode to work with _IEAttach.I'm just right clicking on the script and choosing 'Run Script'. Link to comment Share on other sites More sharing options...
DaleHohm Posted January 3, 2008 Share Posted January 3, 2008 One common cause if a foobar iexplore.exe process on your system. Check task manager to insure they are all gone and start over (or reboot/logout). If it persists, add these lines to your script: _IE_VersionInfo() _IEErrorHandlerRegister() and include all of the SciTe console output in a reply. thanks, 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 More sharing options...
ice1000 Posted January 3, 2008 Author Share Posted January 3, 2008 One common cause if a foobar iexplore.exe process on your system. Check task manager to insure they are all gone and start over (or reboot/logout).If it persists, add these lines to your script:_IE_VersionInfo()_IEErrorHandlerRegister()and include all of the SciTe console output in a reply.thanks,DaleI was trying ot avoid a reboot but that fixed things. Link to comment Share on other sites More sharing options...
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