Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Keep the playback rolling (Win32)

by BrowserUk (Patriarch)
on Feb 20, 2009 at 11:58 UTC ( [id://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"

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

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-18 20:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found