; ; Author: jgpaiva ; ; Script Function: ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder) ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. #persistent #singleInstance,force timeToReset := 5 gui,add,text,vDisplay h100,%A_NOW%`n gui,-sysmenu +toolwindow +AlwaysOnTop gui,show,w50 h30,%A_SPACE%Usage StartTimer: time := A_NOW settimer,timerchange,500 settimer,timerReset,500 return timerChange: passedTime := A_NOW envsub,passedTime,%time%,Seconds if (mod(passedTime//60,60) = 0 and mod(mod(passedtime,60),60) = 0) gui,show,w50 h30,%A_SPACE%Usage guiControl,text,Display,% passedtime//60//60 . ":" . mod(passedtime//60,60) . ":" . mod(mod(passedtime,60),60) return timerReset: if (A_TimeIdle > timeToReset * 60000) time := A_NOW return GuiClose: exitapp