Jump to content

Easy question


 Share

Recommended Posts

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

Link to comment
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 :)

Link to comment
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
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...