You've already forked SharedScripts
mirror of
https://github.com/jaapbrasser/SharedScripts.git
synced 2025-12-24 21:51:38 +02:00
Renamed times to count
This commit is contained in:
@@ -11,17 +11,33 @@ DateUpdated: 2019-09-20
|
||||
Version: 1.0.0
|
||||
Blog: https://www.jaapbrasser.com
|
||||
GitHub: https://www.github.com/jaapbrasser
|
||||
|
||||
.EXAMPLE
|
||||
Write-Emoticon
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Will indefinitely output a string of emoticons
|
||||
|
||||
.EXAMPLE
|
||||
Write-Emoticon -Count 10
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Will output a series of 10 emoticons
|
||||
#>
|
||||
|
||||
param(
|
||||
# Number of emoticons showed
|
||||
[int] $Times,
|
||||
# Number of emoticons showed, if not specified the function will continue indefinitely
|
||||
[int] $Count,
|
||||
# Delay in milliseconds, set to 50ms as a default value
|
||||
[int] $Delay = 50
|
||||
)
|
||||
|
||||
if ($Times) {
|
||||
1..$Times | ForEach-Object {
|
||||
if ($Count) {
|
||||
1..$Count | ForEach-Object {
|
||||
Write-Host "$(129408..129431 | Get-Random | ForEach-Object {
|
||||
[char]::convertfromutf32($_)}) " -NoNewLine -ForegroundColor (1..15|Get-Random)
|
||||
Start-Sleep -Milliseconds 50
|
||||
|
||||
Reference in New Issue
Block a user