What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Release] @ScriptDev

Pages: (2): « First « 1 [ 2 ] Last »
[Release] @ScriptDev
Author: Message:
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: [Release] @ScriptDev
the interface tester is included in the documentation (there's a link) -- but I don't think you're supposed to redistribute it...

quote:
Originally posted by Mattike
quote:
Originally posted by deAd
Yes it does use the dll, but actually you can use a hidden plus window along with API calls and PlusWnd.RegisterMessageNotification (new function!) to create your own.
But that would mean that the window is always activate, no? So you can't activate any other windows? ^o)
No, it will be invisible so it can't be activated. Also, the hotkeys would be registered with WM_SETHOTKEY (or something like that :P) or the global RegisterHotKey function, and messages are sent to the window when the hotkeys are pressed.

quote:
Originally posted by phalanxii
I actually have no idea how to implement hotkeys, and the HopperLive script looks really complicated to me so... can anyone teach me? :)
See above and my first post in this thread.

This post was edited on 11-18-2006 at 03:16 PM by deAd.
11-18-2006 03:12 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Release] @ScriptDev
code:
var WM_USER = 0x0400;
var HK_GETKEY = (WM_USER+2);
var HK_SETKEY = (WM_USER+1);

function OnEvent_Initalize(bMessengerStart){
    WndSubclass = MsgPlus.CreateWnd('myWindow.xml', 'myWindow', 2 /* Used to not activate the window */);
    WndSubclass.RegisterMessageNotification(WM_HOTKEY); /* Register the hotkey message */
   
    var lRet = Interop.Call('user32', 'RegisterHotKey', WndSubclass, 0x001, hibyte(dHotKey), lobyte(dHotKey));
}

function OnWndSubclassEvent_MessageNotification(pPlusWnd, nMessage, wParam, lParam){
    switch(nMessage){
        case WM_HOTKEY:
            //Do whatever   
            break;
    }
}

function lobyte(w){ return w & 0xff; }
function hibyte(w){ return w >> 8; }

This is the basics, now when you are setting the hotkey to the HotkeyControl you use HK_SetKey and to get the key you use HK_GetKey along with SendMessageW.

This post was edited on 11-19-2006 at 08:46 PM by matty.
11-19-2006 08:46 PM
Profile E-Mail PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: [Release] @ScriptDev
hey i have a suggestion for you.... would you be able to make a option to go to the script section of the MP!L preferences window??
11-20-2006 08:57 AM
Profile PM Find Quote Report
phalanxii
Full Member
***


Posts: 146
Reputation: 5
31 / Male / Flag
Joined: Aug 2006
Status: Away
O.P. RE: [Release] @ScriptDev
Thanks for all the help, Matty and deAd. I haven't had any experience using functions like Interop.Call or the Windows API, so I'm having trouble getting the hotkey code to work. :S Furthermore, I have exams starting this week, so I don't have any time to work on scripting... :(

If anyone does have time, I would have no problem with if they wanted to take over working on this script.

As for the preferences window, that is (again) something that I have no clue how to do.

Sorry for not being able to do much with this script (I've only been scripting for about 3 months). If you can do any of the suggestions, by all means, feel free to do it! I better get studying now... *-)
11-20-2006 09:44 AM
Profile PM Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
Joined: Jul 2003
RE: [Release] @ScriptDev
quote:
Originally posted by phalanxii
Thanks for all the help, Matty and deAd. I haven't had any experience using functions like Interop.Call or the Windows API, so I'm having trouble getting the hotkey code to work. :S Furthermore, I have exams starting this week, so I don't have any time to work on scripting... :(

If anyone does have time, I would have no problem with if they wanted to take over working on this script.

As for the preferences window, that is (again) something that I have no clue how to do.

Sorry for not being able to do much with this script (I've only been scripting for about 3 months). If you can do any of the suggestions, by all means, feel free to do it! I better get studying now... *-)
You've done a great job so far and its a very useful idea :)  If no-one else does then I will continue to develop this great script, adding more options, such as choosing to show/hide menu items and adding custom values.
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
11-20-2006 09:56 AM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] 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