From 90e5fc93983991461d0fcf7c8a5f6f33a23b070e Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 20 Mar 2023 07:57:12 +0100 Subject: [PATCH] Update open-dashboards.ps1 and switch-tabs.ps1 --- Scripts/open-dashboards.ps1 | 1 + Scripts/switch-tabs.ps1 | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Scripts/open-dashboards.ps1 b/Scripts/open-dashboards.ps1 index e62fcd62..5b0a7df6 100644 --- a/Scripts/open-dashboards.ps1 +++ b/Scripts/open-dashboards.ps1 @@ -11,6 +11,7 @@ Author: Markus Fleschutz | License: CC0 #> +& "$PSScriptRoot/open-default-browser.ps1" https://track.toggl.com/timer & "$PSScriptRoot/open-default-browser.ps1" https://news.google.com & "$PSScriptRoot/open-default-browser.ps1" https://www.windy.com/de/-Wetterradar-radar & "$PSScriptRoot/open-default-browser.ps1" https://www.arcgis.com/apps/dashboards/c8af9c5411814584b460cc87cb7c3780 diff --git a/Scripts/switch-tabs.ps1 b/Scripts/switch-tabs.ps1 index e2747d2e..a33f353b 100644 --- a/Scripts/switch-tabs.ps1 +++ b/Scripts/switch-tabs.ps1 @@ -1,12 +1,12 @@ <# .SYNOPSIS - Presses the Next Tab hotkey + Switches browser tabs .DESCRIPTION - This PowerShell script presses the Next Tab keyboard shortcuts. + This PowerShell script switches browser tabs automatically every seconds (by pressing Ctrl + PageDown). .EXAMPLE PS> ./switch-tabs .NOTES - Author: Markus Fleschutz / License: CC0 + Author: Markus Fleschutz / License: CC0 .LINK https://github.com/fleschutz/talk2windows #> @@ -14,7 +14,8 @@ param([int]$Interval = 5) # in seconds try { - Write-Host "Switching browser tabs every $Interval seconds (press Ctrl + C to stop it)..." -noNewline + 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)..." -noNewline $obj = New-Object -com wscript.shell for ([int]$i = 0; $i -lt 1000; $i++) { Write-Host "." -noNewline @@ -23,6 +24,6 @@ try { } exit 0 # success } catch { - & "$PSScriptRoot/_reply.ps1" "Sorry: $($Error[0])" + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" exit 1 }