mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-05 06:48:25 +02:00
Add window title update
This commit is contained in:
parent
a5a73c929b
commit
1bc034b829
@ -24,11 +24,14 @@ try {
|
|||||||
[int]$Minutes = $Milliseconds / 60000
|
[int]$Minutes = $Milliseconds / 60000
|
||||||
[int]$Seconds = ($Milliseconds / 1000) % 60
|
[int]$Seconds = ($Milliseconds / 1000) % 60
|
||||||
"▶️Playing for $($Minutes.ToString('00')):$($Seconds.ToString('00')) sec.: 🎵$Filename ..."
|
"▶️Playing for $($Minutes.ToString('00')):$($Seconds.ToString('00')) sec.: 🎵$Filename ..."
|
||||||
|
$PreviousTitle = $host.ui.RawUI.WindowTitle
|
||||||
|
$host.ui.RawUI.WindowTitle = "▶️$Filename"
|
||||||
$MediaPlayer.Volume = 1
|
$MediaPlayer.Volume = 1
|
||||||
$MediaPlayer.play()
|
$MediaPlayer.play()
|
||||||
start-sleep -milliseconds $Milliseconds
|
start-sleep -milliseconds $Milliseconds
|
||||||
$MediaPlayer.stop()
|
$MediaPlayer.stop()
|
||||||
$MediaPlayer.close()
|
$MediaPlayer.close()
|
||||||
|
$host.ui.RawUI.WindowTitle = $PreviousTitle
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user