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

[library] MouseOver
Author: Message:
effection
Full Member
***

Destroy The Runner

Posts: 135
Reputation: 4
– / Male / Flag
Joined: Sep 2006
O.P. [library] MouseOver
Taken from my WLMTunes script, allows you to set up mouse event regions within a window.

Messy code, but it gets the job done ;)

Useage:
1) copy the "mouse.js" file to your script directory.
2) copy in the timer handlers to your OnEvent_Timer as shown in the example  below.
3) register the window that has to be active for the event to be called[if it is null the event will be triggered no matter what the top window is], a mouse event name, rectangular area with window and hover time of the mouse.

code:
//example
function testing(){
        mouse = new MouseEvent();
        var window = 0;
        mouse.registerMouseEvent(window, "HelloWorld",10, 10, 40, 40, 1000);
}
function OnHelloWorldEvent_MouseOver(name, curX, curY){
        Debug.trace("Mouse is in the area! X: "+curX+" Y: "+curY);
}
function OnHelloWorldEvent_MouseOff(name, curX, curY){
        Debug.trace("Mouse has left the area! X: "+curX+" Y: "+curY);
}

function OnEvent_Timer(ID){
        var mouse = new MouseEvent();
        var string = ID.substring(0, ID.indexOf("_"));
        var name = ID.substring(ID.indexOf("_")+1);
        if(string == "mouseEvent"){
                ID = "mouseEvent";
        }
        switch(ID){
                case "mouse_update":
                        mouse.CheckEvents();
                        MsgPlus.AddTimer("mouse_update", 100);
                break;
       
                case "mouseEvent":
                        mouseEvents[name][5] = 2;
                break;
        }
}



.zip File Attachment: mouse.zip (1.75 KB)
This file has been downloaded 102 time(s).

This post was edited on 03-08-2007 at 11:02 PM by effection.
03-08-2007 10:57 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[library] MouseOver - by effection on 03-08-2007 at 10:57 PM


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