Erkennen von Änderungen in der Mausempfindlichkeit

Ich suche nach einem Programm, das unter Microsoft Windows 7 funktioniert und eine Änderung der Mausempfindlichkeit erkennt und eine Warnung oder ein Protokoll ausgibt.

Antworten (1)

Dies kann einfach über AutoIt erreicht werden, hier ist ein Skript, das ich erstellt habe,

#include <MsgBoxConstants.au3>
#include <FileConstants.au3>
#include <WinAPIFiles.au3>

;Open/Create log.txt file
$file = FileOpen("log.txt", 1)

;Check to see if it could be opened/created ok
If $file = -1 Then
    MsgBox(0, "Error", "Unable to open/create file.")
    Exit
EndIf

Func detectChanges()
    ;Get Mouse position
    $aPos = MouseGetPos();
    $bPos = MouseGetPos();
    ;See if the mouse position has changed (0 and 1 for x and y)
    While $bPos[0] = $aPos[0] Or $bPos[1] = $aPos[1]
        ;Keep getting new mouse position
        $bPos = MouseGetPos();
    WEnd
    ;Return new position
    Return MouseGetPos();
EndFunc   ;==>detectChanges

;Go on forever
While 1
    $position = detectChanges();
    writeToTextFile($position)
    alertBox($position);
WEnd

Func writeToTextFile($position)
    $time = "Sec: " & @SEC & " Min: " & @MIN & " Hour: " & @HOUR & " Day: " & @MDAY & " Month: " & @MON & " Year: " & @YEAR;
    $write = $time & " | X:" & $position[0] & " Y:" & $position[1] & @CRLF;
    FileWrite($file, $write)
EndFunc   ;==>writeToTextFile

Func alertBox($position)
    MsgBox($MB_SYSTEMMODAL, "Alert: Mousemovement", "Mouse x, y: " & $position[0] & ", " & $position[1])
EndFunc   ;==>alertBox

Sie können die kompilierte Version hier herunterladen . Sie können Protokolle und Warnungen ein- und ausschalten, indem Sie die Funktionen auskommentieren (;). Möglicherweise möchten Sie bei jeder Ausführung von detectChanges() eine Art Verzögerung hinzufügen (Sleep(5000) ;<= schläft für 5 Sekunden), da sonst die Protokolldatei ziemlich groß werden könnte. Bei Fragen einfach fragen :)