Search code examples
javascriptimacros

how to run imacros .js from dos batch script or schedule


how to run the ".js" file from dos batch script or schedule it to run?

i can run .iim but is it possible to run .js file it will not run form dos batch script

c:>imacros.exe" -macro c:\testmacro.js

I can run the .iim file from dos command prompt


Solution

  • cd c:\Program Files (x86)\Pale Moon
    start palemoon.exe
    start /wait palemoon.exe imacros://run/?m="testmacro.js"
    

    Save this code with extension *.bat or run each command one by one in Command Prompt.

    CD is the Current Directory of the browser where you want to run the macro, for example I'm using Pale Moon, you can change it to firefox or whatever.

    P.S.: This won't work in Imacros Browser, as it doesn't support *.js files by default.