WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Screensaver

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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. This works 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? You would then need to use IntControl(59, -1, "", 0, 0) which sends a message to one or all application windows, informing them that a change has been made to the registry.

We recommend using:

	seconds = 300 ; 5 minutes
	flags = 3 ;Write new value to appropriate INI file & Broadcast message to all applications informing them of new value
	SysParamInfo(7,seconds,flags)
method instead.
Article ID:   W13813
Filename:   Change Screensaver.txt
File Created: 2004:02:05:09:07:36
Last Updated: 2004:02:05:09:07:36