Created
July 19, 2013 00:59
-
-
Save bennettaur/6034326 to your computer and use it in GitHub Desktop.
This is a small VB script that moves a person's cursor to a random spot on their screen. It relies on Excel to run a macro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Dim Excel, x, y, i | |
Dim min, max | |
Randomize | |
min = 0 | |
max = 500 | |
Set Excel = WScript.CreateObject("Excel.Application") | |
Do While True | |
x = ((max-min+1)*Rnd+min) | |
y = ((max-min+1)*Rnd+min) | |
Excel.ExecuteExcel4Macro ( _ | |
"CALL(""user32"",""SetCursorPos"",""JJJ""," & x & "," & y & ")") | |
WScript.Sleep (5000) | |
Loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment