What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » ChatWndEditKeyDown... HELP...

ChatWndEditKeyDown... HELP...
Author: Message:
uggi
New Member
*


Posts: 11
37 / Male / –
Joined: Jul 2006
O.P. ChatWndEditKeyDown... HELP...
I'm new to MSN !Plus !Live scripting and i want to make my own plug-in, i have read det "fine/fucking" manual and i have made some functions now, but not all of dem are working...

I also have some other functions like the "Personal Message Chat" plug-in, but when people writes "!popup <and a message>" it just shows it in a popup...

BUT now i want's to make some short cuts with the ChatWndEditKeyDown Event...

If i read in the "manual":

quote:
The OnEvent_ChatWndEditKeyDown event is fired every time a key is pressed in the typing area of a chat window. It can be used to filter out some keys and use them as shortcuts for a feature of the script.


I get that... and i know that you need to have a [object] ChatWnd and a [number] KeyCode... i also know that the KeyCode for ABC is.. (41, 42  and 43) but i cant get the scripts working...

quote:
//
//    This code run then you type something in the typing area..
//
function OnEvent_ChatWndEditKeyDown(ChatWnd,KeyCode)
{
    var Key = KeyCode;
        //
        //     If you press 0 in the typing area...
        //
    if(Key == 30) {
        ChatWnd.SendMessage("/ctcinfo");
    }
}


this script open the profile for a contact if you press the key "0"... hmm not...

I know that this code DON`T WORK... but i donīt know why...

So, can anyone please help me to understand the function... ( i'm sorry for the bad english.. )
07-31-2006 03:15 PM
Profile E-Mail PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: ChatWndEditKeyDown... HELP...
The keycodes you quoted are hexadecimal. In decimal, they're 65, 66, 67 etc. Also, they're for capital letters. Lowercase letters have codes starting from 97.

Edit: Also, '0' = 48, '1' = 49 etc.

Edit 2: http://www.lookuptables.com/

This post was edited on 07-31-2006 at 04:04 PM by RaceProUK.
[Image: spartaafk.png]
07-31-2006 04:01 PM
Profile PM Web Find Quote Report
uggi
New Member
*


Posts: 11
37 / Male / –
Joined: Jul 2006
O.P. RE: ChatWndEditKeyDown... HELP...
If you read this..

Link

You can see that the A is (41) and so on.. i donīt know anything about that the 41 i hex or not...
07-31-2006 04:06 PM
Profile E-Mail PM Web Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: ChatWndEditKeyDown... HELP...
http://www.ryancooper.com/resources/keycode.asp
Always worked for me. :P

This post was edited on 07-31-2006 at 04:22 PM by deAd.
07-31-2006 04:21 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: ChatWndEditKeyDown... HELP...
code:
//
// This code run then you type something in the typing area..
//
function OnEvent_ChatWndEditKeyDown(ChatWnd,KeyCode) {
    var VK_O = 0x4F;
    Debug.Trace('KeyCode : '+KeyCode);
    if(KeyCode == VK_O) {
        ChatWnd.SendMessage('/ctcinfo');
    }
}
07-31-2006 04:25 PM
Profile E-Mail PM Find Quote Report
uggi
New Member
*


Posts: 11
37 / Male / –
Joined: Jul 2006
O.P. RE: ChatWndEditKeyDown... HELP...
Thanks to all of you.. :D
07-31-2006 04:35 PM
Profile E-Mail PM Web Find Quote Report
uggi
New Member
*


Posts: 11
37 / Male / –
Joined: Jul 2006
O.P. RE: ChatWndEditKeyDown... HELP...
quote:
Originally posted by Matty
code:
//
// This code run then you type something in the typing area..
//
function OnEvent_ChatWndEditKeyDown(ChatWnd,KeyCode) {
    var VK_O = 0x4F;
    Debug.Trace('KeyCode : '+KeyCode);
    if(KeyCode == VK_O) {
        ChatWnd.SendMessage('/ctcinfo');
    }
}


I need to know.. how can i use words like "!profile" or "!info" in this script ?
Do i need to make a var for every 0x!! ?? or how can i make it ??

This post was edited on 07-31-2006 at 05:18 PM by uggi.
07-31-2006 05:12 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: ChatWndEditKeyDown... HELP...
quote:
Originally posted by uggi
quote:
Originally posted by Matty
code:
//
// This code run then you type something in the typing area..
//
function OnEvent_ChatWndEditKeyDown(ChatWnd,KeyCode) {
    var VK_O = 0x4F;
    Debug.Trace('KeyCode : '+KeyCode);
    if(KeyCode == VK_O) {
        ChatWnd.SendMessage('/ctcinfo');
    }
}


I need to know.. how can i use words like "!profile" or "!info" in this script ?
Do i need to make a var for every 0x!! ?? or how can i make it ??
Use this either of these functions:

[string] OnEvent_ChatWndReceiveMessage(
    [object] ChatWnd,
    [string] Origin,
    [string] Message,
    [enum] MessageKind
);
[string] OnEvent_ChatWndSendMessage(
    [object] ChatWnd,
    [string] Message
);
07-31-2006 06:07 PM
Profile E-Mail PM Find Quote Report
uggi
New Member
*


Posts: 11
37 / Male / –
Joined: Jul 2006
O.P. RE: ChatWndEditKeyDown... HELP...
thanks
07-31-2006 06:31 PM
Profile E-Mail 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