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 

Simple question

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



Joined: 27 Nov 2007
Posts: 1

PostPosted: Tue Nov 27, 2007 3:51 pm    Post subject: Simple question Reply with quote

How do I create a Autohotkey script that
brings up a web page, waits 10 seconds then presses f5 to refresh, then repeats the 10 second wait and presses f5 again.

Thank you

Jim
Back to top
View user's profile Send private message
Ripper



Joined: 24 Oct 2007
Posts: 17
Location: Germany

PostPosted: Tue Nov 27, 2007 3:54 pm    Post subject: Re: Simple question Reply with quote

jcalkins wrote:
How do I create a Autohotkey script that
brings up a web page, waits 10 seconds then presses f5 to refresh, then repeats the 10 second wait and presses f5 again.

Thank you

Jim


Start with strg+s
stop with ESC
Code:

^s::
stop=0
runwait,www.blubblub.nix
loop
{
send,{F5}
sleep,10000
if stop=1
break
}
return
esc::
stop=1
return
Back to top
View user's profile Send private message
Rhys



Joined: 17 Apr 2007
Posts: 722
Location: Florida

PostPosted: Tue Nov 27, 2007 4:01 pm    Post subject: Re: Simple question Reply with quote

Code:
run, www.website.com ;Website goes here
Loop, ;Loop forever
{   sleep 10000 ;wait 10 seconds
    Send, {F5} ;Press F5
}

Esc::ExitApp ;Quit with ESC key...


This code will fail if your web browser loses focus - For a more reliable script, look into using controlsend to the explicit web browser window instead of send.

Edit - Looks like Ripper beat me to it Razz
_________________
[Join IRC!]
Back to top
View user's profile Send private message
Ripper



Joined: 24 Oct 2007
Posts: 17
Location: Germany

PostPosted: Tue Nov 27, 2007 4:10 pm    Post subject: Reply with quote

For Firefox

Code:

^s::
stop=0
loop
{
ControlSend, ,{F5},ahk_class MozillaUIWindowClass
sleep,10000
if stop=1
break
}
return
esc::
stop=1
return


For the IE



Code:

^s::
stop=0
loop
{
ControlSend, ,{F5},ahk_class IEFrame
sleep,10000
if stop=1
break
}
return
esc::
stop=1
return

Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Tue Nov 27, 2007 6:04 pm    Post subject: Reply with quote

If you have firefox, you can use a plugin to refresh automatically at the interval. I think TabMixPlus is the extension I use that supports it.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
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