-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathMouseMover.ps1
More file actions
32 lines (29 loc) · 1.31 KB
/
MouseMover.ps1
File metadata and controls
32 lines (29 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Add-Type -AssemblyName System.Windows.Forms
# Rename Powershell Window
$PowershellConsole = (Get-Host).UI.RawUI
$PowershellConsole.WindowTitle = "Mouse Mover"
Function BalloonTip{
[system.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms') | Out-Null
$balloon = New-Object System.Windows.Forms.NotifyIcon
$path = Get-Process -id $pid | Select-Object -ExpandProperty Path
$icon = [System.Drawing.Icon]::ExtractAssociatedIcon($path)
$balloon.Icon = $icon
$balloon.BalloonTipIcon = 'Info'
$balloon.BalloonTipTitle = 'Secure Screen Stopper'
$balloon.BalloonTipText = 'Mouse will move in 15 seconds'
$balloon.Visible = $true
$balloon.ShowBalloonTip(30000)
Start-Sleep -Seconds 15
}
BalloonTip
do{
$screen = [System.Windows.Forms.SystemInformation]::VirtualScreen
[Windows.Forms.Cursor]::Position = "$($screen.Width*0.25),$($screen.Height*0.25)"
[Windows.Forms.Cursor]::Position = "$($screen.Width*0.75),$($screen.Height*0.25)"
[Windows.Forms.Cursor]::Position = "$($screen.Width*0.5),$($screen.Height*0.5)"
[Windows.Forms.Cursor]::Position = "$($screen.Width*0.25),$($screen.Height*0.75)"
[Windows.Forms.Cursor]::Position = "$($screen.Width*0.75),$($screen.Height*0.75)"
[System.Windows.Forms.SendKeys]::SendWait("{PGDN}")
Start-Sleep -Seconds 120
BalloonTip
} Until (1 -eq 5)