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
| # Define the parameter | |
| param ( | |
| [string]$side = "L" | |
| ) | |
| # Create an external definition | |
| $swapbuttons = @' | |
| [DllImport("user32.dll")] | |
| public static extern Int32 SwapMouseButton(Int32 swap); | |
| '@ | |
| # Add class |
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
| Add-Type -AssemblyName System.Windows.Forms | |
| while ($true) { | |
| [System.Windows.Forms.SendKeys]::SendWait("{F5}") | |
| $currentTime = Get-Date -Format "HH:mm:ss" | |
| Write-Host "F5 sent at $currentTime" | |
| $waitTime = Get-Random -Minimum 30 -Maximum 50 | |
| Start-Sleep -Seconds $waitTime | |
| } |
OlderNewer