Nope, that did not work for me
. This never used to happen, I have a feeling some of my other code is effecting it:
code:
//This script was created by absorbation. You may not use any of this code in your work without full permission from me.
//This script was created for free to help you gain a better messenger experience. I therefore accept no responsiblity for what may happen to your computer, although it is very unlikly to do anything accept change Windows Live Messenger's messages.
//Thanks for using my script and I hope you enjoy it.
var Email = Messenger.MyEmail;
var ScriptName = "Message Enchanter";
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
var CommandIs = new ActiveXObject('WScript.Shell').RegRead(MsgPlus.ScriptRegPath + Email + "\\command");
if(Message.substring(0,1) != "/") {
if(CommandIs == "None") {
return Message;
}
if(CommandIs == "Bold") {
return Message.replace(Message, "" + Message + "");
}
if(CommandIs == "Underline") {
return Message.replace(Message, "" + Message + "");
}
if(CommandIs == "Strike") {
return Message.replace(Message, "" + Message + "");
}
if(CommandIs == "Caps") {
return Message.replace(Message, Message.toUpperCase());
}
if(CommandIs == "CapsAndDots") {
return Message.replace(Message, Message.substr(0,1).toUpperCase() + Message.substr(1) + '.');
}
if(CommandIs == "MeCommand") {
return "/me says: " + Message;
}
if(CommandIs == "NoIcon") {
return "/noicon " + Message;
}
if(CommandIs == "NoFormat") {
return "/noformat " + Message;
}
}
}
function OnGetScriptMenu(Location)
{
var ScriptMenu ="<ScriptMenu>";
ScriptMenu +="<MenuEntry Id=\"Options\">Options</MenuEntry>";
ScriptMenu +="<Separator/>";
ScriptMenu +="<MenuEntry Id=\"About\">About " + ScriptName + "</MenuEntry>";
ScriptMenu +="</ScriptMenu>";
return ScriptMenu;
}
function OnEvent_MenuClicked(MenuId)
{
if(MenuId=="Options"){
var CommandIs = 'None';
var CommandIs = new ActiveXObject('WScript.Shell').RegRead(MsgPlus.ScriptRegPath + Email + "\\command");
var Wnd = MsgPlus.CreateWnd("Windows.xml", "Options");
Wnd.Button_SetCheckState(CommandIs,"True");
}
if(MenuId=="About"){
var Wnd = MsgPlus.CreateWnd("Windows.xml", "About");
}
}
function OnOptionsEvent_CtrlClicked(Wnd, ControlId)
{
if(ControlId == "BtnClose") {
MsgPlus.DisplayToast(ScriptName, "Your settings have been saved and your option has been enabled.");
Wnd.Close(1);
}
if(ControlId == "None") {
var CommandIs = "None";
new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
}
if(ControlId == "Bold") {
var CommandIs = "Bold";
new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
}
if(ControlId == "Underline") {
var CommandIs = "Underline";
new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
}
if(ControlId == "Strike") {
var CommandIs = "Caps";
new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
}
if(ControlId == "NoIcon") {
var CommandIs = "NoIcon";
new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
}
if(ControlId == "NoFormat") {
var CommandIs = "NoFormat";
new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
}
if(ControlId == "Caps") {
var CommandIs = "Caps";
new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
}
if(ControlId == "CapsAndDots") {
var CommandIs = "CapsAndDots";
new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
}
if(ControlId == "MeCommand") {
var CommandIs = "MeCommand";
new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
}
}