Windows 10鼠标/触摸屏事件日志

时间:2019-05-10 14:18:45

标签: windows events operating-system viewer event-viewer

找不到用于鼠标/触摸的Windows 10事件日志。任何指示在触摸始终打开的计算机时进行活动的日志都没有登录屏幕,并且主应用程序始终处于打开状态。类似于自助服务亭。

将使用Zabbix(网络监视)来监视日志文件的活动(修改,或者可能是一些文本解析)。

1 个答案:

答案 0 :(得分:0)

最终为我的需要编写了自己的python脚本。.希望这对其他人有帮助

from ctypes import windll, Structure, c_long, byref
import time

class POINT(Structure):
    _fields_ = [("x", c_long)]

while True:
    #Get x coordinate of cursor
    def queryCursorPosition1():
        pt = POINT()
        windll.user32.GetCursorPos(byref(pt))
        return { "x": pt.x}
    pos1 = queryCursorPosition1()

    #Get x coordinate of cursor a few seconds later
    time.sleep(1)
    def queryCursorPosition2():
        pt = POINT()
        windll.user32.GetCursorPos(byref(pt))
        return { "x": pt.x}
    pos2 = queryCursorPosition2()

    #Print movement 'detected' if x coord do not match past x coord
    if pos1 != pos2:
        print("Movement Detected")
        print(pos1)
        print(pos2)
        print("---")


        f= open("track.txt","w+")
        f.write("X1: %s X2: %s" % (pos1, pos2))