snippets/powershell/keys.ps1
2024-10-08 17:22:51 +02:00

10 lines
247 B
PowerShell

# Press Ctrl key between 15-30 seconds random interval
Add-Type -AssemblyName System.Windows.Forms
while ($true)
{
[System.Windows.Forms.SendKeys]::SendWait("^")
$seconds = Get-Random -Minimum 15 -Maximum 30
Start-Sleep -Seconds $seconds
}