What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [RELEASE] MSN Popup Spy

Pages: (3): « First « 1 2 [ 3 ] Last »
[RELEASE] MSN Popup Spy
Author: Message:
Squelettor
Junior Member
**

Avatar

Posts: 49
Joined: Jul 2006
RE: [RELEASE] MSN Popup Spy
Thanks Felu
02-10-2007 04:51 PM
Profile PM Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
O.P. RE: [RELEASE] MSN Popup Spy
there is another version
please, check this :)

this include fixed bugs  and resizable window  :D

This post was edited on 02-20-2007 at 02:55 PM by felipEx.
02-12-2007 02:00 AM
Profile E-Mail PM Find Quote Report
• MaNiC MoE •
New Member
*

They call me MaNiC cuz I an't StatiC

Posts: 14
31 / Male / –
Joined: Feb 2007
RE: [RELEASE] MSN Popup Spy
thx :)
02-12-2007 12:17 PM
Profile E-Mail PM Web Find Quote Report
sufor
New Member
*

Avatar

Posts: 4
– / Male / –
Joined: Feb 2007
RE: [RELEASE] MSN Popup Spy
good ^^.

it's a great tip for me :p :
if (eval("typeof(" + function_handler + ")") == "function") {
   eval(function_handler + "(PlusWnd);");
}

This post was edited on 02-24-2007 at 12:17 PM by sufor.
02-13-2007 10:24 AM
Profile E-Mail PM Web Find Quote Report
Boo B
Junior Member
**


