mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-08 20:54:38 +02:00
Add show-credits.ps1
This commit is contained in:
32
Scripts/show-credits.ps1
Executable file
32
Scripts/show-credits.ps1
Executable file
@ -0,0 +1,32 @@
|
||||
<#
|
||||
.SYNTAX show-credits.ps1
|
||||
.DESCRIPTION shows the credits
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
clear-host
|
||||
|
||||
""
|
||||
& "$PSScriptRoot/write-big.ps1" " CREDITS"
|
||||
""
|
||||
|
||||
& "$PSScriptRoot/write-animated.ps1" "Typos: Markus Fleschutz"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Keyboard: Rapoo 12335 E9270P WL Ultra-Slim Touch"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Operating Systems: Windows 10 20H2 & Ubuntu Server 20.04 LTS"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Windows Terminal: version 1.7.1033.0"
|
||||
& "$PSScriptRoot/write-animated.ps1" "PowerShell: version 5.1 & 7.1.3"
|
||||
& "$PSScriptRoot/write-animated.ps1" "PowerShell Scripts: version 1.0"
|
||||
& "$PSScriptRoot/write-animated.ps1" "GitHub: github.com/fleschutz/PowerShell"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Executive Producer: Markus Fleschutz"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Special Thanks: Andrea Fleschutz"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Copyright: (c) 2020. All Rights Reserved"
|
||||
& "$PSScriptRoot/write-animated.ps1" "No Animals Were Harmed in the Making of This Film"
|
||||
|
||||
& "$PSScriptRoot/write-big.ps1" " Thanx 4 watching"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
@ -7,6 +7,8 @@
|
||||
|
||||
param($Line1 = "", $Line2 = "", $Line3 = "", $Line4 = "", $Line5 = "", $Line6 = "", $Line7 = "", $Line8 = "", $Line9 = "", [int]$Speed = 50) # 50 ms pause
|
||||
|
||||
$TerminalWidth = 120 # characters
|
||||
|
||||
function WriteAnimatedLine { param([string]$Line, [int]$Speed)
|
||||
[int]$Start = 1
|
||||
[int]$End = $Line.Length
|
||||
@ -15,7 +17,7 @@ function WriteAnimatedLine { param([string]$Line, [int]$Speed)
|
||||
|
||||
if ($Line -ne "") {
|
||||
foreach ($Pos in $Start .. $End) {
|
||||
$TextToDisplay = $Spaces.Substring(0, 40 - $pos / 2) + $Line.Substring(0, $Pos)
|
||||
$TextToDisplay = $Spaces.Substring(0, $TerminalWidth / 2 - $pos / 2) + $Line.Substring(0, $Pos)
|
||||
write-host -nonewline $TextToDisplay
|
||||
start-sleep -milliseconds $Speed
|
||||
$HOST.UI.RawUI.CursorPosition = $StartPosition
|
||||
|
Reference in New Issue
Block a user