| View previous topic :: View next topic |
| Author |
Message |
jcalkins
Joined: 27 Nov 2007 Posts: 1
|
Posted: Tue Nov 27, 2007 3:51 pm Post subject: Simple question |
|
|
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 |
|
 |
Ripper
Joined: 24 Oct 2007 Posts: 17 Location: Germany
|
Posted: Tue Nov 27, 2007 3:54 pm Post subject: Re: Simple question |
|
|
| 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 |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 722 Location: Florida
|
Posted: Tue Nov 27, 2007 4:01 pm Post subject: Re: Simple question |
|
|
| 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  _________________ [Join IRC!]
 |
|
| Back to top |
|
 |
Ripper
Joined: 24 Oct 2007 Posts: 17 Location: Germany
|
Posted: Tue Nov 27, 2007 4:10 pm Post subject: |
|
|
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 |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Tue Nov 27, 2007 6:04 pm Post subject: |
|
|
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 |
|
 |
|