----------------------------------------------------------------------
--- Knud van Eeden --- 13 August 2008 - 10:38 pm ---------------------

Computer: Editor: TSE: How to start Microsoft Internet Explorer v7 with URLs in multiple tabs? [parameter/ How to start Microsoft Internet Explorer v7 with multiple tabs from the command line?]

---

Steps: Overview:

 1. If you should get the error 'There is no script engine for file extension .js')
    download and install latest Windows Scripting Host v5.7

      http://www.microsoft.com/downloads/details.aspx?FamilyID=47809025-D896-482E-A0D6-524E7E844D81&displaylang=en

 2. -To create an initialization file, run e.g. the initialization macro once

--- cut here: begin --------------------------------------------------

// library: program: create: browser: tab: multiple: ini (filenamemacro=creaprmi.s) [kn, ri, we, 13-08-2008 21:18:32]
PROC PROCProgramCreateBrowserTabMultipleIni( STRING fileNameS, STRING sectionS )
 // e.g. PROC Main()
 // e.g.  PROCProgramCreateBrowserTabMultipleIni( ".\creaprmi.ini", "default" )
 // e.g. END
 // e.g.
 // e.g. <F12> Main()
 //
 PushPosition()
 //
 EditFile( fileNameS )
 AbandonFile()
 EraseDiskFile( fileNameS )
 //
 EditFile( fileNameS )
 //
 AddLine( Format( '[', sectionS, ']' ) )
 //
 AddLine( "" )
 //
 AddLine( "tab1 = http://www.semware.com" )
 AddLine( "tab2 = http://www.google.com" )
 AddLine( "tab3 = http://www.test.com" )
 //
 // and so on for tab4, tab5, ...
 //
 SaveFile()
 //
 AbandonFile()
 //
 PopPosition()
 //
END

--- cut here: end ----------------------------------------------------

 3. -That will create (in the same directory as this macro) an initialization file
     (you can also create or edit it afterwards manually
      or let it be created by some other program)
     which looks like this:

     --- cut here: begin --------------------------------------------------

      [default]

      tab1 = http://www.semware.com
      tab2 = http://www.google.com
      tab3 = http://www.test.com

     --- cut here: end ----------------------------------------------------

 4. -Run this TSE macro

--- cut here: begin --------------------------------------------------

// library: program: run: browser: tab: multiple (filenamemacro=runprtmu.s) [kn, ri, we, 13-08-2008 21:53:52]
PROC PROCProgramRunBrowserTabMultiple( STRING sectionS, STRING arrayS, STRING fileNameIniS )
 // e.g. PROC Main()
 // e.g.  PROCProgramRunBrowserTabMultiple( "default", "tab", ".\creaprmi.ini" )
 // e.g. END
 // e.g.
 // e.g. <F12> Main()
 //
 // Method
 //
 // 1. If you should get the error 'There is no script engine for file extension .js')
 //    download and install latest Windows Scripting Host v5.7
 //
 //      http://www.microsoft.com/downloads/details.aspx?FamilyID=47809025-D896-482E-A0D6-524E7E844D81&displaylang=en
 //
 // 2. -To create an initialization file, run e.g. the initialization macro once
 //
 // 3. -That will create (e.g. in the same directory as this macro) an initialization file
 //     (you can also create or edit it afterwards manually
 //      or let it be created by some other program)
 //     which looks like this:
 //
 //     --- cut here: begin --------------------------------------------------
 //
 //      [default]
 //
 //      tab1 = http://www.semware.com
 //      tab2 = http://www.google.com
 //      tab3 = http://www.test.com
 //
 //     --- cut here: end ----------------------------------------------------
 //
 // 4. -Start this TSE macro
 //
 // 5. -Your Microsoft Internet Explorer v7 browser will open with in the tabs that URLs
 //
 STRING s[255] = ""
 INTEGER stopB = FALSE
 INTEGER minI = 1
 INTEGER I = 0
 STRING fileNameTemporaryS[255] = ""
 STRING fileNameS[255] = ""
 //
 PushPosition()
 //
 //
 IF ( NOT ( EditFile( fileNameIniS ) ) )
  Warn( Format( "Initialization file", " ", fileNameIniS, " ", "not found. Please create this .ini file manually or run the initialization macro" ) )
  PopPosition()
  RETURN()
 ENDIF
 //
 fileNameTemporaryS = MakeTempName( ".\" )
 //
 EditFile( fileNameTemporaryS )
 //
 AddLine( Format( 'var oIE = new ActiveXObject( "InternetExplorer.Application" )', ";" ) )
 //
 AddLine( Format( "var navOpenInBackgroundTab = 0x1000", ";" ) )
 //
 I = minI - 1
 //
 REPEAT
  //
  I = I + 1
  //
  s = GetProfileStr( sectionS, Format( arrayS, Str( I ) ), "<not found>", fileNameIniS )
  //
  stopB = ( s == "<not found>" )
  //
  IF ( NOT ( stopB ) )
    AddLine( Format( "oIE.Navigate2(", " ", '"', s, '"', ",", " ", "navOpenInBackgroundTab", " ", ")", ";" ) )
  ENDIF
  //
 UNTIL ( stopB )
 //
 AddLine( Format( "oIE.Visible = true", ";" ) )
 //
 fileNameS = Format( SplitPath( fileNameTemporaryS, _NAME_ ), ".js" )
 //
 SaveAs( fileNameS )
 //
 EditFile( fileNameS )
 //
 IF ( NOT ( StartPgm( "wscript.exe", QuotePath( CurrFilename() ) ) ) )
  Warn( Format( "could not execute Windows Script Host file", " ", CurrFilename() ) )
 ENDIF
 //
 Warn( "When your Microsoft Internet Explorer browser has finished loading, please press any key" )
 //
 EraseDiskFile( fileNameS )
 EditFile( fileNameTemporaryS)
 AbandonFile()
 //
 EraseDiskFile( fileNameTemporaryS )
 EditFile( fileNameTemporaryS)
 AbandonFile()
 //
 PopPosition()
 //
END

--- cut here: end ----------------------------------------------------

 5. -Your Microsoft Internet Explorer v7 browser will open with in the tabs that URLs

===

Book: see also:



===

Diagram: see also:



===

File: see also:



===

Help: see also:



===

Image: see also:



===

[Internet: see also]

Microsoft Internet Explorer start with URL parameters from the command line to get multiple tabs
source: http://blogs.msdn.com/petel/archive/2007/01/19/internet-explorer-7-command-line-arguments.aspx

---

Microsoft Internet Explorer start with URL parameters from the command line to get multiple tabs
http://blogs.msdn.com/tonyschr/archive/2007/01/19/ie-automation-amp-tabs.aspx

===

Podcast: see also:



===

Screencast: see also:



===

Table: see also:



===

Video: see also:





---



----------------------------------------------------------------------