Script to press alt+home after 15 minutes of inactivity

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
xerxes2985

Script to press alt+home after 15 minutes of inactivity

16 Aug 2018, 16:45

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
Rohwedder
Posts: 7645
Joined: 04 Jun 2014, 08:33
Location: Germany

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

17 Aug 2018, 02:01

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

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], mikeyww and 292 guests