Loop{ms := GetNoInputPeriod()TrayTip, NoInput, %ms%msSleep, 1000} GetNoInputPeriod(){VarSetCapacity(lastInputInfo, 8)NumPut(8, lastInputInfo, 0, "UInt")DllCall("GetLastInputInfo", "Ptr", &lastInputInfo)cbSize := NumGet(lastInputInfo, 0, "UInt")dwTime := NumGet(lastInputInfo, 4, "UInt")return A_TickCount - dwTime}