chris69 Posted January 28, 2010 Share Posted January 28, 2010 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 Link to comment Share on other sites More sharing options...
FaT3oYCG Posted January 28, 2010 Share Posted January 28, 2010 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. Link to comment Share on other sites More sharing options...
chris69 Posted January 29, 2010 Author Share Posted January 29, 2010 You could try ShellExecute and see if that makes a difference?I triedShellExecute($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 Link to comment Share on other sites More sharing options...
chris69 Posted February 2, 2010 Author Share Posted February 2, 2010 Guys, really no ideas? Link to comment Share on other sites More sharing options...
Mikesch Posted February 2, 2010 Share Posted February 2, 2010 (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 February 2, 2010 by Mikesch Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now