Run time error example:
The Scripting Interface will catch all kind of runtime errors ("crashes") of the iMacros Browser or of Internet Explorer with iMacros plugin. It reports the crash back to the controlling program/script as negative error return code between -1 and -100. All the scripts needs to do is to call iimExit (to make sure the browser instance is really closed and not just frozen) and start a new instance with iimInit.
In VBS that looks like:
Code: Select all
iret = iim1.iimPlay("MyMacro", 90)
if iret < 0 and iret > - 100 then
iret = iim1.iimExit ()
iret = iim1.iimInit ("", TRUE)
end if
Note: Not all error values between -1 and -100 are used, but this is the range that is reserverd for Interface related return codes. All error codes below -100 are macro related. All detailed list of error codes is available at http://www.iopus.com/imacros/help/scrip ... r_code.htm