The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
Difference between revisions of "Scripting Interface Return Codes"
(added link to iimInit() wiki page) |
|||
Line 19: | Line 19: | ||
*:Could not start the iMacros browser. Typically this indicates an installation issue. | *:Could not start the iMacros browser. Typically this indicates an installation issue. | ||
*-20 | *-20 | ||
− | *:This error occurs if you start iimInit twice. | + | *:This error occurs if you start [[iimInit()]] twice. |
*[[Error-Codes|-100...-999 (sMacroError)]] | *[[Error-Codes|-100...-999 (sMacroError)]] | ||
*:sMacroError can have a value of -100 and lower (-101,-102,...,-999). These are NOT Scripting Interface error codes, but '''[[Error-Codes|errors created by the iMacros browser and the macro itself]]'''. The Scripting Interface passes them from the browser to your script or application. | *:sMacroError can have a value of -100 and lower (-101,-102,...,-999). These are NOT Scripting Interface error codes, but '''[[Error-Codes|errors created by the iMacros browser and the macro itself]]'''. The Scripting Interface passes them from the browser to your script or application. |
Revision as of 13:43, 12 February 2009
After each command the Scripting Interface returns a code. You can use this return code to find out whether a command succeeded or not. The general rule is:
- Success return code greater equal 0
- Failure return code less then 0
You can use iimGetLastError() to retrieve the text associated with the last error.
- 1 (sOk)
- Macro completed Ok
- -1 (sFail)
- Scripting Interface can not complete this command. Typically this error can occur if the software is not installed correctly
- -2 (sNotCompleted)
- A command was started but did not complete. This error happens only if the browser is terminated so abruptly that iMacros can not respond back to the interface. Typically this happens only in the rare case of a browser crash. If the user simply closes the browser you will get the -102 error instead (see below).
- -3 (sTimeout)
- The iMacros browser did not respond in a certain time. The default timeout is 600s. You can change this value individually for some commands. For example, you can specify iimPlay(<macro>, <timeout>). In addition to a normal timeout, this error also occurs if the browser freezes for any reason.
- -4 (sNotStarted)
- Could not start the iMacros browser. Typically this indicates an installation issue.
- -20
- This error occurs if you start iimInit() twice.
- -100...-999 (sMacroError)
- sMacroError can have a value of -100 and lower (-101,-102,...,-999). These are NOT Scripting Interface error codes, but errors created by the iMacros browser and the macro itself. The Scripting Interface passes them from the browser to your script or application.
- -101
- User pressed Stop button in the iMacros Browser. Typically, you can check on this value to see if the user wants to exit the application.
- -102
- User pressed Exit button in the iMacros Browser, i.e. the iMacros Browser was closed by a user. Note that this is not the same as sNotComplete. The code "sNotComplete"(-2) indicates that he browser was closed e.g. by the task scheduler or a crasg and not by a regular user exit or stop.
Error codes below -200 are error codes generated during the macro replay. These are the same errors (or error codes) that you get during a manual macro replay (if you start the macro by clicking the "Play" button). For more information on these errors please see the List of iMacros Browser Error Codes.