Update on iMacros using Java
Posted: Wed Jun 14, 2006 11:49 am
[update] The wrapper below refers to the obsolete COM object "InternetMacros.iim", which now is simply called "imacros". To use the wrapper, you will need to replace this string in the class "IMacrosWrapper.java" (line 133) until a new wrapper is released.
[End of update]
Hi,
We updated the IMacrosWrapper class which facilitates the usage of the Scripting Interface and Java classes.
0) Names changed to standard names, i.e. with a preceeding iim as in iimPlay(). The old names were kept for downward compatibility. That means that when compiling a class which uses these methods you will get a "Class uses deprecated methods" message by the Java compiler.
However, the class will compile and it will not fail during run time.
1) getLastMessage() and exitAllBrowsers() are not longer supported by the Scripting Interface, thus they were marked deprecated. That means that when compiling a class which uses these methods you will get a "Class uses deprecated methods" message by the Java compiler.
Please note that, although the class will compile, it will fail during run time due to the non-existance of the functions in the iimInterface.dll. This message will be
2) The timeout option is now available in calls to iimPlay(), iimDisplay() and iimExit()
3) Return types changed from Short to Integer
4) The CLSID of the iimInterface.dll, which is needed to establish connection between Java and the Scripting Interface, is now dynamically retrieved from the Registry. For this retrieval the ProgID of the dll is needed, which is InternetMacros.iim. This ProgID is used when the standard constructor is used. Since the ProgID might change, I also added a new constructor which takes the ProgID as argument.
5) The initialization of the jawin bridge to the iimInterface.dll is now included in the iimInit() call (instead of the constructor) and the uninitialization is included in the iimExit() call. That means that the method close() is also deprecated.
Regards
---
Lasse Clausen, iOpus Support
Code: Select all
public class IMacrosWrapper implements RegistryConstants
{
/* Instead of providing the CLSID, which might be difficult to
* obtain and might also change due to changes in the Scripting
* Interface, the Registry is now queried for the correct CLSID
* using the ProgID, which is (hopefully) easier to obtain
*/
//private static final String standardProgID = "InternetMacros.iim"; // <-- old name
private static final String standardProgID = "imacros";
Hi,
We updated the IMacrosWrapper class which facilitates the usage of the Scripting Interface and Java classes.
- General Information: http://www.iopus.com/imacros/tutorials/java.htm
Download: http://www.iopus.com/download/imacroswrapper.zip
0) Names changed to standard names, i.e. with a preceeding iim as in iimPlay(). The old names were kept for downward compatibility. That means that when compiling a class which uses these methods you will get a "Class uses deprecated methods" message by the Java compiler.
However, the class will compile and it will not fail during run time.
1) getLastMessage() and exitAllBrowsers() are not longer supported by the Scripting Interface, thus they were marked deprecated. That means that when compiling a class which uses these methods you will get a "Class uses deprecated methods" message by the Java compiler.
Please note that, although the class will compile, it will fail during run time due to the non-existance of the functions in the iimInterface.dll. This message will be
Code: Select all
org.jawin.COMException: 80020006: Unknown name.
3) Return types changed from Short to Integer
4) The CLSID of the iimInterface.dll, which is needed to establish connection between Java and the Scripting Interface, is now dynamically retrieved from the Registry. For this retrieval the ProgID of the dll is needed, which is InternetMacros.iim. This ProgID is used when the standard constructor
Code: Select all
IMacroWrapper()
Code: Select all
IMacrosWrapper(String progId)
5) The initialization of the jawin bridge to the iimInterface.dll is now included in the iimInit() call (instead of the constructor) and the uninitialization is included in the iimExit() call. That means that the method close() is also deprecated.
Regards
---
Lasse Clausen, iOpus Support