Code: Select all
#NoTrayIcon
while count<3600
{
MouseGetPos,x1,y1
Sleep,1000
count++
MouseGetPos,x2,y2
If ((x1<>x2) or (y1<>y2)) ;checking to see if the mouse has moved.
{
Sleep,1
}
}
DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0) ;put PC to sleep
[Mod action: Moved topic to v1 section. The main section is for v2.]