diff --git a/Windows-Scripts/alert.ps1 b/Windows-Scripts/alert.ps1 new file mode 100644 index 0000000..5cb86ea --- /dev/null +++ b/Windows-Scripts/alert.ps1 @@ -0,0 +1,31 @@ +# Usage: alert ( ()) + +# HELP HANDLE +if($args[0] -eq 'h' -or $args[0] -eq '-h' -or $args[0] -eq 'H' -or $args[0] -eq '-H' -or $args[0] -eq 'help' -or $args[0] -eq 'Help' -or $args[0] -eq 'HELP') { + Write-Host "Usage: alert ( ())`nalert h/-h/help/etc: Display this help message" + exit +} + +# MESSAGE HANDLE DEFAULT +if([string]::IsNullOrEmpty($args[0])) { + $Message = "Alert" +} else { + $Message = $args[0] +} + +# TYPE HANDLE DEFAULT +if([string]::IsNullOrEmpty($args[1])) { + $Type = "Information" +} else { + $Type = $args[1] +} + +# BUTTONS HANDLE DEFAULT +if([string]::IsNullOrEmpty($args[2])) { + $Buttons = "OK" +} else { + $Buttons = $args[2] +} + +Add-Type -AssemblyName PresentationFramework +[System.Windows.MessageBox]::Show($Message, $Message, $Buttons, $Type); \ No newline at end of file