[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] windows screen saver in pygame?



On 2003-03-18, Pete Shinners wrote:

> C. Porter Bassett wrote:
> > Is it possible to make a pygame program run as a screen saver in
> > windows?  If it is, how do you do it?
>
> i've never seen anyone get this working, but there has been interest in
> it before. there isn't anything too special about screensavers. they are
> just regular EXE programs that draw do fullscreen drawing.
>
> i believe on windows you just have your program exit when there is any
> mouse or keyboard input. i'm not sure if there are any other sort of
> "special" windows calls you need to deal with or not?
>
I don't think there is anything special [1]_, IIRC I once renamed a
DOS (djgpp) text-mode program (!) to .scr and it worked (under win9x,
I think).

With a trivial program that saves its arguments to some file, you can
easily discover the command-line API - IIRC it's a single "s" letter
for running the saver and no arguments for the setup dialog.

So you can just make a trivial .exe that calls your python script.

.. [1] There is one special thing: the preview of the saver inside the
       dialog.  You progagbly need to do it with GDI calls and I have
       no idea how windows detects you know to preview yourself and
       gives you the context.  In any case it seems completely
       optional.

-- 
Beni Cherniavsky <cben@tx.technion.ac.il>