i am using .net component for imacros, i've try created some simple windows form with c# and using threading calling iimopen command "-fx" also iimplaycode after that, but when the imacros running on firefox, my windows form is not responding, i've already using threading.
here is the sample code
windows main form code :
Code: Select all
using System;
using System.Windows.Forms;
using System.Threading;
namespace windowsimacros
{
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
{
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
void Button2Click(object sender, EventArgs e)
{
imacrosclass iim = new imacrosclass();
new Thread(new ThreadStart(iim.run)).Start();
}
}
Code: Select all
using System;
using System.Collections;
using System.IO;
using System.Threading;
namespace windowsimacros
{
public class imacroclass{
//constructor
iMacros.AppClass app;
int timeout = 100;
public imacroclass(){
this.app = = new iMacros.AppClass();
}
public void run(){
this.app.iimOpen("-fx", true,this.timeout);
this.app.iimPlayCode("TAB T=1\n TAB CLOSEALLOTHERS\n SET !EXTRACT_TEST_POPUP NO\n ",this.timeout);
this.app.iimPlayCode("URL GOTO=http://www.google.com\n WAIT SECONDS=10",this.timeout);
}
}
}