PowerShell-Profile/functions/New-SimulateTyping.ps1
2024-05-01 14:12:54 +02:00

17 lines
479 B
PowerShell

# gitea.RdzeN.net
# Simulate Typing
function New-SimulateTyping {
param(
[string]$message
)
# Iterate through each character in the text
foreach ($char in $message.ToCharArray()) {
# Write each character to the screen
Write-Host -NoNewline $char -ForegroundColor Yellow
# Wait before writing the next character (adjustable time in milliseconds)
Start-Sleep -Milliseconds (Get-Random -Minimum 10 -Maximum 100)
}
# New line after last char.
Write-Host ""
}