Jump to content
Sign in to follow this  
Romm

How to skip COM error with DOM

Recommended Posts

Romm

COM ERROR WITH DOM!

err.description is:

err.windescription: Unknown Error

err.number is: 80020009

err.lastdllerror is: 0

err.scriptline is: 4149

err.source is:

err.helpfile is:

err.helpcontext is: 0

I read COM Error Handling, but still gon error :D

#include <_XMLDomWrapper.au3>
#include <Array.au3>
#include <IE.au3>
#include <INet.au3>
#include<File.au3>
#RequireAdmin



While 1

$IE_Conf = _IECreate("http://3k.mail.ru/hunt_conf.php", 0, 0)

FileDelete("form.txt")
$c = _IEBodyReadText($IE_Conf)
FileWrite ("form.txt", $c)
rename()
$sXMLFile = "form.txt"
$result = _XMLFileOpen($sXMLFile)
if $result = 0 then Exit
$sXPath = '//farm/item[@prof = "1" and @skill = "1" and @farming = "0"]'
$num = _XMLGetAttrib ($sXPath, "num")

If $num >= 0 Then
    _IENavigate($IE_Conf, "http://3k.mail.ru/hunt_conf.php?mode=farm&action=check&num=" & $num)
    Sleep(25000)
    EndIf
If $num = -1 Then
    Sleep(6000)
EndIf
_IEAction ($IE_Conf,"quit")
Wend

Func rename()
_ReplaceStringInFile ("form.txt", "  ", "", 1, 0)
_ReplaceStringInFile ("form.txt", "-", "", 1, 0)
_ReplaceStringInFile ("form.txt", "-", "", 1, 0)
_ReplaceStringInFile ("form.txt", "utf8", "utf-8", 1, 0)
_ReplaceStringInFile ("form.txt", "Болиглав", "Gather", 1, 1)
_ReplaceStringInFile ("form.txt", "Глоциния", "Gather", 1, 1)
_ReplaceStringInFile ("form.txt", "Паслён", "Gather", 1, 1)
_ReplaceStringInFile ("form.txt", "Серый карась", "Gather", 1, 1)
_ReplaceStringInFile ("form.txt", "Пятнистый ёрш", "Gather", 1, 1)
_ReplaceStringInFile ("form.txt", "Полосатый окунь", "Gather", 1, 1)
_ReplaceStringInFile ("form.txt", "Гранат", "Gather", 1, 1)
_ReplaceStringInFile ("form.txt", "Яшма", "Gather", 1, 1)
_ReplaceStringInFile ("form.txt", "Хризолит", "Gather", 1, 1)
_ReplaceStringInFile ("form.txt", "Дикая оса", "Monster", 1, 1)
_ReplaceStringInFile ("form.txt", "Адский муравей", "Monster", 1, 1)
_ReplaceStringInFile ("form.txt", "Бешеный шакал", "Monster", 1, 1)
_ReplaceStringInFile ("form.txt", "Снежник - весельчак", "Monster", 1, 1)
_ReplaceStringInFile ("form.txt", "Снежник", "Monster", 1, 1)
_ReplaceStringInFile ("form.txt", "Доргосский шакал", "Monster", 1, 1)
_ReplaceStringInFile ("form.txt", "Шакал-падальщик", "Monster", 1, 1)
_ReplaceStringInFile ("form.txt", "Степной шакал", "Monster", 1, 1)
_ReplaceStringInFile ("form.txt", "Степная рысь", "Monster", 1, 1)
_ReplaceStringInFile ("form.txt", "Тающий снежник", "Monster", 1, 1)
EndFunc

Share this post


Link to post
Share on other sites
DaleHohm

How did you get that error text? It isn't in your code.

Did you try _IEErrorHandlerRegister?

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.