diff --git a/Scripts/switch-tabs.ps1 b/Scripts/switch-tabs.ps1 index 4b9fe240..97e2497c 100644 --- a/Scripts/switch-tabs.ps1 +++ b/Scripts/switch-tabs.ps1 @@ -3,6 +3,8 @@ Switches browser tabs .DESCRIPTION This PowerShell script switches browser tabs automatically every seconds (by pressing Ctrl + PageDown). +.PARAMETER Interval + Specifies the switch interval in seconds (10 sec per default) .EXAMPLE PS> ./switch-tabs .NOTES @@ -11,13 +13,13 @@ https://github.com/fleschutz/talk2windows #> -param([int]$Interval = 5) # in seconds +param([int]$Interval = 10) # in seconds try { Write-Host "✅ Switching browser tabs automatically every $Interval seconds..." Write-Host " (click into the browser window to activate it, press Ctrl + C here to stop it)" $obj = New-Object -com wscript.shell - for ([int]$i = 0; $i -lt 1000; $i++) { + while ($true) { $obj.SendKeys("^{PGDN}") Start-Sleep -seconds $Interval }