How do you get a VB script to work when the screen saver (with password
protect) is on? I have a script that will work (to do a disk defrag) when
run from the desktop, but when I put it in the scheduler and it runs with
the screen saver on, it runs it to the point when it should choose some Send
Keys command. At that point it appears that the window that is supposed to
be chosen is not selected and the script hangs. Anyone with any ideas?
Brian

Re: Script to run when screen saver is on (w2kpro) by Torgeir

Torgeir
Fri Feb 06 14:02:54 CST 2004

Brian White wrote:

> How do you get a VB script to work when the screen saver (with password
> protect) is on? I have a script that will work (to do a disk defrag) when
> run from the desktop, but when I put it in the scheduler and it runs with
> the screen saver on, it runs it to the point when it should choose some Send
> Keys command. At that point it appears that the window that is supposed to
> be chosen is not selected and the script hangs. Anyone with any ideas?

Hi

You can't use Sendkeys when the screen saver is running, no workarounds exists.

Instead, see if this one helps you out:

AutoDeFrag is a free command line based wrapper of the Win2k defrag command

http://www.webattack.com/get/autodefrag.shtml
http://www.morphasys.com/autodefrag/




--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter



Re: Script to run when screen saver is on (w2kpro) by john6666

john6666
Fri Feb 06 16:31:03 CST 2004

"Brian White" <bmkwhite@iximd.com> wrote in message news:<1027scn1dej1i46@corp.supernews.com>...
> How do you get a VB script to work when the screen saver (with password
> protect) is on? I have a script that will work (to do a disk defrag) when
> run from the desktop, but when I put it in the scheduler and it runs with
> the screen saver on, it runs it to the point when it should choose some Send
> Keys command. At that point it appears that the window that is supposed to
> be chosen is not selected and the script hangs. Anyone with any ideas?
> Brian

Sounds to me like the screen saver is the active window.......

Sending keys is not the same as reading the keyboard buffer??

Maybe fires a different event??