Jump to content
YOUR-AD-HERE
HOSTING
TOOLS

Locked [Autoit]


0b3y

Recommended Posts

This code is to do something while the PC hasn´t been used for x time.

 

Example: If in 10 minutes the computer hasn´t been used it will start a process and mine bitcoin

 

[HIDE-THANKS]

[LENGUAJE=autoit]

#include

while 1

Sleep(1000) ;stop the execution 1 second

$idle=_Timer_GetIdleTime()

If $idle>500000 Then ;if the keyboard and the mouse haven´t been used in 5 minutes then do this

; STUFF TO DO

Do

Sleep(1000) ; loop until the computer is used again

$idle2=_Timer_GetIdleTime()

Until $idle2<$idle

;Thing to do when Pc is been used

EndIf

WEnd

[/LENGUAJE]

[/HIDE-THANKS]

Edited by 0b3y
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.