What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Developers heart felt wish!

Pages: (3): « First [ 1 ] 2 3 » Last »
Developers heart felt wish!
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. Developers heart felt wish!
Patchou please we beg of you; implement callbacks into Plus! Scripting.

Why could the following not be possible? (Looking for the technical answer, not just can't do it.)

code:
var objCallbacks = {}
    objCallbacks['EnumWindows'] = MsgPlus.CreateCallback();

Interop.Call('user32', 'EnumWindows', objCallbacks['EnumWindows'], 0);

function OnFunctionCallback(hCallback, lParam1, lParam2, lParam3, lParam4, lParam5, lParam6, lParam7, lParam8, lParam9, lParam10) {
    switch (hCallback) {
        case objCallbacks['EnumWindows'] :
            Debug.Trace(lParam1);
            return objCallbacks['EnumWindows'];
    }
}

This post was edited on 02-05-2008 at 08:54 PM by matty.
02-05-2008 08:52 PM
Profile E-Mail PM Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: Developers heart felt wish!
There could be problems with the parameters, because they are different (both count and size) depending on what callback you're using (or if you create your own). I don't know if it's possible in some way to solve this (well it could work if you pass parameters to the CreateCallback() method of the MsgPlus object).
02-05-2008 09:10 PM
Profile E-Mail PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Developers heart felt wish!
matty, it's just not that simple you see... scripting functions are very different than native function. Please post back and give me a list of function for which you would need a callback, I'll try to work on something.
[Image: signature2.gif]
02-05-2008 10:10 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. RE: Developers heart felt wish!
Well my preference would be all of them because that would make the scripting engine complete as far as Win32 API support.

I still don't understand the technical details as to why this cannot be incorporated.
02-05-2008 11:37 PM
Profile E-Mail PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Developers heart felt wish!
Please give me the one thing I asked you to provide. I only need you to give me a list of functions you plan on using with callbacks so that I can check them out (for things like calling conventions). Thank you.

This post was edited on 02-06-2008 at 08:06 PM by Patchou.
[Image: signature2.gif]
02-06-2008 07:51 PM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Developers heart felt wish!
Aren't most (if not all) callback functions in the form of:
MessageCode, wParam, lParam ??

Making it actually more like:
code:
// instruct Plus! to make a (callback) function internally and let it return its address
var objCallbacks = {}
    objCallbacks['EnumWindows'] = MsgPlus.CreateCallback();

Interop.Call('user32', 'EnumWindows', objCallbacks['EnumWindows'], 0);

function OnFunctionCallback(hCallback, Message(or handle to wnd), wParam, lParam) {
    switch (hCallback) {

Making it almost the same as OnWindowidEvent_MessageNotification???

Using this 'convention'/method you would have covered almost all callbacks... (By heart I only know of only 1 callback function which uses 1 more parameter; WindowProc)

Interpreting what the parameters are (just a number or a pointer to something else) is the responsebility of the scripter, imho, just like with OnWindowidEvent_MessageNotification (?)

/me sits beside Matty on his knees begging :D

This post was edited on 02-06-2008 at 08:47 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
02-06-2008 08:24 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. RE: Developers heart felt wish!
EnumWindows (callback: EnumWindowsProc)
InternetConnectW (callback: InternetSetStatusCallback)
EnumDisplayMonitors (callback: MonitorEnumProc)

Here is 3 off the top of my head.

quote:
Originally posted by CookieRevised
Aren't most (if not all) callback functions in the form of:
MessageCode, wParam, lParam ??

Making it actually more like:
code:
// instruct Plus! to make a (callback) function internally and let it return its address
var objCallbacks = {}
    objCallbacks['EnumWindows'] = MsgPlus.CreateCallback();

Interop.Call('user32', 'EnumWindows', objCallbacks['EnumWindows'], 0);

function OnFunctionCallback(hCallback, Message, wParam, lParam) {
    switch (hCallback) {

Making it almost the same as OnWindowidEvent_MessageNotification???

using this 'convention'/method you would have covered almost all callbacks... (By heart I only know of 1 callback function which uses 1 more parameter; WindowProc)

/me sits beside Matty on his knees begging :D


Using the many params was just to make sure all were covered WndProc who cares about we don't need Plus! scripting to subclass Windows thats just too much access to the system.

This post was edited on 02-06-2008 at 08:37 PM by matty.
02-06-2008 08:33 PM
Profile E-Mail PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: Developers heart felt wish!
http://allapi.mentalis.org/apilist/e.shtml

Anything starting with "Enum" there :P
02-06-2008 08:35 PM
Profile PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Developers heart felt wish!
Alrighty, thanks for the info. You'll have it in 4.51 :).

And to answer your first question: the reason why Plus! doesn't have it yet is that for this kind of thing to work, I need to work on extra calling layers in the software to make it as much transparent as possible for the scripting world. Jsut remember that it's not because something looks easy to use in scripting that it is easy to implement. That's the whole idea :).
[Image: signature2.gif]
02-06-2008 08:50 PM
Profile PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: Developers heart felt wish!
quote:
Originally posted by Patchou
You'll have it in 4.51 :).

:bow: :bow: :bow:
02-06-2008 08:55 PM
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