Solved

how to launch multiple web browsers evenly on my screen

Posted on 2014-02-20
1
427 Views
Last Modified: 2014-02-21
Hi experts,

Have you guys ever used that website called kayak.com where you can book flight or hotel reservations. You know so you enter in your desired flight date and then when you submit your info. It gives you your flight price on various websites so you can compare.

So for example if you picked expedia, orbitz, travelcity and priceline  then after you submitted your info, 4 browser windows open on my screen with the browser width spaced evenly.
So my default web browser opens with expedia on it taking up 25% width of my screen
and
another web browser window opens with orbitz on it taking up 25% width of my screen
and
another web browser window opens with travelocity on it taking up 25% width of my screen
and
another web browser window opens with priceline on it taking up 25% width of my screen

So my whole screen has bees been taking up with these 4 web browser windows right next to each other.

Anyone know how to do that?

For example, I have the following batch file called   Test1.bat

Here is the code:
set url=http://www.google.com

if exist "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" start "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe " %url%
if exist "%ProgramFiles(x86)%\Opera\opera.exe" start "" "%ProgramFiles(x86)%\Opera\opera.exe " %url%
if exist "%ProgramFiles(x86)%\Safari\Safari.exe" start "" "%ProgramFiles(x86)%\Safari\Safari.exe " %url%
if exist "%USERPROFILE%\AppData\Local\Google\Chrome\Application\chrome.exe" start "" "%USERPROFILE%\AppData\Local\Google\Chrome\Application\chrome.exe " %url%
if exist "C:\Program Files\Internet Explorer\iexplore.exe" start "" "C:\Program Files\Internet Explorer\iexplore.exe " %url%

Open in new window


When I click on the batch file my 5 web browsers(IE, Firefox, Chrome, Safari, Opera) all launch simultaneously and they launch on www.google.com

Is there a way to modify this so these 5 web browsers launch like the windows on kayak.com?

So I want these 5 web browsers to launch spaced evenly on my screen?
Or is there a better way to do this?
0
Comment
Question by:maqskywalker
1 Comment
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 39876608
How would you space 5 browsers? You can space an even number.

Anyway, since only IE is a COM object you would need to find a launcher for each. For example XULLauncher for Firefox

For IE only, this saved as launch.vbs would launch IE according to screen size

(Apologies for the not efficient code)

Option Explicit
Dim objIE, objIE1, objIE2, objIE3, objWshShell, strMessage, intResult

' from http://www.informit.com/articles/article.aspx?p=1170490&seqNum=7

' Set up the Automation objects
Set objWshShell = WScript.CreateObject("WScript.Shell")

Set objIE = WScript.CreateObject("InternetExplorer.Application")


' Navigate to a page and customize the browser window

objIE.Navigate "about:blank"
objIE.Toolbar   = False
objIE.StatusBar = False
objIE.MenuBar   = False


' Twiddle thumbs while the page loads
Do While objIE.Busy
Loop

objIE.Top    = 0
objIE.Left   = 0
objIE.Height = objIE.Document.parentWindow.screen.availHeight/2
objIE.Width  = objIE.Document.parentWindow.screen.availWidth/2
objIE.Visible = True
Set objIE = Nothing

'------------------------------------------------------------------

Set objIE1 = WScript.CreateObject("InternetExplorer.Application")


' Navigate to a page and customize the browser window

objIE1.Navigate "about:blank"
objIE1.Toolbar   = False
objIE1.StatusBar = False
objIE1.MenuBar   = False


' Twiddle thumbs while the page loads
Do While objIE1.Busy
Loop

objIE1.Top    = 0
objIE1.Left   = objIE1.Document.parentWindow.screen.availWidth/2
objIE1.Height = objIE1.Document.parentWindow.screen.availHeight/2
objIE1.Width  = objIE1.Document.parentWindow.screen.availWidth/2
objIE1.Visible = True
Set objIE1 = Nothing

'------------------------------------------------------------------


Set objIE2 = WScript.CreateObject("InternetExplorer.Application")


' Navigate to a page and customize the browser window

objIE2.Navigate "about:blank"
objIE2.Toolbar   = False
objIE2.StatusBar = False
objIE2.MenuBar   = False


' Twiddle thumbs while the page loads
Do While objIE2.Busy
Loop

objIE2.Top    = objIE2.Document.parentWindow.screen.availHeight/2
objIE2.Left   = 0
objIE2.Height = objIE2.Document.parentWindow.screen.availHeight/2
objIE2.Width  = objIE2.Document.parentWindow.screen.availWidth/2
objIE2.Visible = True
Set objIE2 = Nothing

Set objWshShell = Nothing

Open in new window

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now