Sign in to follow this  
Followers 0
lockieday

Easy question

5 posts in this topic

hey,

im new to all this so im probly just gonna make some simple scripts first and build my way up. how would i make a script that just simply refreshes a page by pressing F5 then wait a second or half a second then refreshes again and does that over and over.

thankyou,

your help is muchly appreciated

Share this post


Link to post
Share on other sites



hey,

im new to all this so im probly just gonna make some simple scripts first and build my way up. how would i make a script that just simply refreshes a page by pressing F5 then wait a second or half a second then refreshes again and does that over and over.

thankyou,

your help is muchly appreciated

While 1     ;~ Loops forever
    Send("{F5}")    ;~ Presses "F5"
    Sleep(1000) ;~ Sleeps for 1000ms (1 second)
WEnd            ;~ Loop End

Read more about these functions in the help file :)

Share this post


Link to post
Share on other sites

Well here's how you'd do it even if the window is minimized.

#include <IE.au3>
HotKeySet("{F5}","Refresh")
Global $isRefreshing=True

Global $URL="www.google.com";Insert url here.
Global $timeToRefresh=2000;Instert time to refresh in milliseconds here.

Global $oIE=_IECreate($URL,1)

While 1
    Sleep(100)
WEnd

Func Refresh()
    $isRefreshing=Not $isRefreshing
    While $isRefreshing 
        Sleep($timeToRefresh)
        _IEAction($oIE,"Refresh")
    WEnd
EndFunc

Share this post


Link to post
Share on other sites

While 1     ;~ Loops forever
    Send("{F5}")    ;~ Presses "F5"
    Sleep(1000) ;~ Sleeps for 1000ms (1 second)
WEnd            ;~ Loop End

Read more about these functions in the help file :)

ok thankyou very much, i was just reading the help file for SciTE as i was waiting for somebody as kind as you to help me out :P

cheers, have a good christmas eve/ christmas

Share this post


Link to post
Share on other sites

wow thankyou nahuel, ill be trying it out today. id just like to let you guys know this has been the fatest help ive ever gotten on any forum! 2 thumbs up!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0