in reply to Keep the playback rolling (Win32)
You can disable the screensaver for the duration of a program using this. Supply the normal command line for the app as the arguments to this. To test it, set your screensaver timeout to 1 minute and run a command like:
noss perl -le"sleep(1), print for 1 .. 61"
noss.pl:
#! perl -slw use strict; use Win32::API::Prototype; ApiLink( 'user32', q[ BOOL SystemParametersInfo( UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni ) ] ) or die $^E; SystemParametersInfo( 0x0011, 0, 0, 0 ) or die $^E; ## SS off system @ARGV; SystemParametersInfo( 0x0011, 1, 0, 0 ) or die $^E; ## SS on
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Keep the playback rolling (Win32)
by tye (Sage) on Feb 20, 2009 at 16:02 UTC |