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

Pages: (3): « First « 1 [ 2 ] 3 » Last »
[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
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
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

Just replace all his code in Gradient.js with mine.

Chris4 said the command /xconfig doesn't work with my version anymore, trying to fix this.

Chris4 already posted my fix, this works and is simple, no biggie :)

This post was edited on 07-05-2006 at 11:15 PM by Ezra.
[Image: 1-0.png]
             
07-05-2006 11:13 PM
Profile PM Web Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
RE: [Release] Gradient Text
/xgradient would probably work better?? :P
07-05-2006 11:25 PM
Profile E-Mail PM Find Quote Report
craig2k5
Junior Member
**


Posts: 64
Joined: Feb 2006
O.P. RE: [Release] Gradient Text
Ok thanks for re-writing my code 8-) anyway ive used your code and i will try and andd a few new features

quote:
Originally posted by Joereynolds89
/xgradient would probably work better?? :P


Done for next Release

This post was edited on 07-05-2006 at 11:31 PM by craig2k5.
07-05-2006 11:30 PM
Profile E-Mail PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: [Release] Gradient Text
quote:
Originally posted by Joereynolds89
/xgradient would probably work better?? :P

Whatever you like, but indeed xconfig is a little too common and could be applied for more things than this script :)
[Image: 1-0.png]
             
07-05-2006 11:31 PM
Profile PM Web Find Quote Report
craig2k5
Junior Member
**


Posts: 64
Joined: Feb 2006
O.P. RE: [Release] Gradient Text
Updated The Script See First Post
07-05-2006 11:36 PM
Profile E-Mail PM Find Quote Report
MX-G
Full Member
***

Avatar

Posts: 303
Reputation: 22
35 / Male / Flag
Joined: Jun 2006
RE: [Release] Gradient Text
Thanks craig2k5 :D
07-05-2006 11:41 PM
Profile PM Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
RE: [Release] Gradient Text
you forgot to change the attachment :( therefore now what you have wrote dosnt represent the file :P
07-05-2006 11:49 PM
Profile E-Mail PM Find Quote Report
craig2k5
Junior Member
**


Posts: 64
Joined: Feb 2006
O.P. RE: [Release] Gradient Text
i did change the attatchment :S lol
07-05-2006 11:54 PM
Profile E-Mail PM Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
RE: [Release] Gradient Text
ahh, i wasnt aware it was possibel to change an attachment, plus it must be downloading from my cache because i get the old version :( ill clean and try again, even though ive got it anyway :P

Edit:
Yer, its all fine now (Smilie) and to whoever asked for implementation of colour codes, the colour codes are the WLM codes, accessable using the colour chooser within the conversation screen (Smilie)

This post was edited on 07-06-2006 at 12:03 AM by Joereynolds89.
07-06-2006 12:00 AM
Profile E-Mail PM Find Quote Report
Pages: (3): « First « 1 [ 2 ] 3 » Last »
« Next Oldest Return to Top Next Newest »


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