Skip to content

Commit

Permalink
Create msgbox.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
andersonpatricio authored Oct 21, 2019
1 parent 1e069eb commit 02a598d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions msgbox.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Function Msgbox($caption,$message,$type,$MaxSize){
if ($MaxSize -eq $null) { $MaxSize = 66}
$vDynamicSpace = ($MaxSize - ($message).Length)
$vDynamicSpace = $vSpaces * $vDynamicSpace
Write-Host $caption $message $vDynamicSpace " [" -NoNewline
if ($type -eq '0') {
Write-Host -ForegroundColor Green " OK " -NoNewline
}Elseif ($type -eq '1'){
Write-Host -ForegroundColor Yellow " WARNING " -NoNewline
}Else{
Write-Host -ForegroundColor Red " ERROR " -NoNewline
}
Write-Host "]" -NoNewline
}

0 comments on commit 02a598d

Please sign in to comment.