Skip to content

Instantly share code, notes, and snippets.

Last active June 27, 2021 11:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Script to Control+Tab between Internet Explorer Tabs
Rotate-Tabs rotates tabs in Internet Explorer with a delay.
Rotate-Tabs will rotate tabs in Internet Explorer with a delay. It first waits for 20
seconds, counting down to give you time to switch Internet Explorer to the front and
then sends Control+Tab to the browser at regular intervals to switch to the next tab.
An optional delay parameter used. If not provided, then the script asks for a value
and then defaults to 60 seconds if nothing provided.
PS> Rotate-Tabs.ps1 -delay 120
PS> Rotate-Tabs.ps1 30
Param ([int32] $delay = "")
# Initialise...
Write-Host "Rotate Tabs V1.0."
Write-Host "Rotate between tabs in Internet Explorer."
# Check for -delay parameter...
If($delay -eq "") {
Write-Host ""
Write-Host "First open multiple tabs in Internet Explorer before returning here."
$delay = Read-Host -Prompt "Enter a delay between rotating tabs [60 Seconds]"
if($delay -eq "") {
# Allow switching to browser...
Write-Host ""
Write-Host "Now switch to Internet Explorer to rotate tabs every $delay seconds."
Write-Host "Press F11 or Alt+V then F to switch to full screen"
# Count down...
ForEach ($pause in @(5,5,5,1,1,1,1,1)) {
Write-Host "Waiting $remain seconds to start..."
Start-Sleep $pause
$remain = $remain - $pause
# Switch and Sleep...
Do {
Write-Host "Switching tabs..."
Write-Host "Sleeping $delay seconds to switch..."
Start-Sleep -Seconds $delay
} While ($i -ne 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment