From 9e0ec7b4be61991609e1325545936a876c907a3c Mon Sep 17 00:00:00 2001 From: Tomasz Kostrzewa Date: Tue, 5 Mar 2024 17:43:30 +0100 Subject: [PATCH] new file: RdzeN-Profile/RdzeN-Profile.ps1 new file: RdzeN-Profile/functions/New-SimulateTyping.ps1 deleted: SimulateTyping/New-SimulateTyping.ps1 --- RdzeN-Profile/RdzeN-Profile.ps1 | 4 ++++ RdzeN-Profile/functions/New-SimulateTyping.ps1 | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 RdzeN-Profile/RdzeN-Profile.ps1 create mode 100644 RdzeN-Profile/functions/New-SimulateTyping.ps1 diff --git a/RdzeN-Profile/RdzeN-Profile.ps1 b/RdzeN-Profile/RdzeN-Profile.ps1 new file mode 100644 index 0000000..f917d24 --- /dev/null +++ b/RdzeN-Profile/RdzeN-Profile.ps1 @@ -0,0 +1,4 @@ +# gitea.RdzeN.net +# +# Example Powershell Profile. +# \ No newline at end of file diff --git a/RdzeN-Profile/functions/New-SimulateTyping.ps1 b/RdzeN-Profile/functions/New-SimulateTyping.ps1 new file mode 100644 index 0000000..7903cde --- /dev/null +++ b/RdzeN-Profile/functions/New-SimulateTyping.ps1 @@ -0,0 +1,17 @@ +# 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 "" +} \ No newline at end of file