c# windows form hang when running firefox with imacros

Discussions and Tech Support related to using the iMacros Component for .NET in your applications.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
sudan38
Posts: 1
Joined: Wed Jun 18, 2014 9:54 am

c# windows form hang when running firefox with imacros

Post by sudan38 » Wed Jun 18, 2014 10:12 am

hello

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();
                }
           
}
and here is my imacroclass's code:

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);
   }


        

    }

}
the windows form not responding until the task done, any help will be appreacites
keithsorros
Posts: 1
Joined: Thu Aug 21, 2014 4:42 am

Re: c# windows form hang when running firefox with imacros

Post by keithsorros » Thu Aug 21, 2014 4:43 am

anyone can answer this ?
Post Reply