Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Strip Screensaver from INI and Launch It

Keywords:    screensaver

Question:

I have a Winbatch that strips the current screen saver from the system.ini and then runs it. For some reason the screensaver option screen always appears. The win95 registry has the /s parm as the open command. If you double click or do a file run on an scr file the screen saver is activated. If I do a run or a runshell with (or without) the /s in winbatch I get the options screen. Any ideas?

Answer:

You need the /s to start the saver.

The below code is the menuitem from the PopMenu menu that blanks the screen. I know it works.

        &Blank Screen Now!
        a=IniReadPvt("Boot","SCRNSAVE.EXE","FLYING~1.SCR","SYSTEM.INI")
        ErrorMode(@OFF)
        LastError()
        run(a,"/s")
        ErrorMode(@CANCEL)
        if LastError() then Display(5,"Sorry","No screen blanker found")

Question:

How do I 'APPLY' screen saver info?

I'm making screensaver delay time changes in the registry. Thes work fine after a reboot, but how do I do the same thing as an "Apply" inside the Screensaver application. Do I need to do a DLLCALL? If so, any insight as to how. I saw the example using the window colors and figure that it's probably very similar. Thanks for any Ideas.

Answer:

Editing the registry directly I assume?

Use the:

	seconds=300 ; 5 minutes
	WinParmSet(7,seconds,3)
method instead.
Article ID:   W13813
Filename:   Change Screensaver.txt