Posts: 19
Joined: Oct 2006
RE: [RELEASE] MSN Popup Spy
you should be able to choose :
the size of your window
what gets blocked and transfered in window
and what would be handy is
when in full screen (only for people with second screen :))
or just always :p
everything someone says comes there
instance:
(¯`•._.•[Nick]•._... says: qskjdfqsdf
Naomi says: lqkjdfhqf
KeNNy (*) Same Da... says: qlkdfqsdf

don't say you need to make that for me but i just think taht would be handy :D:D

02-13-2007 09:18 PM
Profile E-Mail PM Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
O.P. RE: RE: [RELEASE] MSN Popup Spy
quote:
Originally posted by sufor
good ^^

it's a great tip for me :p :
if (eval("typeof(" + function_handler + ")") == "function") {
   eval(function_handler + "(PlusWnd);");
}


thanks to Choli for them  :P  (i'm felipex at foro.msgpluslive.es)
02-13-2007 09:25 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [RELEASE] MSN Popup Spy
quote:
Originally posted by afelipE_scripts
how to get the text displayed in MP!L Toasts?

lngNotify = Interop.Call("user32","FindWindowW","#32770","");
lngNotify_Static = Interop.Call('User32',"FindWindowExW", lngNotify, 0, 'Static',0);
addNotification(strGettext(lngNotify_Static));
You do know that "#32770" is not an unique class for windows? Many windows in Windows have "#32770" as a class and it by no means uniquely identifies Plus! Toast windows... Aka: do not use that.









And may I very strongly point out that:

1)
quote:
Originally posted by Squelettor
quote:
Originally posted by Felu
Do you have permission for editing this script?
All the script are not in free license ?
No! It isn't because they are open-source that you can copy them and release them again without the permission of the author!



2) Can you all please stop posting variants of this script please!!! If a script needs updating, then contact the author instead.
And as for the author, update the FIRST post in this thread with the new version.

All this because with all these variations and versions of this script it is majorly confussing to forum users what to download. Remember that not everybody will scroll thru entire threads, and even less people will actually read posts to know what has changed or not.

Again, if a script is released there should only be ONE attachment in the entire thread, the one from the first post.

Also, if you are not the original author and you attach a new version of a script to your post for whatever reason, then PLEASE check it out for bugs. It is already bad that people attach new versions at random, let alone that those 'new' versions are actually worse....

So...
- afelipE_scripts: update your first post in this thread with the latest version.
- And to all others: please remove all your attachments.
- afelipE_scripts: before posting a script, test it for (obvious) bugs
- afelipE_scripts and Squelettor: please don't double post. Edit your post instead if you want to add something
- Cookie: stop ranting, although it needs to be done from time to time.

This post was edited on 02-13-2007 at 09:54 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
02-13-2007 09:41 PM
Profile PM Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
O.P. RE: [RELEASE] MSN Popup Spy
and what I can do to fix it? ms spy++ returns those values

I must count the number of controls of the window to make sure that is a mptoast?

sorry for my bad english, i'm learning it. :D

.png File Attachment: ms_spy.png (11.83 KB)
This file has been downloaded 166 time(s).
02-15-2007 08:01 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [RELEASE] MSN Popup Spy
quote:
Originally posted by afelipE_scripts
and what I can do to fix it? ms spy++ returns those values

I must count the number of controls of the window to make sure that is
It is not because spy++ reports it that that is the class name that you can use it to uniquely identify a window.... A class is rarely something "unique"... and class #32770 is even one of the least 'unique' classes as almost every program has such windows since they are generic "dialog window".

eg: even Plus! has more #32770 windows then just toasts. The floating contact windows are also of class #32770 (and also have two or three controls) to only name just one. The event viewer, script debugger, etc are also all #32770 classes. In fact every generic window (even script windows) are of class #32770.

You need to perform additional tests, which certainly do not end by counting the controls as that is again nothing unique. Start by looking only to #32770 windows which are created from the same thread and/or process and importantly check its owner and parent window which should be of class "MessengerPlusLive_ToastPopupParent".

And checking upon that ToastParent class instead of trying to find #32770 class windows is the proper method since that will already give you (by getting its children) all toasts at once without having the extreme overhead of checking each #32770 class window in Windows (because as said, there are extremely many), counting controls or whatever other certainly not unique and slow method....

Because also note that Plus! toasts can have more then just two controls, there are at least two different kind of toasts. For Messenger toasts this is the same, there is more then one kind...

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

Other remarks:

First of all, it is a very nice idea for a script, however:

The script is not polygamy proof...






code:
if (!MessengerStart)    {
    OnEvent_SigninReady(Messenger.MyEmail);
}
This will fail since scripts can be restarted before the user is logged in. Don't check upon MessengerStart, but check upon the user's status:
if (Messenger.MyStatus > 1) OnEvent_SigninReady(Messenger.MyEmail);






code:
function ReadRegistry(key){
     try     {
      var toReturn = new ActiveXObject("WScript.Shell").RegRead(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\" + key);
     }
     catch( e)     {
      var toReturn = 0;
     }
     finally     {
        return(toReturn);
     }
}
===>
code:
function ReadRegistry(key){
        try {
                return Number(new ActiveXObject("WScript.Shell").RegRead(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\" + key));
        } catch( e) {
                // Set here your default value
                return 200
        }
}
Same principle for writeregistry.
And change REG_SZ in the writeregistry function to REG_DWORD.






code:
while (PlusWnd.LstBox_GetCount('lista')>0)         {
        PlusWnd.LstBox_RemoveItem('lista',0);
}
===>
code:
for (var i = PlusWnd.LstBox_GetCount('lista'); i > 0; )
        PlusWnd.LstBox_RemoveItem('lista',--i);
shorter and faster.






code:
function OnEvent_SigninReady(Email){
    try     {
        var firstrun = new ActiveXObject("WScript.Shell").RegRead(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\opacity");
    } catch( e) {
         WriteRegistry("opacity","200");
    }
}
Please do not write stuff to the registry when it is not needed. This is a extremely bad habit.

The only time you should write something to the registry is in this save(PlusWnd) function. Nowhere else.

To read a value from the registry you should need to take in account that it doesn't exist. But if it doesn't exist (try/catch statements) NEVER write to the registry!, instead set your script value to the default value. There is really no need to clog up the registry for that.

As it is now, the SigninReady() function does not need to contain anything at all, since you do not need to check in this function upon existing settings if you aren't going to set it to some global variable.






code:
function strGettext(lngHwnd) {
    var ilngLength = Interop.Call("user32","SendMessageA",lngHwnd,14,0,0);
    var strBuffer = "";
    for (var x=0; x<ilngLength; x++) {
        strBuffer+=" ";
    }
    Interop.Call("user32","SendMessageW",lngHwnd,13,ilngLength+1,strBuffer);
    return(strBuffer);
}
That wont work. Variables in JScript are not passed by reference (they can't recieve values like that). You need to define and use a Plus! DataBlock for that.
===>
code:
function strGettext(lngHwnd) {
        var ilngLength = Interop.Call("user32", "SendMessageW", lngHwnd, /*WM_GETTEXTLENGTH*/ 0x0E, 0, 0);
        var strBuffer = Interop.Allocate(ilngLength * 2 + 2);
        Interop.Call("user32", "SendMessageW", lngHwnd, /*WM_GETTEXT*/ 0x0D, ilngLength+1, strBuffer.DataPtr);
        return strBuffer.ReadString(0);
}






code:
function OnEvent_Initialize(MessengerStart){
    Plus_WndNotification = MsgPlus.CreateWnd("window.xml","WndNotification", 1);
}
You should not display the window when the script (re)starts. It is of no use since if the user isn't logged in yet, he also can't recieve notifications either. The window should be displayed if the user is signed in.
===>
code:
function OnEvent_Initialize(bMessengerStart){
        if (Messenger.MyStatus > 1) OnEvent_SignIn(Messenger.MyMail);
}
function OnEvent_SignIn(sEmail){
        Plus_WndNotification = MsgPlus.CreateWnd("window.xml","WndNotification", 1);
        // It is also here that you should make this polygamy aware
}






code:
var heure = (date.getHours() < 10) ? "0" + date.getHours() + sep : date.getHours() + sep;
===>
code:
var heure = (date.getHours() < 10 ? "0" : "") + date.getHours() + sep;






code:
if (Plus_WndNotification.LstBox_GetCount("lista")>0) {
        Plus_WndNotification.LstBox_SetCurSel("lista", Plus_WndNotification.LstBox_GetCount("lista")-1);
    }
That check is not needed since you will always have an element in your list






code:
function cancel(PlusWnd){
    PlusWnd.visible=false;
}
There is no need to always keep the config window open. This is a bad habit. Close it when the user is done with it and reopen it when requested.
===>
code:
function cancel(PlusWnd){
    PlusWnd.Close(0);
}
same for all equivalent lines for the config window.







code:
if (!Plus_WndConfiguration.visible) {
        Plus_WndConfiguration.visible=true;
}
else                               {
        Plus_WndConfiguration.visible=false;
}
===>
code:
Plus_WndConfiguration.visible = !Plus_WndConfiguration.visible;
But note that you should not use this as I said earlier. The config window should be closed properly. If you don't do that you will have bad behaviour (eg: when the congif window is open, select it again from the menu, you'll see it will be closed (aka hidden in this case) again). Properly close the window instead... In other words, the entire
code:
if (!Plus_WndConfiguration.visible) {
    Plus_WndConfiguration.visible=true;
} else {
    Plus_WndConfiguration.visible=false;
}
should be removed.






code:
function OnEvent_Timer(TimerId){ ... }
The main core of this script, contains a lot of bugs and doesn't work properly






I hope these remarks are of any help....

.-= A 'frrrrrrrituurrr' for Wacky =-.
02-20-2007 02:54 AM
Profile PM Find Quote Report
Pages: (3): « First « 1 2 [ 3 ] Last »
« 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