In Win32, Screen Saver programs are not actually processes, and must have a window message loop (but not a *normal* window message loop, that would be too simple). It's not possible to use a console app as a screen saver, and it's often very hard to retrofit a regular Win32 windowing app to support the strange limitations that face screen savers.
Separately, you then lose the ability to run a user-specified screen saver.
Much more likely, you want your idle perl task to determine the "system load" in some other way, and start your work only when the system load is low for a suitable amount of time.
-- [ e d @ h a l l e y . c c ]
| [reply] |
Not quiet, the use can have tasks running, like trackers (e-Mule, torrents, etc), or an installation of some big program that takes a lot of time, or any other long task that requires respective CPU usage. Which means that i need to get from the system in some way information that no key was pressed and the mouse wasn't moved for a "suitable" amount of time.
Like when ICQ drops to Away mode after a while that the PC wasn't touched.
| [reply] |
1. I don't understand how to use Win32::API for this purpose.
2. Can i register myself as a screensaver via perl ? | [reply] |