This summer I made a scripit to insert data from excel sheets, into a HTML based interface..
Recently, the HTML part has been bugging out, causing a SystemProblem, please try again page. These erros only happen once in a while, at 3 points in the operation: When I click the Publish button, Copy button, or _save button after the Page Done option (see below)..
I need a way for my script to know that if the Error page comes up, it should go back a page, and try the last action again. I know the _IEaction ($oIE, "back") command, but how do I fix the infinite-till-error-has-gone-loop?
Many Thanks in advance!
Quote
$oPublishbutton = _IEFormElementGetObjByName($oForm2, "publish")
_IEAction ($oPublishbutton, "click" )
_IELoadWait ($oIE)
_IELinkClickByText($oIE, "Copy")
_IELoadWait ($oIE)
$oSelectallcopy = _IEGetObjById($oIE, "selectAll")
_IEAction ($oSelectallcopy, "click")
_IELoadWait ($oIE)
$oCopy = _IEGetObjById($oIE, "copy")
_IEAction ($oCopy, "click")
_IELoadWait ($oIE)
_IELinkClickByText($oIE, "<< Back")
_IELoadWait ($oIE)
_IELoadWait ($oIE)
_IELinkClickByText($oIE, "Client Finish")
_IELoadWait ($oIE)
$oAfsluitForm = _IEFormGetObjByName ($oIE, "History")
$oAfsluitselect = _IEFormElementGetObjByName ($oAfsluitForm, "outcome")
_IEFormElementOptionselect ($oAfsluitselect, "Page Done", 1, "byText")
_IELoadWait ($oIE)
$oSaveButton= _IEFormElementGetObjByName($oAfsluitForm, "_save")
_IEAction ($oSaveButton, "click" )
_IELoadWait ($oIE)
_IEQuit($oIE)
_ExcelBookClose ($oExcel)
_IEAction ($oPublishbutton, "click" )
_IELoadWait ($oIE)
_IELinkClickByText($oIE, "Copy")
_IELoadWait ($oIE)
$oSelectallcopy = _IEGetObjById($oIE, "selectAll")
_IEAction ($oSelectallcopy, "click")
_IELoadWait ($oIE)
$oCopy = _IEGetObjById($oIE, "copy")
_IEAction ($oCopy, "click")
_IELoadWait ($oIE)
_IELinkClickByText($oIE, "<< Back")
_IELoadWait ($oIE)
_IELoadWait ($oIE)
_IELinkClickByText($oIE, "Client Finish")
_IELoadWait ($oIE)
$oAfsluitForm = _IEFormGetObjByName ($oIE, "History")
$oAfsluitselect = _IEFormElementGetObjByName ($oAfsluitForm, "outcome")
_IEFormElementOptionselect ($oAfsluitselect, "Page Done", 1, "byText")
_IELoadWait ($oIE)
$oSaveButton= _IEFormElementGetObjByName($oAfsluitForm, "_save")
_IEAction ($oSaveButton, "click" )
_IELoadWait ($oIE)
_IEQuit($oIE)
_ExcelBookClose ($oExcel)

Sign In
Register
Help
MultiQuote