Page 1 of 1

Script to press alt+home after 15 minutes of inactivity  Topic is solved

Posted: 16 Aug 2018, 16:45
by xerxes2985
Found this code on an archived forum post... I'm not sure how long the timer really is or really exactly if its doing what I want.

Basically, I want a script to run that'll press alt+home to return internet explorer to the homepage if there is 15 minutes of inactivity from the mouse or keyboard.

Code: Select all

#Persistent
SetTimer, Check, 1000         ;check every second
return

Check:
If (A_TimeIdle>=60000)
     Send !{Home}
return
Thanks

Re: Script to press alt+home after 15 minutes of inactivity

Posted: 17 Aug 2018, 02:01
by Rohwedder
Hallo,
Try:

Code: Select all

#Persistent
SetTimer, Check, 1000    ;check every second
return

Check:
If (A_TimeIdle<60000*15) ;15 minutes of inactivity
	Return
WinActivate, ahk_exe iexplore.exe
Send !{Home}
return