Jump to content
Sign in to follow this  
aiwnjoo

AI Refresh Tool (Mouse Click or F5) ???

Recommended Posts

aiwnjoo

Hi guys, im new to auto-it and was wondering if there are any snipper or examples of such a tool that will automate the {F5} keystroke on a certain interval to avoid my work computer locking after 5 minutes (I.T. won't change this but will allow such a tool on my Home Drive) alternatively something that clicks every interval.

I tried in batch with ping and {F5} but did not work that well and the I.T. department was not happy about it as its more hackish.

Thanks guys,

Share this post


Link to post
Share on other sites
hawky358

This will press F5 every 5 mins (You can change the mins to anything from 2 to 60 mins - Don't use 1 min, this program wont work like that)

$mins = 5 ;press every 5 mins
$pressed = 0



while 1
    sleep(100)
    $nowmin = @MIN
    if $nowmin = 0 then $nowmin = 60
    
    if mod($nowmin,$mins) = 0 and $pressed = 0 Then
        Send("{F5}")
        $pressed = 1
    Elseif mod($nowmin,$mins) <> 0 and $pressed = 1 then
        $pressed = 0
    EndIf
    
wend

Share this post


Link to post
Share on other sites
somdcomputerguy

Timer code to modify as needed: Autoit Wrappers - AutoIt Forums - Page 7

Action can be with Send.

To loop it shouldn't be to hard to figure out.. Language Reference - Loops Statements, ask if you have troubles.

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.