2 Macro Component in 1 app

Discussions and Tech Support related to using the iMacros Component for .NET in your applications.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

2 Macro Component in 1 app

by rguez_18 on Tue Dec 06, 2011 4:29 pm

Hi, I'm doing an app that requires 2 imacro browser in a single form (Seperated by tab pages). My issue is that the component doesn't seem to recognize the difference between two browser component, when ever I try to play a script on browser 1 it plays in on browser 2 or the recently added component, browser 1 was working fine before I added the 2nd browser. Any thoughts on this please? Thanks!
.NET Developer
<---Using IMacro since version 4 - See Date Joined on Forum
***For Quotes and Estimates please feel free to contact me.
YM: Rguez_18 <at> y a hoo <that> com
Skype: Rguez_18
rguez_18
 
Posts: 101
Joined: Thu Oct 20, 2005 11:04 am

Re: 2 Macro Component in 1 app

by Marcia, Tech Support on Tue Dec 13, 2011 1:11 am

Hello,

Unfortunately, it is not possible at this time to control two iMacrosControl instances in a single application. I am afraid a quick fix now might compromise iMacros stability. There were some design decisions we made where we chose - for performance reasons - to have a few static classes and properties. Two iMacrosControl instances will, of course, share those static objects.
Regards,

Marcia
Marcia, Tech Support
 
Posts: 1058
Joined: Thu Jan 29, 2009 6:10 am

Re: 2 Macro Component in 1 app

by BGood on Tue May 29, 2012 4:02 pm

From Marcia's answer I conclude that you cannot have 2 instances of the component in a single class, but the title of the OP is confusing. Can you have multiple iMacros components in a single application when the two components are in different classes/forms? What about if they are not simultaneously activated? Thanks.
BGood
 
Posts: 19
Joined: Wed Mar 30, 2011 7:23 pm

Re: 2 Macro Component in 1 app

by Marcia, Tech Support on Thu May 31, 2012 4:09 am

Hi,

BGood wrote: Can you have multiple iMacros components in a single application when the two components are in different classes/forms?


No, static fields are shared by all instances in the same application.

However, if you dispose of iMacrosControl, these static fields are reset, and you can create a new iMacrosControl instance, which will not be influenced by the disposed one.
Regards,

Marcia
Marcia, Tech Support
 
Posts: 1058
Joined: Thu Jan 29, 2009 6:10 am

Re: 2 Macro Component in 1 app

by BGood on Fri Jun 01, 2012 11:38 am

Marcia,

So then I assume that it would not be a good idea to use the iMacros control browser for online help access, or other functions that might be activated simultaneously with another browser instance?
BGood
 
Posts: 19
Joined: Wed Mar 30, 2011 7:23 pm

Re: 2 Macro Component in 1 app

by Marcia, Tech Support on Mon Jun 04, 2012 12:24 am

Hello,

For simple online help access, I suggest you use an instance of .NET WebBrowser Control, since for that you don't need iMacros' engine.

Would that work for you?
Regards,

Marcia
Marcia, Tech Support
 
Posts: 1058
Joined: Thu Jan 29, 2009 6:10 am

Re: 2 Macro Component in 1 app

by BGood on Tue Jun 05, 2012 11:13 am

Hi Marcia,

That is the approach I was using before integrating the iMacros Component, but scripting with the component is so much easier than programatically traversing the DOM in .net. Given the restrictions imposed by the single static instance, I will have to go back to the .net webbrowser control for help scripting (which is minimally difficult relative to data extraction). Thanks.
BGood
 
Posts: 19
Joined: Wed Mar 30, 2011 7:23 pm


Return to iMacros Component for .NET

Who is online

Users browsing this forum: No registered users and 2 guests

-->