按键精灵检测鼠标键盘有无操作

运行环境:分辨率:1366×768 色深:32位 操作系统:Windows 7 Ultimate 按键精灵版本:9.50.11632

Dim Time0,Time, Key, Mouse,Point,Mx0,My0,Mx,My  
UserVar Utime=12 "自定义持续时间/秒"  
  
Time0 = Plugin.Sys.GetTime()  
  
  
GetCursorPos Mx0,My0  
TracePrint Mx0&","&My0  
  
Do  
  
Key = 0  
Mouse = 0  
Point = 0  
  
//最后按键  
Key =Int(GetLastKey())  
  
//最后鼠标点击  
Mouse =Int(GetLastClick())  
  
//最后鼠标位置  
GetCursorPos Mx, My  
If Mx = Mx0 and My = My0 Then   
Else   
    Point = 1  
    Mx0 = Mx :My0 = My  
End If  
  
  
Delay 1000  
If key = 0 and Mouse = 0 and Point=0 Then   
    //没有任何操作  
Else   
    //有操作  
    TracePrint key  
    TracePrint Mouse  
    TracePrint Point  
    Time0=Plugin.Sys.GetTime()  
End If  
  
Time = Plugin.Sys.GetTime()  
If (Time-Time0)/1000 >= clng(Utime)Then  
    MessageBox Utime&"秒没有任何操作!"  
End If  
  
Loop
相关文件下载地址
©下载资源版权归作者所有;本站所有资源均来源于网络,仅供学习使用,请支持正版!

按键精灵检测鼠标键盘有无操作》有0个想法

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注