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