2024-10-01 15:11:03 +02:00
|
|
|
|
<#
|
2023-03-19 19:07:59 +01:00
|
|
|
|
.SYNOPSIS
|
2023-07-01 18:02:07 +02:00
|
|
|
|
Open web dashboards
|
2023-03-19 19:07:59 +01:00
|
|
|
|
.DESCRIPTION
|
2023-08-21 22:53:15 +02:00
|
|
|
|
This PowerShell script launches the Web browser with 20 tabs of popular dashboard websites.
|
2024-05-17 08:04:54 +02:00
|
|
|
|
.PARAMETER timeInterval
|
|
|
|
|
Specifies the time interval between each tab (110ms per default)
|
2023-03-19 19:07:59 +01:00
|
|
|
|
.EXAMPLE
|
2023-06-22 09:45:11 +02:00
|
|
|
|
PS> ./open-dashboards.ps1
|
2024-05-17 08:04:54 +02:00
|
|
|
|
✅ Launching Web browser with 20 tabs showing Toggl Track•Google Calendar•Google Mail, ...
|
2024-03-06 09:01:18 +01:00
|
|
|
|
NOTE: Execute './switch-tabs.ps1' to switch from tab to tab automatically.
|
2023-06-01 12:23:20 +02:00
|
|
|
|
...
|
2023-03-19 19:07:59 +01:00
|
|
|
|
.LINK
|
|
|
|
|
https://github.com/fleschutz/PowerShell
|
|
|
|
|
.NOTES
|
|
|
|
|
Author: Markus Fleschutz | License: CC0
|
|
|
|
|
#>
|
|
|
|
|
|
2024-05-17 08:04:54 +02:00
|
|
|
|
param([int]$timeInterval = 110) # milliseconds
|
2024-03-06 09:01:18 +01:00
|
|
|
|
|
2023-03-20 12:57:29 +01:00
|
|
|
|
try {
|
2023-10-27 12:06:06 +02:00
|
|
|
|
Write-Progress "Reading Data/popular-dashboards.csv..."
|
2023-10-31 11:25:11 +01:00
|
|
|
|
$table = Import-CSV "$PSScriptRoot/../data/popular-dashboards.csv"
|
2024-03-06 09:01:18 +01:00
|
|
|
|
Write-Progress -completed "Done."
|
|
|
|
|
|
2024-05-17 08:04:54 +02:00
|
|
|
|
Write-Host "✅ Launching Web browser with 20 tabs showing " -noNewline
|
|
|
|
|
$numRows = $table.Length
|
2023-06-09 09:38:14 +02:00
|
|
|
|
foreach($row in $table) {
|
2024-05-17 08:04:54 +02:00
|
|
|
|
Write-Host "$($row.NAME)•" -noNewline
|
2023-06-09 09:38:14 +02:00
|
|
|
|
& "$PSScriptRoot/open-default-browser.ps1" "$($row.URL)"
|
2024-05-17 08:04:54 +02:00
|
|
|
|
Start-Sleep -milliseconds $timeInterval
|
2023-03-30 11:27:50 +02:00
|
|
|
|
}
|
2024-03-06 09:01:18 +01:00
|
|
|
|
Write-Host ""
|
|
|
|
|
Write-Host "NOTE: Execute './switch-tabs.ps1' to switch from tab to tab automatically."
|
2023-03-20 12:57:29 +01:00
|
|
|
|
exit 0 # success
|
|
|
|
|
} catch {
|
|
|
|
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
|
|
|
exit 1
|
2023-10-27 12:06:06 +02:00
|
|
|
|
}
|