Friday, August 16, 2013

Keep my computer online or automating browser tasks in Windows 7, 64-bit


The easiest solution I found was to use iOpus iMacros for Mozilla Firefox.

Then use Windows Task Scheduler to automate the process. So, the steps are:
1. Record the automation sequence with iMacros on Firefox and save it as "MyiMacrosScript.iim".

2. Create Microsoft Windows batch file named "MyScript.bat" with the following text inside and reference to previously created iMacros script file:
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://run.imacros.net/?m=MyiMacrosScript.iim
TIMEOUT /t 60
taskkill /IM firefox.exe
REM TIMEOUT /t 20
REM taskkill /f /IM firefox.exe
EXIT

3. Setup Task Scheduler. Very important to run Task Scheduler as administrator. Press "Start" -> then right click "Task Scheduler" and choose “Run as administrator” -> then create new task. Set "Triggers" to suit your needs and then set "Actions" to "start a program" and refer to newly created batch file "MyScript.bat". For now, it seems it only works for me if I choose to "Run only when user is logged on" and with "Run with highest privileges" unchecked.

4. Do not forget to set the Firefox to confirmation-less action. In my case I make sure that:
- Silent access for .iim script is allowed
- Silent exit for multiple open tabs is allowed.

Thanks all, enjoy.

1 comment:

  1. I also tried to setup up automation task to trigger upon activation of screensaver:
    http://superuser.com/questions/538146/run-a-batch-cmd-upon-screensaver

    ReplyDelete