What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Release] Gradient Text

[Release] Gradient Text
Author: Message:
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
33 / Male / Flag
Joined: Dec 2004
RE: [Release] Gradient Text
quote:
Originally posted by Joereynolds89
where abouts am i suppose to place that script in his? as using it on its own shows command not, and if putting it where i think it goes in his, i also get no command found :S sorry

If your editng the script with the code posted above, the code is wrong. You need to use this instead:

code:
//Initialize the color variables to make them globaly accessable
var color1;
var color2;

function OnconfigEvent_CtrlClicked(Wnd, ControlId)
{
  try
  {
    //try catching the colors from the controls
    color1 = Wnd.GetControlText('clr1');
    color2 = Wnd.GetControlText('clr2');
  }
  catch(err)
  {
    //If it fails for some odd reason Display A Toast to tell the user about it
    MsgPlus.DisplayToast("GRADIENTER", "Changing Color Failed");
  }
  //Close the Config Window
  Wnd.Close(1);
}

function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)
{
  if (sMessage == "/xconfig")
  {
    CreateConfigWnd();
    return "";
  }
  else
  {
    return "[c=" + color1 + "]" + sMessage + "[/c=" + color2 + "]";
  }
}

function OnEvent_Signin(Email)
{
  try
  {
    //Try reading the colors from the registry
    color1 = ReadRegistry("color1");
    color2 = ReadRegistry("color2");
  }
  catch(err)
  {
    //If anything fails it will default to these colors
    color1 = "1";
    color2 = "4";
  }
}

function OnEvent_Signout(Email)
{
  try
  {
    //Try Writing the colors to the registry
    WriteRegistry("color1", color1);
    WriteRegistry("color2", color2);
  }
  catch(err)
  {
    MsgPlus.DisplayToast("GRADIENTER", "Error saving gradient information");
  }
}

function CreateConfigWnd()
{
  var configWnd = MsgPlus.CreateWnd("Interface.xml", "Config");
  configWnd.SetControlText('clr1', color1);
  configWnd.SetControlText('clr2', color2);
}

function WriteRegistry(key, value)
{
  var Shell = new ActiveXObject("WScript.Shell");
  return Shell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\" + key, value);
}

function ReadRegistry(key)
{
  var Shell = new ActiveXObject("WScript.Shell");
  return Shell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyEmail + "\\" + key);
}
Replacing Gradient.js ;)

This post was edited on 07-05-2006 at 11:13 PM by Chris4.
Twitter: @ChrisLozeau
07-05-2006 11:12 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Release] Gradient Text - by craig2k5 on 07-05-2006 at 10:02 PM
RE: [Realse] Gradient Text - by Joereynolds89 on 07-05-2006 at 10:10 PM
RE: [Realse] Gradient Text - by craig2k5 on 07-05-2006 at 10:19 PM
RE: [Release] Gradient Text - by Joereynolds89 on 07-05-2006 at 10:31 PM
RE: [Release] Gradient Text - by craig2k5 on 07-05-2006 at 10:39 PM
RE: [Release] Gradient Text - by Joereynolds89 on 07-05-2006 at 10:55 PM
RE: [Realse] Gradient Text - by Ezra on 07-05-2006 at 10:55 PM
RE: [Release] Gradient Text - by Chris4 on 07-05-2006 at 10:59 PM
RE: [Release] Gradient Text - by Joereynolds89 on 07-05-2006 at 11:02 PM
RE: [Release] Gradient Text - by craig2k5 on 07-05-2006 at 11:04 PM
RE: [Release] Gradient Text - by Chris4 on 07-05-2006 at 11:12 PM
RE: [Release] Gradient Text - by Ezra on 07-05-2006 at 11:13 PM
RE: [Release] Gradient Text - by Joereynolds89 on 07-05-2006 at 11:25 PM
RE: [Release] Gradient Text - by craig2k5 on 07-05-2006 at 11:30 PM
RE: [Release] Gradient Text - by Ezra on 07-05-2006 at 11:31 PM
RE: [Release] Gradient Text - by craig2k5 on 07-05-2006 at 11:36 PM
RE: [Release] Gradient Text - by MX-G on 07-05-2006 at 11:41 PM
RE: [Release] Gradient Text - by Joereynolds89 on 07-05-2006 at 11:49 PM
RE: [Release] Gradient Text - by craig2k5 on 07-05-2006 at 11:54 PM
RE: [Release] Gradient Text - by Joereynolds89 on 07-06-2006 at 12:00 AM
RE: [Release] Gradient Text - by craig2k5 on 07-06-2006 at 12:13 AM


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