Skip to content

Instantly share code, notes, and snippets.

@ukaszjankowski
Created July 26, 2017 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ukaszjankowski/25ac20d59326b166224985102aec53db to your computer and use it in GitHub Desktop.
Save ukaszjankowski/25ac20d59326b166224985102aec53db to your computer and use it in GitHub Desktop.
Add-Type -AssemblyName System.Windows.Forms
$myshell = New-Object -com "Wscript.Shell"
while(1) {
Start-Sleep -Seconds 60
$myshell.sendkeys("{F16}")
$Pos = [System.Windows.Forms.Cursor]::Position
$x = ($pos.X) + 1
$y = ($pos.Y) + 1
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment