hcttepe
hcttepe

Reputation: 167

How can I set up a 24 hours operation with iMacros?

How can I set up a 24 hours a day, 7 days a week (non-stop) operation with iMacros?

I Found that code but i can't adapt it my macro. i don't know use visual basic but i setup vbs 2008 today. How can i use that code on my imacros code? Anybody can tell it step by step on vbs. Thanks

   'Sample code B
Set iim1= CreateObject ("imacros")
For m = 1 to 5000
   iret = iim1.iimInit()
   For n = 1 to 1000
      iret = iim1.iimPlay ("macro1")
   Next
   iret = iim1.iimExit()
Next

Source: http://wiki.imacros.net/Web_Testing#Q:_How_can_I_set_up_a_24_hours_a_day.2C_7_days_a_week_.28non-stop.29_operation_with_iMacros.3F

Upvotes: 0

Views: 2996

Answers (2)

edinvnode
edinvnode

Reputation: 3547

//this starts firefox
start /d"C:\Program Files\Mozilla Firefox" firefox.exe /AUTO 



//this kills firefox process
pskill firefox.exe

//this command is one version of wait 10 seconds. You can change number 10 into some other for script to wait more then 10 seconds
ping -n 10 127.0.0.1

On this link you have examples on how to run iMacros file from bookmarks. So you have couple of examples and you can use them.

http://wiki.imacros.net/iMacros_for_Firefox#Command_Line_Support

Upvotes: 1

edinvnode
edinvnode

Reputation: 3547

I don't know about VB solution but JS solution is following.

  1. Place SET !ERRORIGNORE YES command in macro and SET !TIMEOUT_MACRO 120 (you can change the time) inside the macro. Then when you call the macro in JS you do it like this.

    iimPlay(macro, 110)

Make sure that the time is less then macro timeout by few seconds. That way macro will restart after each time and script can work a lot of time.

Upvotes: 1

Related Questions