Vaibhav Singh

Blog - vaibhavsingh.com

VBScript to press a key at regular intervals

This script presses F13 key every 5 minutes in loop.

'save as keypress.vbs and double click the file

set wsc = CreateObject("WScript.Shell")
Do
    'Five minutes
    WScript.Sleep(10*60*900)
    wsc.SendKeys("{F13}")
Loop

This may come handy to keep a remote system, that you’ve RDP’d into, from sleeping.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top