| View previous topic :: View next topic |
| Author |
Message |
gigaenvy
Joined: 30 Jun 2004 Posts: 2
|
Posted: Wed Jun 30, 2004 6:22 pm Post subject: IE 6 home page reloader |
|
|
Hi folks...Had some success using AHK and IE kiosk mode, but now I'm running into a problem getting a script to work when a web page is idle. I would like a user to have a 500 second limit before the script reloads the home page. However, if the user is within the 500 second countdown and moves to a new link, the AHK timer resets. Actually, it should reset every time any mouse activity or keyboard activity are present.
Any clues?
Thanks Team! |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10464
|
Posted: Wed Jun 30, 2004 7:12 pm Post subject: |
|
|
If you're using XP/2k/NT, the perfect solution for that seems to be the built-in variable A_TimeIdle: http://www.autohotkey.com/docs/Variables.htm#TimeIdle
A_TimeIdlePhysical is even better in most cases (requires hook(s)).
| Code: | ;Create a timer in the auto-execute section:
SetTimer, WatchIdleTime, 1000
#InstallMouseHook ; Need at least one hook for A_TimeIdlePhysical
return
WatchIdleTime:
IfWinExist, My Home Page - Microsoft Internet, , return ; Already at home page.
if A_TimeIdlePhysical < 500000 ; 500 seconds, so still okay.
return
; Otherwise, reload home page:
WinActivate, ...
Send, !dhttp://homepage.org{enter}
return |
|
|
| Back to top |
|
 |
gigaenvy
Joined: 30 Jun 2004 Posts: 2
|
Posted: Wed Jun 30, 2004 7:24 pm Post subject: Thanks...That was quick. |
|
|
Chris,
I'll integrate, modify, and report back the snippet within my code about my success.
Thanks again! |
|
| Back to top |
|
 |
Pallie
Joined: 05 Jul 2004 Posts: 57 Location: London
|
Posted: Mon Jul 12, 2004 8:45 pm Post subject: |
|
|
I was impressed by the !d shortcut to go to the address box in IE so I went to see what other shortcuts there are and there is one for going to the home page - ALT+HOME. So the penultimate line of the could be changed from
Send, !dhttp://homepage.org{enter}
to
Send, !{home}
then you would not need to hardcode the homepage
Mike |
|
| Back to top |
|
 |
|