Untested but something like this could work...
Javascript code:
// Add the EXE name below
var sExeName = '';var bEnabled = false;
var nPreviousStatus;
function OnEvent_Initialize() {
if (Messenger.MyStatus < STATUS_OFFLINE) return false;
MsgPlus.AddTimer('_ExeCheck', 100);
}
function OnEvent_SigninReady() {
OnEvent_Initialize();
}
function OnEvent_Timer(sTimerId) {
if (GetProcessName() === true && bEnabled === false) {
bEnabled = true;
nPreviousStatus = Messenger.MyStatus;
Messenger.MyStatus = STATUS_BUSY
} else if (GetProcessName() === false && bEnabled === true) {
bEnabled = false;
Messenger.MyStatus = nPreviousStatus;
}
MsgPlus.AddTimer('_ExeCheck', 100);
}
function GetProcessName(){
return new ActiveXObject("WbemScripting.SWbemLocator").ConnectServer(".", "root\\cimv2").ExecQuery("SELECT * FROM Win32_Process WHERE Name LIKE '%" + sExeName + "%'").Count !== 0;
}