Screensaver parameters

BlitzMax Forums/BlitzMax Programming/Screensaver parameters

GfK(Posted 2006) [#1]
Hello.

Just dabbling with some screensaver code but I can't get the configuration screen working, which, according to everything I've read about it, should open with commandline parameter "/c" or "-c".

If I set the commandline parameter to /c or -c in the IDE, it works. Create a .SCR file and click the 'Settings' button in Screensaver Options, and, nothing.

Ideas?


Yan(Posted 2006) [#2]
"/c", "-c" or ""...
If appargs.length = 1
	AppArgs = AppArgs[..2]
	AppArgs[1] = "/c"
EndIf

Select AppArgs[1].ToLower()[..2]
	Case "/s", "-s"
		Local oldState ' (Win9x only)
		SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, True, oldState, 0) ' (Win9x only)
		If oldstate Then Return ' (Win9x only) untested
						
		DoFullScreen()
				
		SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, False, oldState, 0) ' (Win9x only)
				
	Case "/c", "-c"
		DoConfig()
		
	Case "/a", "-a"
		'Start password verification (Win9x only)
				
	Case "/p", "-p", "/l", "-l"
		DoPreviewWindow()
				
End Select



GfK(Posted 2006) [#3]
Yeah just worked it out - thx for the code sample anyway.

Didn't realise that windows passed "/c:<hwnd>".