I am getting this error when I am trying to make a custom screensaver. It says: (script location) Line: 20 Char: 4 Error: Expected "If" and when I chane it it also says expected end or something else. The idea is to launch a screensaver I have made in a .bat script and it will detect when to launch it. Also, could I also have some help detecting that the mouse isn't moved for the time specified? Anyway, here is what I have done so far:
set service = GetObject ("winmgmts:")
Dim StartTime, EndTime, Elapsed
StartTime = Timer
Elapsed = Timer - StartTime
If Timer > 100000 Then
for each Process in Service.InstancesOf ("Win32_Process")
If Process.Name = "cmd.exe" then
sleep 0
else
createObject("WScript.Shell").Run "screensaver.bat"
StartTime = 0
EndTime = 0
Elapsed = 0
Timer = 0
end
thanks in advance ~ Dan