Looping Issue

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
Nelis
Posts: 6
Joined: Fri Oct 16, 2015 3:10 am

Looping Issue

Post by Nelis » Wed Oct 28, 2015 6:39 pm

Hello,

My goal is to make a macro for one task from start to finish and evaluate iMacros performance before purchasing.

I have one major issue that I can not find a solution for. I have created a script and it works very well.

However, because I need to change my IP after every loop, and iMacros does not support executing an .exe file (from what I have read), I had to create a batch file to execute the IP change and then execute the Macro.

My issue is with the looping. My batch file is very simply and works well, however, because I have to loop the batch file, instead of using the Macro Loop playback, the macro thinks it is running for the first time, regardless if it is loop 2, 3, 4 etc. The Macro uses a .csv file to fill forms, and with every loop needs to proceed down the list to the next loop. How do I get the Macro scrip to know when it is on loop 2,3,4,5 etc?

The simplest solution would ofcourse be for iMacros to support execution of .exe files, and then I could simply add one step to the Macro and issue is solved. Please tell me if this is now possible or not. If this is not possible, I would assume we need to communicate to the iMacro script the loopcount and it would use this infomration to pukk correct data from .csv file. Please tell me how to do this.

Here is Batch file for someone needing to change ip use HMA VPN.

------------------------- Batch File to change ip and run macro
set loopcount=2
:loop
"C:\Program Files\HMA! Pro VPN\bin\HMA! Pro VPN.exe" -changeip
timeout /t 60 /nobreak
"C:\Users\US03\Documents\iMacros\Macros\Name of Macro You want to Run.iim"
set /a loopcount=loopcount-1
if %loopcount%==0 goto exitloop
goto loop
:exitloop
--------------------------

Thanks!
chivracq
Posts: 9378
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Looping Issue

Post by chivracq » Thu Oct 29, 2015 6:36 am

Nelis wrote:Hello,

My goal is to make a macro for one task from start to finish and evaluate iMacros performance before purchasing.

I have one major issue that I can not find a solution for. I have created a script and it works very well.

However, because I need to change my IP after every loop, and iMacros does not support executing an .exe file (from what I have read), I had to create a batch file to execute the IP change and then execute the Macro.

My issue is with the looping. My batch file is very simply and works well, however, because I have to loop the batch file, instead of using the Macro Loop playback, the macro thinks it is running for the first time, regardless if it is loop 2, 3, 4 etc. The Macro uses a .csv file to fill forms, and with every loop needs to proceed down the list to the next loop. How do I get the Macro scrip to know when it is on loop 2,3,4,5 etc?

The simplest solution would ofcourse be for iMacros to support execution of .exe files, and then I could simply add one step to the Macro and issue is solved. Please tell me if this is now possible or not. If this is not possible, I would assume we need to communicate to the iMacro script the loopcount and it would use this infomration to pukk correct data from .csv file. Please tell me how to do this.

Here is Batch file for someone needing to change ip use HMA VPN.

------------------------- Batch File to change ip and run macro

Code: Select all

set loopcount=2
:loop
"C:\Program Files\HMA! Pro VPN\bin\HMA! Pro VPN.exe" -changeip
timeout /t 60 /nobreak
"C:\Users\US03\Documents\iMacros\Macros\Name of Macro You want to Run.iim"
set /a loopcount=loopcount-1
if %loopcount%==0 goto exitloop
goto loop
:exitloop
--------------------------

Thanks!
CIM...! :mrgreen: (If you ever want an Answer on any of your Threads from me... (And follow up on your previous Thread as you seem to have found the/a Solution to it..., where you will mention your FCI as well, of course..., and will share your Solution to finish your Thread neatly and useful for other Users...))

And where have you read "...and iMacros does not support executing an .exe file (from what I have read)..."...?
=> Ref...?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply