Re: screen saver -- how to trip, trigger or kill

2002-08-26 Thread Michael D. Smith


Many of the MS Windows screen savers have an option to specify a corner of 
the screen that you can leave the mouse pointer in, and the screen saver 
will never come on. Click the "settings" button, "General" tab.

I just tried it on mine. Doesn't seem to work. Wonderful, advise that 
doesn't work. Of course, it "should" work, and it may on your machine. I 
use a trackball instead of a mouse, that may be causing the trouble here.

If it doesn't work for you, or you aren't using one of those screen savers, 
you can send any keyboard input that you like to the screen like so:

 use Win32::OLE;
 $WshShell = new Win32::OLE 'WScript.Shell'  || die "No new shell 
object $! $?";
 $WshShell->SendKeys(' ');  # a space seems safest for this use

Which will turn off a screen saver, and it looks simple enough but there is 
no doubt considerable overhead in those three lines. Maybe? to much just to 
keep a screen saver off, and it's possible that even a space, if the wrong 
window had focus at the time, could cause trouble. Enter (\n) would be most 
dangerous. I thought maybe the backspace key might be safest (and it does 
turn off a screen saver, I tried it) but I don't know how to code that to 
sendkeys.

There must be a better way. Next :)

ms


At 02:22 PM 8/26/02, you wrote:
>I need a Perl sub to trigger the screen saver on Win32.
>I don't need to kill the screen saver, or turn it off,
>or mess with the Registry. I only want it to work as if
>the mouse were moved, or a key were pressed, so that
>the screen saver goes away for its regular interval.
>
>REASON: Have a MySQL DB & a Perl script which querries
>it ever 2 minutes for new entry. When it sees a new
>entry, Perl calls up MSIE on Win95 to display said
>new entry. But alas, all is wasted if the screen saver
>is hiding it.
>
>Thanks,
>
>Gan Starling
>Kalamazoo MI
>
>
>___
>Perl-Win32-Users mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: screen saver -- how to trip, trigger or kill

2002-08-26 Thread Johan Lindstrom

At 15:22 2002-08-26 -0400, Gan Uesli Starling wrote:
>REASON: Have a MySQL DB & a Perl script which querries
>it ever 2 minutes for new entry. When it sees a new
>entry, Perl calls up MSIE on Win95 to display said
>new entry. But alas, all is wasted if the screen saver
>is hiding it.

Outside of the box we find ScreenSaver Blocker:
http://sac-ftp.externet.hu/utiltask6.html

While that may actually solve your problem, this may be interesting:

Usenet post asking the same thing



MS KB-article mentioned in the post
HOWTO: How to Disable the Screen Saver Programmatically
http://support.microsoft.com/support/kb/articles/Q126/6/27.asp


This is how I found it:



/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: "Salon.com Technology  I come to bury IAmCarbona..."

dmoz (1 of 13): /Computers/Internet/On_the_Web/Weblogs/Tools


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



screen saver -- how to trip, trigger or kill

2002-08-26 Thread Gan Uesli Starling

I need a Perl sub to trigger the screen saver on Win32.
I don't need to kill the screen saver, or turn it off,
or mess with the Registry. I only want it to work as if
the mouse were moved, or a key were pressed, so that
the screen saver goes away for its regular interval.

REASON: Have a MySQL DB & a Perl script which querries
it ever 2 minutes for new entry. When it sees a new
entry, Perl calls up MSIE on Win95 to display said
new entry. But alas, all is wasted if the screen saver
is hiding it.

Thanks,  

Gan Starling
Kalamazoo MI


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs