Script to press alt+home after 15 minutes of inactivity

Get help with using AutoHotkey 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] [Download] (Untitled.ahk)GeSHi © Codebox Plus

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

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


Thanks
Rohwedder
Posts: 1292
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] [Download] GeSHi © Codebox Plus

#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: just me, romeo and 20 guests