IE open different tabs depending on day of the week

Solution 1:

Rather than trying the brute force method, how about a work around?

Open up each set of tabs either in different windows or one set at a time and save all tabs to bookmark folders. Put the folders on the bookmark toolbar for ease of access.

On each day, right-click on the folder and open all tabs with one click.

You could put all the day folders into a top-level folder to save space if you want at the expense of an extra click to get to them.

If you really must go further, you need to write a program or script to drive IE. The easiest way is probably to write a PowerShell script.

Solution 2:

You can use PowerShell to automate IE:

This example script I shoved together will figure out which day it is, and open IE with a set of tabs for that day:

# Arrays of sites to open; one for each day of the week.
$mondaySites = @("http://www.google.com", "http://www.yahoo.com", "http://www.bing.com")
$tuesdaySites = @("http://www.intel.com","http://www.apple.com","http://www.ubuntu.com/","http://www.android.com/", "http://www.microsoft.com")
$fridaySites = @("http://www.superuser.com", "http://www.cnn.com","http://www.bbc.com/news/world/","http://www.reddit.com/r/funny/")

$sitesToOpen = @()

# Get the day of the week
$today = (get-date).DayOfWeek

# Depending on the day of the week discovered, assign the right day's array into the sitesToOpen array.
switch ($today) { 
        "Monday" {$sitesToOpen = $mondaySites} 
        "Tuesday" {$sitesToOpen = $tuesdaySites} 
        "Friday" {$sitesToOpen = $fridaySites}
    }

# Use COM to create a new IE instance.    
$ie = new-object -com "InternetExplorer.Application"

$isFirstSite = $true

# Loop through the array of sites, and navigate our IE instance to them.
foreach ($site in $sitesToOpen) {
        If ($isFirstSite) {
            $ie.Navigate2($site)
            $isFirstSite = $false
        } else {
            # If it's not the first site, then include the flag to open the site in a new tab.
            $ie.Navigate2($site, 0x10000)
        }
    }

# Show the IE window.    
$ie.Visible = $true

Note: I only did site arrays for three days, you'll want to add others for other days you need to work on. :)