Keep-alive and chrome refresh scripts

Keep-alive is a VBScript file as follows:

Set WshShell = WScript.Createobject(“WScript.Shell”)
do while a < 30000
a = a + 1
WScript.Sleep 595000
WshShell.SendKeys “{F15}”
Loop

Chrome refresh is a powershell script wrapped around a bat file:

bat file;

cd H:
psa chrome_loop.ps1

Powershell script;

while(1) { # Loop forever
sleep -Seconds 899 # Wait 15 minutes
$wshell = New-Object -ComObject wscript.shell
if($wshell.AppActivate(‘Chrome’)) { # Switch to Chrome
Sleep 1 # Wait for Chrome to “activate”
$wshell.SendKeys(‘{F5}’) # Send F5 (Refresh)
} else { break; } # Chrome not open, exit the loop
}