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

Binding keys to events
Author: Message:
splinter98
Junior Member
**


Posts: 19
– / Male / –
Joined: Jun 2007
O.P. Binding keys to events
As part of the script i am currently developing I have an EditControl which when I press enter i can execute a piece of code.

I think I can code everything except how to catch the event in the first place.

The event only needs to be called wise the focus is in the EditControl

After searching through the API and the forums I have found nothing. Can this be done? (I also want the event to be Enter only so no button to do the same thing [keeps the window cleaner]).

Splinter98
06-09-2007 08:41 PM
Profile PM Find Quote Report
Dennis Mike
Junior Member
**

Avatar

Posts: 59
Reputation: 2
34 / Male / –
Joined: Jan 2007
RE: Binding keys to events
use PlusWnd.RegisterMessageNotification(0x100)
06-09-2007 08:48 PM
Profile PM Web Find Quote Report
splinter98
Junior Member
**


Posts: 19
– / Male / –
Joined: Jun 2007
O.P. RE: Binding keys to events
Ahh I knew it was there somewhere

Cheers

Splinter98

Edit: After Finally getting around to play with this, I cant seem to get the OnwindowidEvent_MessageNotification to be called, thus being unable to parse the it to be able to do what i want.

Below is my test Window (completely basic)

code:
    <Window Id="Wndtest" Version="1">
        <DialogTmpl/>
    <Position Width="100" Height="100"/>
    </Window>

And here are my two functions to test it:

code:
function test() {
var PlusWnd = MsgPlus.CreateWnd("OptionsWindow.xml", "Wndtest", 0);
PlusWnd.RegisterMessageNotification(0x100);
}

function OnWndtestEvent_MessageNotification(PlusWnd, nMessage, wParam, lParam) {
Debug.trace("called");
}

i call test and the window displays fine but i can't get the Notification that i have pressed a button (or the Enter key). Again I have searched the forums and MSDN but I just go round in circles and the information isn't stored in one place that is easy to find. (i do knw that the code shld get MessageNotification to be called when a Key is pressed down)

Edit2: Nerver mind have been able to do it using a hidden button

This post was edited on 06-11-2007 at 02:20 PM by splinter98.
06-09-2007 08:51 PM
Profile 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