parallel instance command execution instead of serial?

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

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.

parallel instance command execution instead of serial?

by Ram on Mon Jul 21, 2014 8:16 am

Dear All,

I'm running multi FF instances from Excel VBA, currently I run the same command for all instances like this:

Code: Select all
iret1 = obj_iMacro1.iimPlayCode(iMacro)
iret2 = obj_iMacro2.iimPlayCode(iMacro)
iret3 = obj_iMacro3.iimPlayCode(iMacro)


when running the VBA code each line executed just after the previous instance has done running the "iMacro" script in the FF instance in a serial manner, my question is there any way to execute all three instances in a parallel mode (like multi thread)?

Thanks much in advance!
Best,
R.
Ram
 
Posts: 22
Joined: Mon Jul 21, 2014 4:19 am

Re: parallel instance command execution instead of serial?

by Ram on Mon Jul 28, 2014 5:46 am

just for anyone who is looking for this kind of solution, i created a workbook(main) that use SHELL to open other workbooks (clients), in clients workbooks i added the needed iMacro commands and the secret to manage to execute the same call from all clients is to execute the VBA code from main by using the OnTime function instead of Application.Run:

Code: Select all
oXLApp1.OnTime Now + TimeSerial(0, 0, 1), "Login"
oXLApp2.OnTime Now + TimeSerial(0, 0, 1), "Login"
oXLApp3.OnTime Now + TimeSerial(0, 0, 1), "Login"


that way the code run asynchronously in all three browsers

Best,
R.
Ram
 
Posts: 22
Joined: Mon Jul 21, 2014 4:19 am

Re: parallel instance command execution instead of serial?

by Ske on Thu Mar 26, 2015 9:47 am

Dear Ram,
Thanks, this is what I'm looking for. Would you mind posting your full code or a bigger chuck of it, it'll likely be of great help trying to reproduce your approach.

Thanks in advance,
S.
Ske
 
Posts: 6
Joined: Wed Jan 13, 2010 4:45 am


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 3 guests

-->