Archive: Opening browsers window of defined size


Opening browsers window of defined size
Hi guys.

How can I open default browser's window of width=300; height=100 and without toolbar by NSIS?

Thank you.


There's no way to do this that will work for all browsers.
One method would be to use window.open in JavaScript embedded in an HTML document, but that would require a window to already be open.

You should try the nsWeb plugin (search the Wiki).

-Stu


What you could do is launch just a normal html page, with a javascript window.open(params) (google it) in an onLoad event, and then through javascript close the original opening window...leaving you with your sized window...

(This might not look very professional as it would take a couple seconds to open and then close, and various software products and browsers don't like javascript closing windows and throwing popups...but it seems like the simplest solution)


my 2 cents
finally this worked in my tests without "close window" popup (wm_close works better then self.close()), but I don't understand why Sleep required - it looks like during initialization fct or parent IE closes small window.
Put fct.dll to NSIS/plugins folder ( http://nsis.sourceforge.net/FCT_plug-in ).