| | |
help with .bat file opening multiple programs
![]() |
•
•
Join Date: Nov 2007
Posts: 86
Reputation:
Solved Threads: 6
Hi all,
as a web developer, I am working on cross browser usage. I know, I know, there are websites that take snap shots.
The issue is a bit more indepth. I've got stuff that LOOKS alright in most browsers but don't exactly function properly (some javascript stuff, some dom uasage).
I have (on the same computer) firefox, safari, opera, ie7, ie6, ie5.
I want to test in all of these browsers.
At windows command line, it's fairly easy to launch a url in each of these.
So, I figured, "why not make a bat file that opens the site up in each of these browsers". It should be easy enough right?
and save as .bat and open the bat file.
Well, what is happening is that it does open them, but not all at once, not even one right after the other. I have to close the first one, then the second one pops up, then close that and the third one pops up.
I have tried prefixing these with "start". which (for some weird reason), only serves to open all three of these in IE7 (my default browser).
Eventually, I would prefer to build a small VB program that will open them all in a tab style format, unfortunately, I don't think that's possible given that vb 2005 only has one browser type to use.
At any rate, if anyone can tell me why there is this pause happening and how to get around it, that would be great.
Thanks
Sage
as a web developer, I am working on cross browser usage. I know, I know, there are websites that take snap shots.
The issue is a bit more indepth. I've got stuff that LOOKS alright in most browsers but don't exactly function properly (some javascript stuff, some dom uasage).
I have (on the same computer) firefox, safari, opera, ie7, ie6, ie5.
I want to test in all of these browsers.
At windows command line, it's fairly easy to launch a url in each of these.
"C:\Program Files\Mozilla Firefox\firefox.exe" www.google.com
So, I figured, "why not make a bat file that opens the site up in each of these browsers". It should be easy enough right?
"C:\Program Files\MultipleIEs\IE6\IEXPLORE.exe" www.google.com "C:\Program Files\MultipleIEs\IE55\IEXPLORE.exe" www.google.com "C:\Program Files\Mozilla Firefox\firefox.exe" www.google.com
Well, what is happening is that it does open them, but not all at once, not even one right after the other. I have to close the first one, then the second one pops up, then close that and the third one pops up.
I have tried prefixing these with "start". which (for some weird reason), only serves to open all three of these in IE7 (my default browser).
Eventually, I would prefer to build a small VB program that will open them all in a tab style format, unfortunately, I don't think that's possible given that vb 2005 only has one browser type to use.
At any rate, if anyone can tell me why there is this pause happening and how to get around it, that would be great.
Thanks
Sage
Last edited by sagedavis; Feb 17th, 2008 at 6:24 pm. Reason: typo
If you are willing to play with the Windows Shell, you could probably get it to do what you want.
Something like this (starturl.vbs):
Hope this helps.
Something like this (starturl.vbs):
' Make sure that the URL to display is specified. Complain if not. If WScript.Arguments.Count < 1 Then WScript.Echo "You must call the script with the name of the web page to display" WScript.Quit End If ' Double quote the URL if it has spaces in it. ' (This is too stupid here to notice if the URL has double quotes in it already.) url = WScript.Arguments.Item( 0 ) If InStr( url, " " ) Then url = """" & url & """" End If ' Create the shell and start each browser to display the URL Set Shell = CreateObject( "WScript.Shell" ) Shell.Run( """C:\Program Files\MultipleIEs\IE6\IEXPLORE.exe"" " & url, , False ) Shell.Run( """C:\Program Files\MultipleIEs\IE55\IEXPLORE.exe"" " & url, , False ) Shell.Run( """C:\Program Files\Mozilla Firefox\mozilla.exe"" " & url, , False )
Hope this helps.
Last edited by Duoas; Feb 29th, 2008 at 12:20 am.
In order to get what you want to happen try this [all one line]:
The
start firefox www.google.com & start "C:\Program Files\MultipleIEs\IE6\IEXPLORE.exe" www.google.com & start "C:\Program Files\MultipleIEs\IE55\IEXPLORE.exe" www.google.com
& is used to start more than one process using the same command line. Using && will allow you to start additional processes only if the previous process started without issue. ![]() |
Other Threads in the Legacy and Other Languages Forum
- Previous Thread: Need to send Cntrl +C to an Running Exe using a DOS batch File.
- Next Thread: How to get "NIGHT" node from LISP list (((GOOD))((NIGHT))) ?
Views: 6829 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for Legacy and Other Languages






