Skip to content

Instantly share code, notes, and snippets.

Avatar

John Scott JohnScottUK

View GitHub Profile
@JohnScottUK
JohnScottUK / Rotate-Tabs.ps1
Last active Jun 27, 2021
Script to Control+Tab between Internet Explorer Tabs
View Rotate-Tabs.ps1
<#
.SYNOPSIS
Rotate-Tabs rotates tabs in Internet Explorer with a delay.
.DESCRIPTION
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.
.PARAMETER delay
View template_script.sh
#!/usr/bin/env bash
set -o errexit -o errtrace -o nounset -o pipefail # Robust scripting.
# Find real script name and location...
cd .;origDir="$PWD";origScript="${BASH_SOURCE[0]}";[[ $origScript != */* ]]&&origScript="./$origScript"
realScript="$origScript";scriptName="${origScript##*/}";scriptDir="${origScript%/*}"
while [[ -L $realScript ]];do cd "${realScript%/*}";realScript="$(readlink "${realScript##*/}")";[[ $realScript != */* ]]&&realScript="./$realScript";done
cd -P "${realScript%/*}";realScript="$PWD/${realScript##*/}";realDir="$PWD";realName="${realScript##*/}";cd "$origDir"
#