sunghost Posted December 6, 2006 Share Posted December 6, 2006 Hi, im new and try a bit with autoit I want to catch error messages like "Die Seite kann nicht angezeigt werden." -> "The page cant be shown." than i want to close the browser. I tried _IEErrorHandlerRegister but whitout success. Can anybody help? thx Link to comment Share on other sites More sharing options...
sunghost Posted December 6, 2006 Author Share Posted December 6, 2006 Hi, im new and try a bit with autoit I want to catch error messages like "Die Seite kann nicht angezeigt werden." -> "The page cant be shown." than i want to close the browser. I tried _IEErrorHandlerRegister but whitout success. Can anybody help? thx EDIT: now i do it like that: Opt("WinTitleMatchMode",2) IF WinGetTitle("active") = "Server nicht gefunden" THEN ;MsgBox(0,"", WinGetTitle("active")) _writeLog($DateiInhalt[$x]) Exit EndIf The problem ist that the script stops after the first error window, but it should go on with the next window. Link to comment Share on other sites More sharing options...
DaleHohm Posted December 6, 2006 Share Posted December 6, 2006 Does the error appear in the body of the browser (use _IEBodyRead*) or in a popup window? 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...
sunghost Posted December 6, 2006 Author Share Posted December 6, 2006 Does the error appear in the body of the browser (use _IEBodyRead*) or in a popup window?DaleHi,body error: "Die Seite kann nicht angezeigt werden." -> "Page cant be shown"title error: "Server nicht gefunden" ->"Found no server"testet both with: Opt("WinTitleMatchMode",4) but it doesnt function Link to comment Share on other sites More sharing options...
DaleHohm Posted December 6, 2006 Share Posted December 6, 2006 You can access the browser body with the _IEBodyRead* functions. 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...
sunghost Posted December 7, 2006 Author Share Posted December 7, 2006 You can access the browser body with the _IEBodyRead* functions. DaleHi, ok i tried it an it looks fine. $text = _IEBodyReadText($oIE) IF $text = "Die Seite kann nicht angezeigt werden" THEN _writeLog($DateiInhalt[$x]) Msgbox(0,"HTML Read",$text) EXIT ENDIF But how can i compare the result of the function? what i use above doesnt function. Link to comment Share on other sites More sharing options...
DaleHohm Posted December 7, 2006 Share Posted December 7, 2006 ok i tried it an it looks fine. But how can i compare the result of the function? what i use above doesnt function.I don't understand what you are trying to say. Perhaps you should use IF StringInStr($text, "Die Seite kann nicht angezeigt werden") THEN 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...
sunghost Posted December 7, 2006 Author Share Posted December 7, 2006 I don't understand what you are trying to say. Perhaps you should use IF StringInStr($text, "Die Seite kann nicht angezeigt werden") THEN Dalehi i solved the problem like this Func _checkTitle($name) ConsoleWrite(WinGetTitle("") & @LF) If WinGetTitle("") = $error Then _WriteLog($name) ;MsgBox(0, "", "Error") Exit (0) EndIf EndFunc thx for your fast help 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