user5997635
user5997635

Reputation:

How to launch Firefox Browser minimized with a .bat file?

I want this batch file to execute both windows of Mozilla Firefox minimized (The one that opens http://google.com and the one that runs the iMacro google.iim) Thanks

    :loop 
    cls
    taskkill /F /IM Firefox.exe
    cls
    taskkill /F /IM crashreporter.exe
    cls
    TIMEOUT /T 5
    start "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -no-remote -private-window http://google.com imacros://run/?m=google.iim
    TIMEOUT /T 555
    GOTO loop

Upvotes: 2

Views: 1029

Answers (1)

npocmaka
npocmaka

Reputation: 57282

your command starts a the firefox with a title that starts with imacros .... You can try to use sendkeys.bat :

:loop 
cls
taskkill /F /IM Firefox.exe
cls
taskkill /F /IM crashreporter.exe
cls
TIMEOUT /T 5
start "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -no-remote -private-window http://google.com imacros://run/?m=google.iim
TIMEOUT /T 5
call sendkeys.bat "imacros" "% "
call sendkeys.bat "imacros" "n"
TIMEOUT /T 555
GOTO loop

Upvotes: 1

Related Questions