• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

how to use bat file to open serveral html files wiht one instance of ie8

G

GS

Flightless Bird
when I tried on ie8 with bat file like
"<<i8dir>>iexplore" h1.html
"<<i8dir>>iexplore" h2.html
"<<i8dir>>iexplore" h3.html

they all opened in one single tab not in multiple tabs
what is the correct way to do this.

I am getting tired of manually opening a number of test html files for my
app development and test
 
P

PA Bear [MS MVP]

Flightless Bird
Developer-specific resources include:

MSDN IE Development Forum (post such questions here instead)
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads

Tip: When posting in Developer forums, always include a link to your web
site or test pages in your first post.

IE Developer Center
http://msdn.microsoft.com/en-us/ie/default.aspx

Learn IE8
http://msdn.microsoft.com/en-us/ie/aa740473.aspx


GS wrote:
> when I tried on ie8 with bat file like
> "<<i8dir>>iexplore" h1.html
> "<<i8dir>>iexplore" h2.html
> "<<i8dir>>iexplore" h3.html
>
> they all opened in one single tab not in multiple tabs
> what is the correct way to do this.
>
> I am getting tired of manually opening a number of test html files for my
> app development and test
 
R

Rob

Flightless Bird
Re: how to use bat file to open serveral html files wiht oneinstance of ie8

PA Bear [MS MVP] <PABearMVP@gmail.com> wrote:
> Developer-specific resources include:
>
> MSDN IE Development Forum (post such questions here instead)
> http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads


Tip: When sending someone away to another place, make sure it actually
does exist.

> Tip: When posting in Developer forums, always include a link to your web
> site or test pages in your first post.


Tip: when pasting a canned reply, make sure it is relevant to the question.

> IE Developer Center
> http://msdn.microsoft.com/en-us/ie/default.aspx
>
> Learn IE8
> http://msdn.microsoft.com/en-us/ie/aa740473.aspx
>
>
> GS wrote:
>> when I tried on ie8 with bat file like
>> "<<i8dir>>iexplore" h1.html
>> "<<i8dir>>iexplore" h2.html
>> "<<i8dir>>iexplore" h3.html
>>
>> they all opened in one single tab not in multiple tabs
>> what is the correct way to do this.
>>
>> I am getting tired of manually opening a number of test html files for my
>> app development and test

>
 
G

GS

Flightless Bird
found out I can use vbs script.


Dim ie
set ie = CreateObject("InternetExplorer.Application") 'InternetExplorer

ie.navigate(file1.html)
ie.navigate( file2.html, 2048)
....

the key to new tab is the extra argument value 2048.

now it's a cinch
as for bat file, I could not and have not found a way


"PA Bear [MS MVP]" <PABearMVP@gmail.com> wrote in message
news:eVI$eVvFLHA.6120@TK2MSFTNGP04.phx.gbl...
> Developer-specific resources include:
>
> MSDN IE Development Forum (post such questions here instead)
> http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads
>
> Tip: When posting in Developer forums, always include a link to your web
> site or test pages in your first post.
>
> IE Developer Center
> http://msdn.microsoft.com/en-us/ie/default.aspx
>
> Learn IE8
> http://msdn.microsoft.com/en-us/ie/aa740473.aspx
>
>
> GS wrote:
> > when I tried on ie8 with bat file like
> > "<<i8dir>>iexplore" h1.html
> > "<<i8dir>>iexplore" h2.html
> > "<<i8dir>>iexplore" h3.html
> >
> > they all opened in one single tab not in multiple tabs
> > what is the correct way to do this.
> >
> > I am getting tired of manually opening a number of test html files for

my
> > app development and test

>
 
P

PA Bear [MS MVP]

Flightless Bird
We shall alert the media.

GS wrote:
> found out I can use vbs script.
>
>
> Dim ie
> set ie = CreateObject("InternetExplorer.Application") 'InternetExplorer
>
> ie.navigate(file1.html)
> ie.navigate( file2.html, 2048)
> ...
>
> the key to new tab is the extra argument value 2048.
>
> now it's a cinch
> as for bat file, I could not and have not found a way
>
>
> "PA Bear [MS MVP]" <PABearMVP@gmail.com> wrote in message
> news:eVI$eVvFLHA.6120@TK2MSFTNGP04.phx.gbl...
>> Developer-specific resources include:
>>
>> MSDN IE Development Forum (post such questions here instead)
>> http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads
>>
>> Tip: When posting in Developer forums, always include a link to your web
>> site or test pages in your first post.
>>
>> IE Developer Center
>> http://msdn.microsoft.com/en-us/ie/default.aspx
>>
>> Learn IE8
>> http://msdn.microsoft.com/en-us/ie/aa740473.aspx
>>
>>
>> GS wrote:
>>> when I tried on ie8 with bat file like
>>> "<<i8dir>>iexplore" h1.html
>>> "<<i8dir>>iexplore" h2.html
>>> "<<i8dir>>iexplore" h3.html
>>>
>>> they all opened in one single tab not in multiple tabs
>>> what is the correct way to do this.
>>>
>>> I am getting tired of manually opening a number of test html files for
>>> my
>>> app development and test
 
