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

ⅰ亾dé卋堺 提交于 2019-12-12 01:27:36

问题


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


回答1:


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.




回答2:


//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



来源:https://stackoverflow.com/questions/14165953/how-can-i-set-up-a-24-hours-operation-with-imacros

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!