Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Keep the playback rolling (Win32)

by BrowserUk (Pope)
on Feb 20, 2009 at 11:58 UTC ( #745341=note: print w/replies, xml ) Need Help??

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"

#! 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

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Keep the playback rolling (Win32)
by tye (Sage) on Feb 20, 2009 at 16:02 UTC

    I would guess that this is along the lines of what Windows Media Player does to disable the screen-saver and so it seems likely to not work for peons trying to disable administratively mandated screen-saver timeouts. But that is just a guess.

    - tye        

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://745341]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2020-08-05 10:37 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (35 votes). Check out past polls.