Is there a script? - 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: Is there a script? (/showthread.php?tid=93966)
Is there a script? by BlitZeR on 02-26-2010 at 01:35 PM
Hej
is there a script that automatically changes personal msg based on status?
for example if my status is set to 'busy' it changes personal msg to "i am busy"
and if its set to online "i am not busy"
any help appreciated
RE: Is there a script? by djdannyp on 02-26-2010 at 01:53 PM
http://www.msgpluslive.net/scripts/browse/14-3/Nickname-and-PSM/
These are all the scripts relating to PSM.
Take a browse through them and see if you find anything which suits your needs.
RE: RE: Is there a script? by BlitZeR on 02-26-2010 at 01:54 PM
quote: Originally posted by djdannyp
http://www.msgpluslive.net/scripts/browse/14-3/Nickname-and-PSM/
These are all the scripts relating to PSM.
Take a browse through them and see if you find anything which suits your needs.
yeah i was/am doing that just posted incase someone knows of something already
thanks no-one has something like this?
RE: Is there a script? by AngelDevil on 02-26-2010 at 09:10 PM
You can use the 'Personalized status' function of Messenger Plus... it does exactly what you want...
RE: Is there a script? by billyy on 02-26-2010 at 09:46 PM
BlitZeR just wants something slightly different from whats out there.
Nahw im just gunna write this script, its not hard and it will save a lot of time...
And YES i will test it... i have changed... (oh who am i kidding, but it'll work before i post it)
RE: Is there a script? by davidpolitis on 02-26-2010 at 11:49 PM
code: function OnEvent_MyStatusChange(NewStatus)
{
var PSM;
switch (NewStatus)
{
case 2:
PSM = "Appear Offline";
break;
case 3:
PSM = "Online";
break;
case 4:
PSM = "Busy";
break;
case 5:
PSM = "Be Right Back";
break;
case 6:
PSM = "Idle";
break;
case 7:
PSM = "Away";
break;
case 8:
PSM = "In a Call";
break;
case 9:
PSM = "Out to Lunch;
break;
default:
PSM = Messenger.MyPersonalMessage;
}
Messenger.MyPersonalMessage = PSM;
}
RE: Is there a script? by billyy on 02-27-2010 at 01:04 AM
Here i wrote some code, sorry its late. you can make it bold and turn it on and off via the script menu...
I could make a small interface in witch you could set the psm you want per status if you like, but its in the scripts root anyway.
I think i'll add that yeah, add sum boxes for cursive, bold and underlined... could be fun... anyway heres it so far, don't have much time to make it all look nice, but it works
RE: Is there a script? by BlitZeR on 02-27-2010 at 08:34 AM
Thanks so much! billyy & davidpolitis
Really helpful, thanks again
RE: Is there a script? by AngelDevil on 02-27-2010 at 11:08 AM
quote: Originally posted by billyy
Here i wrote some code, sorry its late. you can make it bold and turn it on and off via the script menu...
I could make a small interface in witch you could set the psm you want per status if you like, but its in the scripts root anyway.
I think i'll add that yeah, add sum boxes for cursive, bold and underlined... could be fun... anyway heres it so far, don't have much time to make it all look nice, but it works
It doesn't work correctly, because of an error in Messenger.MyPersonalMessage property .
Try this: start Messenger (with online status) and insert a personal message.
If you change your status, the script works correctly. Now close Messenger, and restart it; try to change your state and then return online... my Psm is lost.
RE: Is there a script? by billyy on 02-27-2010 at 11:39 AM
Really? it works fine for me
RE: Is there a script? by AngelDevil on 02-27-2010 at 01:08 PM
quote: Originally posted by billyy
Really? it works fine for me
Have you tried it? And it works? Mmmm...
RE: Is there a script? by davidpolitis on 02-27-2010 at 10:40 PM
I started work on something if anyone wants to finish it... I cbf.
code: var Shell = new ActiveXObject("WScript.Shell");
var RegPath = MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\Enabled";
function isEnabled()
{
try
{
val = Shell.RegRead(RegPath);
if(val == "0")
{
return false;
}
}
catch (err)
{
Shell.RegWrite(RegPath, "1");
}
return true;
}
function OnGetScriptMenu(Location)
{
Menu = "<ScriptMenu>";
if (isEnabled())
Menu += "<MenuEntry Id=\"Disable\">Disable</MenuEntry>";
else
Menu += "<MenuEntry Id=\"Enable\">Enable</MenuEntry>";
Menu += "</ScriptMenu>";
return Menu;
}
function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd)
{
if (MenuItemId == "Disable")
{
Shell.RegWrite(RegPath, "0");
}
else
{
Shell.RegWrite(RegPath, "1");
}
}
function ChangePSM()
{
if(isEnabled())
{
var PSM;
switch (NewStatus)
{
case 2:
PSM = "Appear Offline";
break;
case 3:
PSM = "Online";
break;
case 4:
PSM = "Busy";
break;
case 5:
PSM = "Be Right Back";
break;
case 6:
PSM = "Idle";
break;
case 7:
PSM = "Away";
break;
case 8:
PSM = "In a Call";
break;
case 9:
PSM = "Out to Lunch";
break;
default:
PSM = Messenger.MyPersonalMessage;
}
Messenger.MyPersonalMessage = PSM;
}
}
function OnEvent_Initialize(MessengerStart)
{
if (!MessengerStart) // if messenger is signed in
{
ChangePSM();
}
}
function OnEvent_MyStatusChange(NewStatus)
{
ChangePSM();
}
RE: RE: Is there a script? by CookieRevised on 02-27-2010 at 11:05 PM
quote: Originally posted by davidpolitis
code: function isEnabled()
{
try
{
val = Shell.RegRead(RegPath);
if(val == "0")
{
return false;
}
}
catch (err)
{
Shell.RegWrite(RegPath, "1");
}
return true;
}
Why do people still use such a bad practice of cluttering people's registry by storing a standard value when there hasn't been any change in that value (it's the standard/default one)? What's wrong with having a default value just in memory?
CookieRevised's reply to [Release] Easy Math and Symbols 2.0.3 (second part of post)
code: function isEnabled() {
try {
var val = Shell.RegRead(RegPath)
} catch(err) {
var val = 1
}
return (val != 0)
}
the rest looks almost perfect though (except for Messenger.MyUserID instead of Messenger.MyEmail (security reasons), and a very few tiny things which could be done a bit more shorter/directly)
RE: Is there a script? by davidpolitis on 02-27-2010 at 11:22 PM
Yeah... I did it quite quicky. Ideally it would be better to just store settings in an xml file.
RE: Is there a script? by CookieRevised on 02-27-2010 at 11:25 PM
quote: Originally posted by davidpolitis
Yeah... I did it quite quicky. Ideally it would be better to just store settings in an xml file.
yeah, possible... But even there the same principle would apply: don't write a setting when there is no change in the setting.
for doing it quickly. Just slap an scriptinfo.xml on it and you're done
|