Launch FireFox or Chrome hidden

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Georgie Munteer

Launch FireFox or Chrome hidden

21 Apr 2018, 06:51

I tried something like

Run, %A_ProgramFiles%\Mozilla Firefox\firefox.exe www.google.com, Hidden

or

Run, %A_ProgramFiles%\Mozilla Firefox\firefox.exe www.google.com, Hide

same with Chrome

it always pops up the window

I cannot use IE so com is out

Any tips guys?
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Launch FireFox or Chrome hidden

21 Apr 2018, 08:32

what do u mean by hidden?

you can start a headless chrome instance with Chrome.ahk
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Launch FireFox or Chrome hidden

21 Apr 2018, 14:46

Run
Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]

Notice the commas compared to yours? (Hint: Hide is not the WorkingDir)

Try:
Run, %A_ProgramFiles%\Mozilla Firefox\firefox.exe http://www.google.com,, Hide
Georgie Munteer

Re: Launch FireFox or Chrome hidden

22 Apr 2018, 00:33

Xtra wrote:Run
Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]

Notice the commas compared to yours? (Hint: Hide is not the WorkingDir)

Try:
Run, %A_ProgramFiles%\Mozilla Firefox\firefox.exe http://www.google.com,, Hide
You are right I made a mistake with the comma.

Can you test it, even with the right setup, the firefox window pops up
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Launch FireFox or Chrome hidden

22 Apr 2018, 01:51

I don't use firefox you may want to run firefox not as admin see here: How do I not run Firefox as an Administrator or run your script as admin.
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: Launch FireFox or Chrome hidden

22 Apr 2018, 01:56

But even if you could launch Firefox hidden this way, there is no good way to work with it after that. The above mentioned Chrome.ahk library by Geekdude would be the better alternative (but using Chrome - which seems ok according to the OP): https://autohotkey.com/boards/viewtopic ... e+geekdude

But I think even this library will use the COM IE interface (via an ActiveX element) to establish the Websocket API connection. There is still the Selenium Webdriver - but that means installation of third-party software.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 183 guests