Simple Hourly Automation?

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
Ghosty
Posts: 2
Joined: Tue Jun 26, 2012 12:03 am

Simple Hourly Automation?

Post by Ghosty » Tue Jun 26, 2012 12:11 am

Uh, well, I'm dyslexic, and I'm having a hard time wrestling with relatively simple code.

I'm newish to iMacros, but also JS, which is what I'm using, and I want to know if anyone has any code examples for what I'm trying to do?

Basically, I want a set of actions to operate on infinite loop until I hit stop.

So far, all I've got is opening a new tab into the appropriate page.

Can someone show me how to make a function in JS that repeats itself 20 times per hour and continues to do so forever?

Edit: It doesn't matter if it's actually on the hour or not. Just the time between has to be at least an hour.

Thank you for looking!
siniy
Posts: 118
Joined: Sat Nov 07, 2009 7:44 pm

Re: Simple Hourly Automation?

Post by siniy » Tue Jun 26, 2012 5:23 am

Code: Select all

do{
	//Create sleep var, and set it to 1 hour
	iimSet("sleep",3600)
		
	var macro;
	macro =  "CODE:";
	macro +=  "URL GOTO=http://google.com" + "\n"; 
	macro +=  "WAIT SECONDS={{sleep}}" + "\n"; 
	
	//iret contains return code for imacros script
	var iret = iimPlay(macro);

	//-101 code for pressing button "Stop" on imacros sidebar. Exit if "Stop" has been pressed.
}while(iret!=-101);
Ghosty
Posts: 2
Joined: Tue Jun 26, 2012 12:03 am

Re: Simple Hourly Automation?

Post by Ghosty » Wed Jun 27, 2012 2:26 am

:DD

Thank you very much! This is perfect :3 I really appreciate it. :3
Post Reply