【问题标题】:Windows 10 Mouse/Touchscreen event logWindows 10 鼠标/触摸屏事件日志
【发布时间】:2019-09-28 11:27:06
【问题描述】:

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

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

【问题讨论】:

  • 开箱即用不会有这样的事件日志。想象一下事件的数量。您需要编写或找到一个程序,以一种完全符合您需求的智能方式为您记录此类事件。

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


【解决方案1】:

最终为我的需要编写了我自己的 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))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-08
    • 1970-01-01
    • 1970-01-01
    • 2017-01-21
    • 1970-01-01
    相关资源
    最近更新 更多