This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory, ValueFromPipeline, Position = 0)] | |
[ValidatePattern('\.wav$', ErrorMessage = "You should specify .wav files")] | |
[string[]]$Input, | |
[Parameter(Position = 1)][Alias('p')] | |
[uint]$Passes = 10 | |
) | |
process { | |
Class Result { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
$host.ui.RawUI.WindowTitle = "JPEG Optimizer" | |
[Console]::CursorVisible = $false | |
$Host.PrivateData.ProgressBackgroundColor = "Gray" | |
$Host.PrivateData.ProgressForegroundColor = "Black" | |
Class ResultItem { | |
[string]$Name | |
[string]$Files_processed | |
[string]$Size_MB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Select-Button { | |
param( | |
[string]$Prompt, | |
[string[]]$Buttons, | |
[uint]$Position | |
) | |
"$Prompt " | Write-Host -NoNewline -ForegroundColor Magenta | |
$cursor = $Host.UI.RawUI.CursorPosition | |
$Panel = { | |
$panel_ = '' |
NewerOlder