Hi,
I'm having some difficulty with IEAttach. I did search the forum for like posts, but didn't have any luck.
The problem here is that the _IEAttach call fails with an error code "3" for only one of the 5 platforms I run this on. For Windows 2k, XP SP2 (with IE6), XP SP3 (with IE7), Vista Home Premium, _IEAttach succeeds. For my Vista Ulimate machine, IEAttach returns 0 with @error = 3. That error code is not even listed in the IEAttach function description! Can anyone help me to figure out why only this instance is failing, and how I can fix the script operation?
Thanks!
\jonah
Case "LinkDistFileCheckMandatoryManual"
ClickDownload()
Local $page = GetCFGArgument("C:\rats\rats.cfg", "LinkDistPageURL")
If $page == 0 Then
WriteToLog("error", "Could not get parameter LinkDistPageURL from cfg file.")
Return 0
EndIf
Sleep(5000)
Local $oIE = _IEAttach($page, "URL")
Local $linktext = GetCFGArgument("C:\rats\rats.cfg", "LinkDistLinkText")
If $linktext == 0 Then
WriteToLog("error", "Could not get parameter LinkDistLinkText from cfg file.")
Return 0
EndIf
_IELinkClickByText($oIE, $linktext)
WriteToLog("Functrace", "IEAttach returns " & $oIE & ", @error = " & @error)
;_IEAction( $oIE, "saveas")
; The DOM API for the saveas action will not return control to the script until the save box is gone. Try something else.
IEClickSaveAs($oIE)
Local $target = GetCFGArgument("C:\rats\rats.cfg", "FileCheckTarget")
If $target == 0 Then
WriteToLog("error", "Could not get parameter FileCheckTarget from cfg file.")
Return 0
EndIf
Sleep(1000)
_SaveAs("Save Web", $target)
_IEQuit($oIE)
WriteToLog("info", "RemediateLib::Remediate has succeeded with case " & $ReqtDescription)
Return 1