• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2444
  • Last Modified:

vbs script to open firefox with height and width set

What is the .vbs script to open a firefox window with parameters such as width, height,
position, etc? I have xp and firefox 1.03 installed.
0
steve44
Asked:
steve44
3 Solutions
 
ajaikumarrCommented:
Hai,

You can start the firefox using "<Drive>:\Program Files\Mozilla Firefox\firefox.exe" but you can't handle the height and with on code...

Bye
Ajai
0
 
nffvrxqgrcfqvvcCommented:
You can do this is visual basics, but in a vbscript I am not sure.
0
 
SizeyCommented:
You can set the size of a browser window with a javascript bookmark (instead of using a URL), this is of course assuming that javascript is enabled.

This works for me in FireFox 1.02, Windows XP:  
  javascript:resizeTo(640,480)

Unfortunately this does open a new tab, which may not be what you want.


I can also enter either of these in "Start" -> "Run" to open it with the bookmark:
  "c:\Program Files\Mozilla Firefox\firefox.exe" javascript:resizeTo(640,480)
  "firefox.exe" javascript:resizeTo(640,480)

NB: if you already have a Firefox open already, it opens a new tab in that instance.


The alternative would be to shell Firefox and store the process ID that Shell returns, then use a few API calls (I'm not sure that VBScript supports them) to find and size the window.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now