Using iMacros with JAVA via JACOB (64bit support)

Share your tips, tricks and favorite iMacros macros, scripts and applications for web automation in general here.

Moderator: iMacros Moderators

Using iMacros with JAVA via JACOB (64bit support)

by Hannes, Tech Support on Mon Aug 23, 2010 1:37 am

Three notes before we start:

1) The process of how to set up a JAVA project in Eclipse, and how to add external resources (.jar or .dll files), can be found in this thread: viewtopic.php?f=6&t=2703
2) We selected JACOB ( because it is free software (cf. their site for the license), and because it supports 64bit systems
3) Documentation on using JACOB is pretty sparse, especially for beginners. Maybe you want to help that great project.

And here's how to call iMacros from Java using JACOB (having an IDE like Eclipse or NetBeans in mind):

1) Download JACOB ( You won't need the source package for our task.
2) Create a new Java project
3) Add references to
3a) jacob.jar
3b) jacob.dll (whose real name is something like "jacob-1.15-M3-x64.dll"
4) Use the following code sample as a beginning
Code: Select all
import com.jacob.activeX.*;

public class iMacrosJACOBtest {

   public static void main(String[] args) {

      // connect to iMacros Scripting Interface
      ActiveXComponent iim = new ActiveXComponent("imacros");
      System.out.println("Calling iimInit");
      iim.invoke("iimInit"); // call iimInit()
      System.out.println("Calling iimPlay");
      iim.invoke("iimPlay", "CODE:URL GOTO="); // call iimPlay()
Hannes, iOpus Support
Hannes, Tech Support
Posts: 2120
Joined: Thu Sep 21, 2006 6:27 am

Return to How-To's and useful iMacros: All other topics

Who is online

Users browsing this forum: No registered users and 1 guest