Shoutbox

AppMon - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: AppMon (/showthread.php?tid=84024)

AppMon by Mindstorms on 05-30-2008 at 06:29 PM

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
RE: AppMon by Mindstorms on 06-01-2008 at 11:40 AM

Fixed it by myself.

I looked at other scripts with aproximatically the same options, learned, copied, pasted, now it works.


RE: AppMon by aNILEator on 06-01-2008 at 03:00 PM

by modifying have you fixed the browse button on Vista?


RE: AppMon by Mindstorms on 06-01-2008 at 03:04 PM

No, I've done the same as first, but without the Word object