This project has moved. For the latest updates, please go here.

Move Mouse in a predetermined pattern

Jul 8, 2014 at 5:46 AM
Thank you for sharing this wonderful program. Is it possible to move mouse pointer in a predetermined set of points ?
Say (100,100), (200,200), (300,300), (400,400)

Maybe it is possible to do this using a configuraiton file ?

Thanks,
Genny
Coordinator
Jul 8, 2014 at 9:04 AM
Hi Genny,

The easiest way to do this would be through the following PowerShell code, which could be called using the Custom Scripts facility:
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point(100,100)
Start-Sleep -Milliseconds 250
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point(200,200)
Start-Sleep -Milliseconds 250
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point(300,300)
Start-Sleep -Milliseconds 250
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point(400,400)
There are two things to consider with this:
  1. Even though the mouse pointer moves, it will not interrupt the screensaver. You can combine this with other Move Mouse features to get around this.
  2. The mouse pointer goes to the exact positions after the sleep, it does not move gracefully between points as if someone was moving the mouse. This could be fixed with more code.
Hope this helps.

sw3103
Marked as answer by sw3103 on 8/7/2014 at 3:36 AM