Typing the contents of the clipboard using the keyboard

The following lines can type the text content of the clipboard using the keyboard. The process starts 2 seconds after starting the script and delays each keystroke by 3 milliseconds, which can of course be customized.

Start-Sleep -Seconds 1;
foreach ($line in Get-Clipboard)
{
    foreach ($char in [char[]]$line)
    {
        if ($char -match "[\+\^\%\~\(\)\{\}\[\]]")
        {
            [string]$char = "{$char}";
 
        } # if ($char -match "...
 
        [System.Windows.Forms.SendKeys]::SendWait($char);
        if($Milliseconds -gt 0)
        {
            Start-Sleep -Milliseconds $Milliseconds;
        }
    }             
    [System.Windows.Forms.SendKeys]::SendWait("{ENTER}");
}
positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

created by Bernhard | published: 2025-07-30 | Updated: 2025-07-30 | Übersetzung Deutsch |🔔 | Comments:0

Questions / Comments


 
By continuing to browse the site, you agree to our use of cookies. More Details