Sign in to follow this  
Followers 0
chris69

Starting a hidden Firefox

5 posts in this topic

Hi guys,

My goal is to start a Firefox (v 3.6) instance on a WinXP SP3 completely in background, i.e., I don't want to see the new window, even not for a short time. AFAIK, using Run() in combination with @SW_HIDE should do this job. Here's what I'm using:

Run($path & "firefox.exe", "", @SW_HIDE)

However, this spawns Firefox just normally, not hidden. I've to use the following snippet to bring it to the background:

WinWait("[TITLE:Google - Mozilla Firefox]")

WinSetState ("[LAST]", "", @SW_HIDE)

This works, but unfortunately there is a short time where I see a Firefox popping up before it is eventually hidden. I'd really like to run it fully in background, any ideas how to do this?

A second question regards a Java based application that I'd also like to hide. However, using WinSetState(..., @SW_HIDE) does not actually hide the window, it resizes it to 0 width/height (only the title bar remains visible) and moves it to the background. Moreover, the program is still visible in the task bar. Why is that?

Thanks in advance for any hints!

Cheers,

Chris

Share this post


Link to post
Share on other sites



You could try ShellExecute and see if that makes a difference?


Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right.

Share this post


Link to post
Share on other sites

You could try ShellExecute and see if that makes a difference?

I tried

ShellExecute($path & "firefox.exe", "about:blank", "", "open", @SW_HIDE)

which also spawns a firefox instance, but also does not hide it. I also tried deactivating tabs in Firefox, but this did not solve the problem.

Any more ideas how to spawn a hidden firefox?

Chris

Share this post


Link to post
Share on other sites

Guys, really no ideas?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Guys, really no ideas?

Don't know if this is a solution, but might help in understanding what's going on. My guess that extensions prevent Firefox from hiding "correctly".

At least,

ShellExecute($path & "firefox.exe", "-safe-mode about:blank", "", "", @SW_HIDE)

works for me, at least it stays hidden (and running).

-safe-mode

Launches the application with all extensions disabled, for that launch only.

(Extensions are not loaded, but are not permanently disabled in the Extension Manager datasource).

Sure -safe-mode is some kind of debugging feature, it depends if you can live without the extensions for whatever you intend to do with that hidden firefox.

Now if you could blame it on a certain extension....

Edited by Mikesch

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0