Run two macros sequentially in the same browser window using iimOpen and VB.Net

Discussions and Tech Support related to using the iMacros Component for .NET in your applications.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
user9
Posts: 3
Joined: Thu Feb 09, 2023 6:55 pm

Run two macros sequentially in the same browser window using iimOpen and VB.Net

Post by user9 » Thu Feb 09, 2023 7:00 pm

We want to be able to start iMacros programmatically from our VB.Net application with Chrome, or Firefox, or the iMacros browser and to run a macro - this we can do already. Next we want to run a second macro using the same browser opened in the previous step. This was possible with iMacros 10.4 and Internet Explorer, but not with the new version 14.2.5 with any supported browser. With the new version we cannot run the second macro in the same browser window that was opened in step one, but instead it opens a new browser and runs it there. Please tell me how to do that. Thank you.

Additional Info:
We were using successfully in ver 10.4 and Internet Explorer this code, but it does not have the same behavior with Chrome or Firefox in the new ver 14:
iim1 = New iMacros.App
iim1.iimOpen(“-ie”, true)
and to run the second macro we would not instantiate a new iMacros.App, but use the one from step 1 and use this code, which sets openNewBrowser to false:
iim1.iimOpen(“-ie”, false)


Troubleshooting Information
System Information
Operating system Microsoft Windows 10 Pro
Operating system version Microsoft Windows NT 10.0.18363.0
Installed UI Culture English (United States)
CLR version 4.0.30319.42000
Product Information
Product version iMacros 2021 version 14.2.5.25
user9
Posts: 3
Joined: Thu Feb 09, 2023 6:55 pm

Re: Run two macros sequentially in the same browser window using iimOpen and VB.Net

Post by user9 » Fri Feb 10, 2023 6:29 pm

This issue is now resolved. We found that we must not dispose of the iim1 object (iim1 = Nothing) and it will correctly run (hook) the next macro in the last open Chrome browser from the previous macro. It seems that with Internet Explorer the behavior was different and we had to dispose of iim1.
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Run two macros sequentially in the same browser window using iimOpen and VB.Net

Post by Tom, Tech Support » Wed Feb 22, 2023 10:46 am

Hi user9,

I would also recommend applying the latest scripting interface patch, which includes a fix when calling iimOpen with False as the second parameter for attaching to an existing browser instance. You can find descriptions of the other changes listed in the release notes for iMacros for Chrome 10.1.0 (specifically, the items that are marked with a trailing * ). More information can also be found in the ReadMe file included with the patch.
Regards,

Tom, iMacros Support
user9
Posts: 3
Joined: Thu Feb 09, 2023 6:55 pm

Re: Run two macros sequentially in the same browser window using iimOpen and VB.Net

Post by user9 » Wed Feb 22, 2023 3:25 pm

Tom, thank you for your reply, however it confused me in terms of the patch mentioned. Please clarify if it needs to be installed in my case. We are running the following two versions in our office:

Version 14.2.5, which has:
iimInterface64.dll - Version 12.7.8.0 from October ‎17, ‎2022

Version 12.6, which has:
iimInterface64.dll - Version 12.6.0.177 from ‎November ‎08, ‎2019

The downloaded patch file iimInterface64.dll shows no version when I check the properties of the file, and the date is August ‎10, ‎2021.

Should I install the patch, and on which of my two versions listed above? Thank you.
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: Run two macros sequentially in the same browser window using iimOpen and VB.Net

Post by Tom, Tech Support » Wed Feb 22, 2023 5:33 pm

Both versions will benefit from the patch, if you are using them both for launching iMacros for Chrome.

As noted in the ReadMe, the components in the patch supercede the versions shipped in the product installers, even though the shipped versions may have later build dates (that includes iMacros 14.2.5).
Regards,

Tom, iMacros Support
Post Reply