AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IE 6 home page reloader

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
gigaenvy



Joined: 30 Jun 2004
Posts: 2

PostPosted: Wed Jun 30, 2004 6:22 pm    Post subject: IE 6 home page reloader Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10464

PostPosted: Wed Jun 30, 2004 7:12 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
gigaenvy



Joined: 30 Jun 2004
Posts: 2

PostPosted: Wed Jun 30, 2004 7:24 pm    Post subject: Thanks...That was quick. Reply with quote

Chris,

I'll integrate, modify, and report back the snippet within my code about my success.

Thanks again!
Back to top
View user's profile Send private message
Pallie



Joined: 05 Jul 2004
Posts: 57
Location: London

PostPosted: Mon Jul 12, 2004 8:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group