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

AppMon
Author: Message:
Mindstorms
New Member
*


Posts: 9
– / Male / Flag
Joined: May 2008
O.P. AppMon
Hello,

I've modified the "AppMon" script, but I don't understand why there's a Wordobject, I know what it does (make a list of processes), but not why Word is used. It takes a lot from my computer, so is there a way to do it on a different way?

code:
var monitorTime = 1000;
var prename = false;
var premsg = false;
var prestat = 0;
try{
    var objWord = new ActiveXObject('Word.Application');
}catch(e){
    objWord = new Object;
    objWord.Tasks = function(){
        var Exists = function(){
            return false;
        }
    }
    objWord.Fake = true;
}

var MsgStatus = ["Don't Change", "Offline", "Appear Offline", "Online", "Busy", "Be Right Back", "Idle", "Away", "In A Call", "Out to Lunch"];

function OnEvent_Initialize(MessengerStart){
    MsgPlus.AddTimer ("app_monitor", monitorTime);
}
function OnEvent_Uninitialize(MessengerExit){
    objWord.Quit();
}

function OnEvent_Timer(TimerId){
    if (TimerId == 'app_monitor'){
        var colTasks = objWord.Tasks;

            if(colTasks.Exists("Microsoft Visual Basic 2008 Express Edition")){
                var name = colTasks("Microsoft Visual Basic 2008 Express Edition").Name;
                if (name != prename){
                    var RE = new RegExp("^(.+)\ - Microsoft Visual Basic 2008 Express Edition$",'i');

                    if (!prename){
                        premsg = Messenger.MyPersonalMessage;
                    }
                    Messenger.MyPersonalMessage = name.replace(RE, "Op dit moment ben ik programmerende met '$1' (Realtime gegevens)");

                    prename = name;

                }
            }  else {
                Messenger.MyPersonalMessage = "Op dit moment ben ik niet aan het programmeren (Realtime gegevens)";
                }
        }
        MsgPlus.AddTimer ("app_monitor", monitorTime);
    }
Kind regards,
Thomas
05-30-2008 06:29 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
AppMon - by Mindstorms on 05-30-2008 at 06:29 PM
RE: AppMon - by Mindstorms on 06-01-2008 at 11:40 AM
RE: AppMon - by aNILEator on 06-01-2008 at 03:00 PM
RE: AppMon - by Mindstorms on 06-01-2008 at 03:04 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