user5221597
user5221597

Reputation:

Anti-locking method in VB Scripting?

If system locks every 5 minutes, what VB Scripting method is used to avoid system locking every 5 minutes?

Upvotes: 2

Views: 6711

Answers (3)

ManishChristian
ManishChristian

Reputation: 3784

The simplest and easiest way is to open windows media player and run the supplied Wildlife in HD video in repeat mode and then minimize it.
Problem solved, it won't allow the system to get lock automatically. No need for VBS.

Another option is to use small utility called Caffeine. Just download, extract and double click the .exe to run. It will run in background and will do the trick for you.

Upvotes: 0

JGK
JGK

Reputation: 138

Save this file in the format of .vbs Change the Sleep Time 400 based on your requirement.

Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 400
wshshell.sendkeys "{SCROLLLOCK}"
wscript.sleep 400
loop

Upvotes: 5

Thehx
Thehx

Reputation: 58

Perhaps, WScript.SendKeys could help: msdn

Something like double-ScrollLock, I guess?

PS. You'll need to put that in a loop with a sleep, of course.

Upvotes: 1

Related Questions