Repeat Function

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++.
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
richnicol
Posts: 2
Joined: Mon Jan 17, 2011 7:19 pm

Repeat Function

Post by richnicol » Mon Jan 17, 2011 7:33 pm

***I am running 'Imacros For Firefox 7.0.3.0'***

Hey everyone,

Im pretty new to Macros and i am working some safelist sites and i am wanting them automated and my problem basically is certain sites i can enter an advertisement up to 20 times a day, is there some way of recording a function once and then telling the macro to keep repeating it basically instead of having to record myself doing it for example 2,5,10 or 20 times.

Thanks,

Rich
richnicol
Posts: 2
Joined: Mon Jan 17, 2011 7:19 pm

Re: Repeat Function

Post by richnicol » Wed Jan 19, 2011 8:41 pm

Desperate for help can anyone help me urgently thanks :)
ABooth
Posts: 223
Joined: Mon Aug 10, 2009 4:25 pm

Re: Repeat Function

Post by ABooth » Thu Jan 20, 2011 3:37 pm

You can launch a macro from JavaScript (in certain versions). In JavaScript you can create a loop to run the macro as many times as you like

Example.js

Code: Select all

for (i=0; i < 20; i++)
{
    iimPlay("macroName");
}
iMacros for Firefox supports JavaScript Macros (Scripting)
JavaScript supports Java via LiveConnect

Therefore: You can write powerful macros with iMacros for Firefox. Have a look at this one

Post feature requests here. Maybe one day, they'll pin it?
Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: Repeat Function

Post by Tom, Tech Support » Wed Jan 26, 2011 3:29 pm

You can also repeat the playback of a macro multiple times by specifying how many times you want it to repeat in the Max value on the Play tab of the iMacros sidebar and then using the Play (Loop) button.
Regards,

Tom, iMacros Support
burilitho
Posts: 2
Joined: Sun Feb 20, 2011 10:11 am

Re: Repeat Function

Post by burilitho » Thu Feb 24, 2011 8:20 am

Ok cool! One thing, it gives me the error, cannot use parentheses when calling a Sub?
Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: Repeat Function

Post by Tom, Tech Support » Fri Feb 25, 2011 2:04 pm

burilitho wrote:Ok cool! One thing, it gives me the error, cannot use parentheses when calling a Sub?
Sounds like you are using VBScript and not Javascript? In that case remove the parentheses around your subroutine call and include a space between the routine name and the first parameter, then separate parameter values with a comma as usual.
Regards,

Tom, iMacros Support
Post Reply