aplonis has asked for the wisdom of the Perl Monks concerning the following question:
I was trying to determine the screensaver timeout via the Win32::API like so...
#!/usr/bin/perl -w use strict; use Win32::API; Win32::API->Import("kernel32", "INT SPI_GETSCREENSAVETIMEOUT()"); my $foo = SPI_GETSCREENSAVETIMEOUT();
...but it's getting me nowhere. I get this error...
Undefined subroutine &main::SPI_GETSCREENSAVETIMEOUT called at ...
...even though a similar coding works for...
Win32::API->Import("kernel32", "int GetCurrentProcessId()"); $PID = GetCurrentProcessId();
I got the parameter from here: msdn.microsoft.com
I'd like to intelligently set the timing on my screensaver defeat script. Possibly I'd like for the script to let the user turn screensaving off for a period via SPI_SETSCREENSAVEACTIVE or some other method.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::API and SPI_GETSCREENSAVETIMEOUT
by Anonymous Monk on Jan 31, 2012 at 14:37 UTC | |
by aplonis (Pilgrim) on Jan 31, 2012 at 16:20 UTC | |
by wwe (Friar) on Feb 01, 2012 at 15:13 UTC | |
by Anonymous Monk on Feb 01, 2012 at 03:01 UTC | |
|
Re: Win32::API and SPI_GETSCREENSAVETIMEOUT
by Corion (Patriarch) on Jan 31, 2012 at 14:36 UTC | |
|