holli has asked for the wisdom of the Perl Monks concerning the following question:

honoured monks,
i have written a little application that displays perl-code in a "ticker-style", executes it and then displays the output.
the target is to create a perl-obfu-screensaver. just i donīt know how i can get windows to run a perl-script as a screensaver without writing a wrapper (.scr-file).

any suggestions?

p.s.
when finished i will post code here, naturally.

holli

Replies are listed 'Best First'.
Re: perl script as screen saver
by ambrus (Abbot) on Jan 05, 2005 at 20:14 UTC

    Then why don't you write a wrapper .scr file? AFAIK .scr files are simple windows executables named like that.

      While .SCR files are indeed just .EXE files with a funny name, they must not implement a normal Windows event loop. Instead, they must use certain Windows APIs to just handle certain screensaver-related messages, and the real event loop is inside Windows. Screen savers act more like .DLLs filled with callbacks, than executable applications which form a whole event loop.

      Unfortunately, this also implies certain limitations when using other Windows constructs, and may make it hard to embed a Perl interpreter. I'm not saying it can't be done, I am saying that I expect there would be some interesting learning required to make it work 95% of the time...

      --
      [ e d @ h a l l e y . c c ]

Re: perl script as screen saver
by zentara (Cardinal) on Jan 06, 2005 at 12:54 UTC
    Get the Tk::LockDisplay module.

    I'm not really a human, but I play one on earth. flash japh