R

Robert Aldwinckle

Flightless Bird
"GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message
news:uKji0BvFLHA.1316@TK2MSFTNGP02.phx.gbl...
> when I tried on ie8 with bat file like
> "<<i8dir>>iexplore" h1.html
> "<<i8dir>>iexplore" h2.html
> "<<i8dir>>iexplore" h3.html
>
> they all opened in one single tab not in multiple tabs
> what is the correct way to do this.



If you made those Favorites (pointed to by .url files) you could try this
(e.g. from the directory where you kept them):

for %u in (*.URL) do "%u"


>
> I am getting tired of manually opening a number of test html files for my
> app development and test



I have been meaning to figure out how to use PowerShell instead of a cmd
window. ; )


Good luck

Robert Aldwinckle
---
 
J

Jeff Strickland

Flightless Bird
"GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message
news:-OEpOyKwFLHA.5700@TK2MSFTNGP04.phx.gbl...
> found out I can use vbs script.
>
>
> Dim ie
> set ie = CreateObject("InternetExplorer.Application") 'InternetExplorer
>
> ie.navigate(file1.html)
> ie.navigate( file2.html, 2048)
> ...


Do you simply add 1024 to the 2048 to make new tabs for additional files?

2048 for a tab, 3072 for the next, 4096 for the next, and so on?
 
G

GS

Flightless Bird
thx
what is difference of using url instead of
"<<ie8dir>>\iexplorer" f1.html
cd /d d:/mytestDataFolder
for %i in (test*.html) do %i
 
G

GS

Flightless Bird
Re: how to use bat file to open serveral html files whht one instance of ie8

no, 2048 means use a new tab for the navigate instead of using the currently
active tab when you don't specify the 2nd argument

Note the vbscript will stop the moment it navigates to a file or site with
disallowed script/activeX even if you have the ignore all
On Error Resume Next

"Jeff Strickland" <crwlrjeff@yahoo.com> wrote in message
news:i0bnu5$sln$1@news.eternal-september.org...
>
> "GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message
> news:-OEpOyKwFLHA.5700@TK2MSFTNGP04.phx.gbl...
> > found out I can use vbs script.
> >
> >
> > Dim ie
> > set ie = CreateObject("InternetExplorer.Application") 'InternetExplorer
> >
> > ie.navigate(file1.html)
> > ie.navigate( file2.html, 2048)
> > ...

>
> Do you simply add 1024 to the 2048 to make new tabs for additional files?
>
> 2048 for a tab, 3072 for the next, 4096 for the next, and so on?
>
>
>
>
>
>
>
 
R

Robert Aldwinckle

Flightless Bird
"GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message
news:uAZx9xzFLHA.1484@TK2MSFTNGP02.phx.gbl...
> thx


> what is difference of using url instead of
> "<<ie8dir>>\iexplorer" f1.html
> cd /d d:/mytestDataFolder
> for %i in (test*.html) do %i



I don't know. Does it do what you want too?...

<cmd_output OS="W7 X64">

C:/>assoc .html
..html=htmlfile

C:/>ftype htmlfile
htmlfile="C:/Program Files (x86)\Internet Explorer\IEXPLORE.EXE" -nohome

C:/>assoc .url
..url=InternetShortcut

C:/>ftype InternetShortcut
InternetShortcut="C:/Windows\System32\rundll32.exe"
"C:/Windows\System32\ieframe.dll",OpenURL %l

</cmd_output>

E.g., you might have to find the right combination of options to make sure
that you didn't open multiple windows, even if they were being started under
the same base iexplore.exe task. FWIW the one I suggested works for me but
for all I know that may only be because of my popup options or something.


Robert
---
 
J

Jeff Strickland

Flightless Bird
Re: how to use bat file to open serveral html files whht one instance of ie8

So, the vb script would look something like
navigate(file1,2048)
navigate(file2,2048)
navigate(file3,2048)
navigate(file4,2048)

and so on, to open several single files in separate tabs running in the same
instance of ie?



"GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message
news:-OiLi2Y1FLHA.1316@TK2MSFTNGP02.phx.gbl...
> no, 2048 means use a new tab for the navigate instead of using the
> currently
> active tab when you don't specify the 2nd argument
>
> Note the vbscript will stop the moment it navigates to a file or site
> with
> disallowed script/activeX even if you have the ignore all
> On Error Resume Next
>
> "Jeff Strickland" <crwlrjeff@yahoo.com> wrote in message
> news:i0bnu5$sln$1@news.eternal-september.org...
>>
>> "GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message
>> news:-OEpOyKwFLHA.5700@TK2MSFTNGP04.phx.gbl...
>> > found out I can use vbs script.
>> >
>> >
>> > Dim ie
>> > set ie = CreateObject("InternetExplorer.Application")
>> > 'InternetExplorer
>> >
>> > ie.navigate(file1.html)
>> > ie.navigate( file2.html, 2048)
>> > ...

>>
>> Do you simply add 1024 to the 2048 to make new tabs for additional files?
>>
>> 2048 for a tab, 3072 for the next, 4096 for the next, and so on?
>>
>>
>>
>>
>>
>>
>>

>
>
 
G

GS

Flightless Bird
Re: how to use bat file to open serveral html files whht one instance of ie8

almost. the first file do not need the 2048 argument unless you want the
original about:blank or whatever active tab left alone
"Jeff Strickland" <crwlrjeff@yahoo.com> wrote in message
news:i0d4bu$ld8$1@news.eternal-september.org...
> So, the vb script would look something like
> navigate(file1,2048)
> navigate(file2,2048)
> navigate(file3,2048)
> navigate(file4,2048)
>
> and so on, to open several single files in separate tabs running in the

same
> instance of ie?
>
>
>
> "GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message
> news:-OiLi2Y1FLHA.1316@TK2MSFTNGP02.phx.gbl...
> > no, 2048 means use a new tab for the navigate instead of using the
> > currently
> > active tab when you don't specify the 2nd argument
> >
> > Note the vbscript will stop the moment it navigates to a file or site
> > with
> > disallowed script/activeX even if you have the ignore all
> > On Error Resume Next
> >
> > "Jeff Strickland" <crwlrjeff@yahoo.com> wrote in message
> > news:i0bnu5$sln$1@news.eternal-september.org...
> >>
> >> "GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message
> >> news:-OEpOyKwFLHA.5700@TK2MSFTNGP04.phx.gbl...
> >> > found out I can use vbs script.
> >> >
> >> >
> >> > Dim ie
> >> > set ie = CreateObject("InternetExplorer.Application")
> >> > 'InternetExplorer
> >> >
> >> > ie.navigate(file1.html)
> >> > ie.navigate( file2.html, 2048)
> >> > ...
> >>
> >> Do you simply add 1024 to the 2048 to make new tabs for additional

files?
> >>
> >> 2048 for a tab, 3072 for the next, 4096 for the next, and so on?
> >>
> >>
> >>
> >>
> >>
> >>
> >>

> >
> >

>
>
 
G

GS

Flightless Bird
it does what I want only if I had a line like this
explorer about:blank
somewhere before the FOR statement.


It does have about:blank as first tab but I can live with that.
the batch file no longer gets bothered by IE's restriction active content.
the batch file just keeps loading w/o skipping any file

works even when the FOR list includes fully qualified files in other
directory if the path does not contain blank nor special characters

"Robert Aldwinckle" <robald@techemail.com> wrote in message
news:eCOEM55FLHA.4060@TK2MSFTNGP04.phx.gbl...
>
>
> "GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message
> news:uAZx9xzFLHA.1484@TK2MSFTNGP02.phx.gbl...
> > thx

>
> > what is difference of using url instead of
> > "<<ie8dir>>\iexplorer" f1.html
> > cd /d d:/mytestDataFolder
> > for %i in (test*.html) do %i

>
>
> I don't know. Does it do what you want too?...
>
> <cmd_output OS="W7 X64">
>
> C:/>assoc .html
> .html=htmlfile
>
> C:/>ftype htmlfile
> htmlfile="C:/Program Files (x86)\Internet Explorer\IEXPLORE.EXE" -nohome
>
> C:/>assoc .url
> .url=InternetShortcut
>
> C:/>ftype InternetShortcut
> InternetShortcut="C:/Windows\System32\rundll32.exe"
> "C:/Windows\System32\ieframe.dll",OpenURL %l
>
> </cmd_output>
>
> E.g., you might have to find the right combination of options to make sure
> that you didn't open multiple windows, even if they were being started

under
> the same base iexplore.exe task. FWIW the one I suggested works for me

but
> for all I know that may only be because of my popup options or something.
>
>
> Robert
> ---
>
 
Top