检测用户活动 [英] Detecting User Activity

查看:87
本文介绍了检测用户活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个程序,它监视计算机的活动。如鼠标移动,点击鼠标或键盘输入。我并不需要记录发生了什么事只是计算机正在使用中。如果他们的电脑有没有被使用的一段时间,也就是15分钟,我要火了一个事件。

I need to create a program that monitors a computer for activity. Such as a mouse move, mouse click or keyboard input. I don't need to record what has happened just that the computer is in use. If their computer has not been in use for a certain period of time, i.e. 15 mins, I need to fire off an event.

有没有一种方式,我可以得到这些事件的通知?

Is there a way that I can get notified of these events?

推荐答案

检查的这篇文章它可以对计算机的空闲时间,然后你会解雇你的上的任意条件的事件。

Check this article which can get the idle time of the computer, and then you would fire your event on an arbitrary condition.

伪代码:

If Computer_is_Idle > 15 minutes Then
    Do this
Else
    Do that or Wait more...

注意:的文章中可用的源代码

Note: Source code available within the article.

这篇关于检测用户活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