Updated - Automatic Mouse Mover
This commit is contained in:
@@ -26,6 +26,26 @@ if %INTERVAL% GTR 10 (
|
|||||||
goto GET_INTERVAL
|
goto GET_INTERVAL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
echo.
|
||||||
|
REM Get cursor movement option
|
||||||
|
echo Cursor movement:
|
||||||
|
echo [1] Visible cursor movement
|
||||||
|
echo [2] Invisible (cursor stays in place)
|
||||||
|
echo.
|
||||||
|
set /p CURSOR_CHOICE="Select option (1-2): "
|
||||||
|
|
||||||
|
if "%CURSOR_CHOICE%"=="1" (
|
||||||
|
set CURSOR_MOVE=true
|
||||||
|
set CURSOR_TEXT=Visible movement
|
||||||
|
) else if "%CURSOR_CHOICE%"=="2" (
|
||||||
|
set CURSOR_MOVE=false
|
||||||
|
set CURSOR_TEXT=Invisible
|
||||||
|
) else (
|
||||||
|
echo Invalid selection!
|
||||||
|
timeout /t 2 >nul
|
||||||
|
goto GET_INTERVAL
|
||||||
|
)
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
REM Get duration
|
REM Get duration
|
||||||
echo Duration options:
|
echo Duration options:
|
||||||
@@ -51,6 +71,7 @@ echo ========================================
|
|||||||
echo Configuration:
|
echo Configuration:
|
||||||
echo - Interval: %INTERVAL% seconds
|
echo - Interval: %INTERVAL% seconds
|
||||||
echo - Duration: %DURATION_TEXT%
|
echo - Duration: %DURATION_TEXT%
|
||||||
|
echo - Cursor: %CURSOR_TEXT%
|
||||||
echo - Movement: Random 1-5 pixels
|
echo - Movement: Random 1-5 pixels
|
||||||
echo - Auto-pause when you move the mouse
|
echo - Auto-pause when you move the mouse
|
||||||
echo ========================================
|
echo ========================================
|
||||||
@@ -73,6 +94,9 @@ echo [DllImport^("user32.dll"^)]
|
|||||||
echo public static extern bool GetCursorPos^(out POINT lpPoint^);
|
echo public static extern bool GetCursorPos^(out POINT lpPoint^);
|
||||||
echo.
|
echo.
|
||||||
echo [DllImport^("user32.dll"^)]
|
echo [DllImport^("user32.dll"^)]
|
||||||
|
echo public static extern bool SetCursorPos^(int x, int y^);
|
||||||
|
echo.
|
||||||
|
echo [DllImport^("user32.dll"^)]
|
||||||
echo public static extern uint SendInput^(uint nInputs, INPUT[] pInputs, int cbSize^);
|
echo public static extern uint SendInput^(uint nInputs, INPUT[] pInputs, int cbSize^);
|
||||||
echo.
|
echo.
|
||||||
echo [StructLayout^(LayoutKind.Sequential^)]
|
echo [StructLayout^(LayoutKind.Sequential^)]
|
||||||
@@ -103,6 +127,7 @@ echo "@
|
|||||||
echo.
|
echo.
|
||||||
echo $interval = %INTERVAL%
|
echo $interval = %INTERVAL%
|
||||||
echo $durationMinutes = %DURATION_MINUTES%
|
echo $durationMinutes = %DURATION_MINUTES%
|
||||||
|
echo $cursorMove = $%CURSOR_MOVE%
|
||||||
echo $random = New-Object System.Random
|
echo $random = New-Object System.Random
|
||||||
echo $startTime = Get-Date
|
echo $startTime = Get-Date
|
||||||
echo $moveCount = 0
|
echo $moveCount = 0
|
||||||
@@ -153,6 +178,12 @@ echo $input.mi.dwExtraInfo = [IntPtr]::Zero
|
|||||||
echo.
|
echo.
|
||||||
echo $inputs = @^($input^)
|
echo $inputs = @^($input^)
|
||||||
echo [void][MouseMover]::SendInput^(1, $inputs, [System.Runtime.InteropServices.Marshal]::SizeOf^($input^)^)
|
echo [void][MouseMover]::SendInput^(1, $inputs, [System.Runtime.InteropServices.Marshal]::SizeOf^($input^)^)
|
||||||
|
echo.
|
||||||
|
echo if ^($cursorMove^) {
|
||||||
|
echo $newX = $currentPos.X + $moveX
|
||||||
|
echo $newY = $currentPos.Y + $moveY
|
||||||
|
echo [void][MouseMover]::SetCursorPos^($newX, $newY^)
|
||||||
|
echo }
|
||||||
echo $moveCount++
|
echo $moveCount++
|
||||||
echo.
|
echo.
|
||||||
echo $time = Get-Date -Format 'HH:mm:ss'
|
echo $time = Get-Date -Format 'HH:mm:ss'
|
||||||
|
|||||||
Reference in New Issue
Block a user