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

Get help with using AutoHotkey and its commands and hotkeys
xerxes2985

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

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: 1445
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”

Who is online

Users browsing this forum: Albireo, chngrcn and 66 guests