What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [help]Message notification

[help]Message notification
Author: Message:
DaAniv
Junior Member
**


Posts: 19
30 / Male / Flag
Joined: Jan 2009
O.P. [help]Message notification
there's a couple of questions how do I know the hex value?
for example I looked at msdn for WM_MOVE and it says it is equal to &H3 what does that mean?.
and also to get HIWORD/LOWORD does
code:
WORD LOWORD(DWORD Value);
or
code:
WORD HiWORD(DWORD Value);
works?
and lastly at the Message Notification event what do I write at the if(Message==?)


This post was edited on 02-06-2009 at 04:14 PM by DaAniv.
02-06-2009 04:13 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]Message notification
&H3 is the Visual Basic way of displaying a hex value. &H3 is the equivalent of 0x3.

To get the hiword and lowords from a number use these

Javascript code:
/*
    Name:   lobyte
    Purpose:    Retrieves the lobyte from a value
    Parameters: w - the value to get the lobyte from
    Return: lobyte of the w parameter
*/

function lobyte(w){ return w & 0xff; }
 
/*
    Name:   hibyte
    Purpose:    Retrieves the hibyte from a value
    Parameters: w - the value to get the hibyte from
    Return: hibyte of the w parameter
*/

function hibyte(w){ return w >> 8; }
 
/*
    Name:   makeword
    Purpose:    Creates a WORD value by concatenating the specified values.
    Parameters: a - Specifies the low-order byte of the new value.
                b - Specifies the high-order byte of the new value.
    Return: The return value is a WORD value.
*/

function makeword(a,b){ return a | (b << 8); }



And for your last question you would do something like this

Javascript code:
function OnWindowEvent_MessageNotification(pPlusWnd, nMessage, wParam, lParam){
    switch(nMessage){
        case WM_MOVE:
            /*
                your code here
            */

    }
}


This post was edited on 02-06-2009 at 06:44 PM by matty.
02-06-2009 05:52 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: [help]Message notification
@matty: The two functions you posted there are for getting the low- and high-order bytes, not the low- and high-order words! A word consists of 2 bytes (16 bits), so you need to alter your functions a bit.
Javascript code:
function loword(n){ return n & 0xffff; }
function hiword(n){ return (n >> 16) & 0xffff; }


This post was edited on 02-06-2009 at 06:23 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
02-06-2009 06:21 PM
Profile E-Mail PM Web Find Quote Report
DaAniv
Junior Member
**


Posts: 19
30 / Male / Flag
Joined: Jan 2009
O.P. RE: [help]Message notification
Thanks sorta figured it out looking at some people scripts but thanks anyway ^^
02-06-2009 06:28 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]Message notification
quote:
Originally posted by Matti
@matty: The two functions you posted there are for getting the low- and high-order bytes, not the low- and high-order words! A word consists of 2 bytes (16 bits), so you need to alter your functions a bit.
Javascript code:
function loword(n){ return n & 0xffff; }
function hiword(n){ return (n >> 16) & 0xffff; }


My bad I just quickly copied it from a previous script; didn't pay attention :P I am working after all :P
02-06-2009 06:43 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