ScreenSaver

Blitz3D Forums/Blitz3D Programming/ScreenSaver

WillKoh(Posted 2004) [#1]
I'm about to make a screen saver, which must detect the "/C" or "/S" command line switches that windows gives when you pick the screen saver in the control panel. I made a simple app that just prints CommandLine$ (I have a fully updated Blitz3D installation, Debug turned Off), but nothing shows.


Jeremy Alessi(Posted 2004) [#2]
If Left$(CommandLine$(),2) <> "/s"
End
EndIf

I did something like that if I didn't want it to show unless an actual screen saver state was started. I ended up just ditching that though and just letting it be normal.


WillKoh(Posted 2004) [#3]
But my app won't retrive the CommandLine!! Whether you click the saver in the list, click "settings" or click "example" CommandLine$ is empty! Has this changed with WinXP??


Jeremy Alessi(Posted 2004) [#4]
I'm using WinXP. I just right click on the .scr file (renamed .exe) and click install. Don't know ... I don't have a problem getting the CommandLine$.


Jeremy Alessi(Posted 2004) [#5]
Here's some code someone else posted. Maybe you forgot the parenthesis in CommandLine$(). Without the parenthesis the function won't work.

loadtype$=Left$(CommandLine$(),2)

Select loadtype
	Case "/s"
		screensaver()
	Case "/p"
		;preview, do nothing
		End
	Case "/c"
		Notify "No user preferences available!"
		End
End Select



Grisu(Posted 2004) [#6]
Tutorial:
http://www.blitzcoder.com/cgi-bin/articles/show_article.pl?f=grisu02052004150048.html