mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-22 09:58:19 +02:00
Update open-dashboards.ps1 and switch-tabs.ps1
This commit is contained in:
parent
a778fa2c58
commit
90e5fc9398
@ -11,6 +11,7 @@
|
|||||||
Author: Markus Fleschutz | License: CC0
|
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://news.google.com
|
||||||
& "$PSScriptRoot/open-default-browser.ps1" https://www.windy.com/de/-Wetterradar-radar
|
& "$PSScriptRoot/open-default-browser.ps1" https://www.windy.com/de/-Wetterradar-radar
|
||||||
& "$PSScriptRoot/open-default-browser.ps1" https://www.arcgis.com/apps/dashboards/c8af9c5411814584b460cc87cb7c3780
|
& "$PSScriptRoot/open-default-browser.ps1" https://www.arcgis.com/apps/dashboards/c8af9c5411814584b460cc87cb7c3780
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Presses the Next Tab hotkey
|
Switches browser tabs
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script presses the Next Tab keyboard shortcuts.
|
This PowerShell script switches browser tabs automatically every <n> seconds (by pressing Ctrl + PageDown).
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./switch-tabs
|
PS> ./switch-tabs
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz / License: CC0
|
Author: Markus Fleschutz / License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/talk2windows
|
https://github.com/fleschutz/talk2windows
|
||||||
#>
|
#>
|
||||||
@ -14,7 +14,8 @@
|
|||||||
param([int]$Interval = 5) # in seconds
|
param([int]$Interval = 5) # in seconds
|
||||||
|
|
||||||
try {
|
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
|
$obj = New-Object -com wscript.shell
|
||||||
for ([int]$i = 0; $i -lt 1000; $i++) {
|
for ([int]$i = 0; $i -lt 1000; $i++) {
|
||||||
Write-Host "." -noNewline
|
Write-Host "." -noNewline
|
||||||
@ -23,6 +24,6 @@ try {
|
|||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
& "$PSScriptRoot/_reply.ps1" "Sorry: $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user