What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [ Help ] Alpha making window invisible

[ Help ] Alpha making window invisible
Author: Message:
GentleSoul
New Member
*

<3

Posts: 5
Joined: Mar 2010
O.P. [ Help ] Alpha making window invisible
Hey guys! im trying to make a prank where my friend installs the script and i can make his window invisible by typing [alpha]1

I found this

code:
// TRANSPARANT

function Huhu_wndAlpha(alph){
    var allwnd = Messenger.CurrentChats;                // Get opened chat window
    var e = new Enumerator(allwnd);
    for(; !e.atEnd(); e.moveNext()){
        var cwnd = e.item();
        if(alph!=0)Huhu_alpha(cwnd.Handle, alph);
        else Huhu_alpha(cwnd.Handle, Math.round(Math.random()*255));
    }
}

function Huhu_alpha(hWnd, alph){
    var Msg;
    var nMsg = Interop.Allocate(4);
    var GWL_STYLE = (-20);
    var LWA_ALPHA = 0x2;
    var WS_EX_LAYERED = 0x80000;
    var WS_EX_TRANSPARENT = 0x20;
    if(alph>255)alph=255;
    Msg = Interop.Call('user32', 'GetWindowLongW', hWnd, GWL_STYLE);
    nMsg.WriteDWORD(0, (Msg | WS_EX_LAYERED));
    Interop.Call('user32', 'SetWindowLongW', hWnd, GWL_STYLE, nMsg.ReadDWORD(0));
    Interop.Call('user32', 'SetLayeredWindowAttributes', hWnd, 0, alph, LWA_ALPHA);
}


and i tried

code:
function Huhu_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
    if(Origin!=Messenger.MyName){                    // If the receive message isn't send by you
        if(Message.indexOf("[alpha]")!=-1){            // Apply alpha filter
            var tmp = (Message, "[alpha]");    // Get text after the command
            if(tmp=="")Huhu_wndAlpha(0);
            else Huhu_wndAlpha(parseInt(tmp));
            return '' // hide the command
        }
     }
     
}

so id type [alpha]1 to make it invisible

any idea where im going wrong

thanks

This post was edited on 11-02-2010 at 03:43 PM by GentleSoul.
11-02-2010 03:25 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [ Help ] Alpha making window invisible
Not that we condone this type of prank but there are a few things you can do. Firstly using transparency to hide the window is ok but you can use ShowWindow instead.

Firstly the function Huhu_ChatWndReceiveMessage doesn't appear to be called anywhere (unless there is parts of your script missing).

Secondly this line
Javascript code:
var tmp = (Message, "[alpha]");  

will not do what you are expecting it to do. I presume you are wanting to split the string or replace the script or something...
11-02-2010 05:51 PM
Profile E-Mail PM Find Quote Report
GentleSoul
New Member
*

<3

Posts: 5
Joined: Mar 2010
O.P. RE: [ Help ] Alpha making window invisible
I'm sorry im new to scripting i just read abit of the doc

I'm trying to make it when i type the command [alpha]1 it will make his chat window invisible until i type [alpha]255

would it be possible for you to have a go at trying to do it please?

greatly appreciated
11-02-2010 06:26 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [ Help ] Alpha making window invisible
What you are asking for is really easy to achieve. However on the forum we tend not to promote scripts that are more of an irritation then anything.
11-02-2010 07:03 PM
Profile E-Mail PM 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