카테고리 없음

Autohotkey GetLastInputInfo 호출 (마지막 입력시간 확인)

behonestar 2018. 2. 19. 17:09

Loop

{

ms := GetNoInputPeriod()

TrayTip, NoInput, %ms%ms

Sleep, 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

}