What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » bring computer off screensaver when msg is received

bring computer off screensaver when msg is received
Author: Message:
ezkim0x
Junior Member
**

Avatar

Posts: 29
– / Male / –
Joined: Jun 2006
O.P. bring computer off screensaver when msg is received
is there a script out there that brings your computer off of the screensaver mode when you receive a message?

when I receive a message on aim, if my screensaver is on it will turn off the screensaver so i can see that I have a new message. I'd like msn to do this as well if possible.

Jon - Just Take This Time And Think
hp / realpics
05-05-2008 08:10 AM
Profile PM Web Find Quote Report
ezkim0x
Junior Member
**

Avatar

Posts: 29
– / Male / –
Joined: Jun 2006
O.P. RE: bring computer off screensaver when msg is received
bump
Jon - Just Take This Time And Think
hp / realpics
06-04-2008 01:57 AM
Profile PM Web Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: bring computer off screensaver when msg is received
Hey ezkim0x!
I dont know if there is such script but you can make your own script with the following lines of code :)
code:
var SPI_SETSCREENSAVEACTIVE    = 0x11;
var SPIF_SENDWININICHANGE    = 2;
var SPIF_UPDATEINIFILE        = 1;
var SPIF_SENDCHANGE        = 2;

function OnEvent_Initialize(MessengerStart){
Interop.Call("user32", "SystemParametersInfoW", SPI_SETSCREENSAVEACTIVE, true, 0, SPIF_SENDWININICHANGE|SPIF_UPDATEINIFILE);
}

function OnEvent_Uninitialize(MessengerExit){
    Interop.Call("user32", "SystemParametersInfoW", SPI_SETSCREENSAVEACTIVE, true, 0, SPIF_SENDWININICHANGE|SPIF_UPDATEINIFILE)
}

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind){
    Interop.Call("user32", "SystemParametersInfoW", SPI_SETSCREENSAVEACTIVE, false, 0, SPIF_SENDWININICHANGE|SPIF_UPDATEINIFILE)
}

* special thanks to Adan for testing this   lol =P
06-05-2008 12:15 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: bring computer off screensaver when msg is received
That code will not work properly as-is.

By setting SETSCREENSAVEACTIVE to false you effectivly turn off the screensaver. It will not turn back on unless you actually moved your mouse or pressed a key. So, if no more messages are recieved your screensaver will not kick in anymore either.

Also, you would be interfearing with the Windows settings of the user, which you do not want to do; you don't need to write the settings to the current user profile to make the new (temporary settings) active.

And you assume that the screensaver is enabled in that code, which will not always be the case either.

So instead, you need to read in the current setting first, then deactivate, then set it back to what it was (so you do not need the (un)initialize functions).

For more information see KB140723 and MSDN library.

;)

------------------------------------

quote:
Originally posted by felipEx
I dont know if there is such script [...]
Not a script, but already requested and answered some time ago:
Help disabling Windows Screensaver

This post was edited on 06-05-2008 at 01:34 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
06-05-2008 12:43 AM
Profile PM Find Quote Report
ezkim0x
Junior Member
**

Avatar

Posts: 29
– / Male / –
Joined: Jun 2006
O.P. RE: bring computer off screensaver when msg is received
hm.. I don't know vb or anything about scripting with msn really. so I really wouldn't know how to use all the code posted in the other thread to work with plus.
Jon - Just Take This Time And Think
hp / realpics
06-05-2008 01:20 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On