mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 05:04:39 +02:00
Improve description
This commit is contained in:
@ -4,14 +4,14 @@
|
||||
.DESCRIPTION
|
||||
This PowerShell script shows a toast-message notification for the Windows 10 Notification Center.
|
||||
.EXAMPLE
|
||||
PS> ./show-notification
|
||||
PS> ./show-notification "Hello World"
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Title = "Reminder", [string]$Text = "Hello World, this is a reminder.")
|
||||
param([string]$Text = "Hello World", [string]$Title = "NOTE", [int]$Duration = 5000)
|
||||
|
||||
try {
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
@ -22,7 +22,7 @@ try {
|
||||
$balloon.BalloonTipText = $Text
|
||||
$balloon.BalloonTipTitle = $Title
|
||||
$balloon.Visible = $true
|
||||
$balloon.ShowBalloonTip(5000)
|
||||
$balloon.ShowBalloonTip($Duration)
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Reference in New Issue
Block a user