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:
craig2k5
Junior Member
**


Posts: 64
Joined: Feb 2006
O.P. [Release] Gradient Text
My First script ive made :P hope you like it :) its very simple

What It Does
Takes to numbers and makes all the text you send to your contact
will appear in a gradient Form

How To Work
Type /xgradient into the Conversation window
Press Send/enter
Input the number Of The First Colour
Input the number Of The Second Colour
Press Ok

Todo
Deactivate the Gradient Without going into the scripts window.
Allow /xconfig then 2 numbers :p instead of having to go into configuration



If you have any suggestions/features/bugs let me know :D

.plsc File Attachment: Gradient Script.plsc (2.52 KB)
This file has been downloaded 173 time(s).

This post was edited on 07-05-2006 at 11:37 PM by craig2k5.
07-05-2006 10:02 PM
Profile E-Mail PM Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
RE: [Realse] Gradient Text
mines stuck on green/blue lol whatever i put in, it was like that default
07-05-2006 10:10 PM
Profile E-Mail PM Find Quote Report
craig2k5
Junior Member
**


Posts: 64
Joined: Feb 2006
O.P. RE: [Realse] Gradient Text
are you pressing ok? after you type the two colours in?? It Works here nomatter what numbers i put in

This post was edited on 07-05-2006 at 10:19 PM by craig2k5.
07-05-2006 10:19 PM
Profile E-Mail PM Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
RE: [Release] Gradient Text
ok?? it dosnt ask ok
it send them the command with the message
and send the message half blue/green?? :S

maybe you mean send? and when i click send it sends the contact /xconfig 12 13 or whatever numbers i put??
maybe a conflict with another add on i have??
(Smilie) good for a first script though yet not every1 has the new msn yet so it wont work to many people (Smilie)

This post was edited on 07-05-2006 at 10:34 PM by Joereynolds89.
07-05-2006 10:31 PM
Profile E-Mail PM Find Quote Report
craig2k5
Junior Member
**


Posts: 64
Joined: Feb 2006
O.P. RE: [Release] Gradient Text
You cant acutally just type /xconfig then 2 numbers :P have to send for a window to cum up... that is a good idea tho *-) i edited the post :)

This post was edited on 07-05-2006 at 10:40 PM by craig2k5.
07-05-2006 10:39 PM
Profile E-Mail PM Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
RE: [Release] Gradient Text
yer thats what i mean, i click send, no window comes up, it just send the command with the numbers and the gradient of green/blue to the other contact??

(edit) ok i now understand, you press send before the numbers :P i understood you wrote the command with the numbers :P sorry

This post was edited on 07-05-2006 at 10:56 PM by Joereynolds89.
07-05-2006 10:55 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: [Realse] Gradient Text
Not the best script i've ever seen, why use a config file when you can use the registry, the registry is a lot easier and needs less code...

Also why the Gradient Script.js file without any code in it? Just the Initialize and Uninitialize events are in there and they do nothing...

Tried to edit your code a little to make it better, please don't take this in the wrong way, i'm simply trying to help :D

Allright, you read your config file EVERY time a message was sent, I just load the gradient information IF it is present on signing, if somehow it can't be loaded, error or first time use, it will default to 1 and 4.

It will only save the gradient information on signout, so I just cut back the reading and writing to once on signing and once on signout.
Also because the registry is much easier to use than a config file it's multi-user to it saves color information per-user.

Those are the major changes, minor changes are that I used a regex to see if the /xconfig command was called, just because... well.. I like regex :P (Just started learning regex so also using it in practice to learn) and making a seperate function for the creation of the config window.

Also... I havn't tested it, because my computer is acting up and well... No time have to get up early tommorrow...

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.Match(/^\/xconfig$/i) != null)
  {
    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);
}
[Image: 1-0.png]
             
07-05-2006 10:55 PM
Profile PM Web Find Quote Report
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
33 / Male / Flag
Joined: Dec 2004
RE: [Release] Gradient Text
It's nice, but could have more features.

Like.. some people don't know that 1=black etc. So you should make a colour panel so people can choose the colour.

Also, it should be added to the Plus! menu with the other scripts, so you can edit the gradient from their. Some people won't know the command.

When you've added some more features, it'll be good enough to add to the Scripts Database. :)
Twitter: @ChrisLozeau
07-05-2006 10:59 PM
Profile PM Find Quote Report
Joereynolds89
Junior Member
**


Posts: 69
Joined: Jul 2006
RE: [Release] Gradient Text
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
07-05-2006 11:02 PM
Profile E-Mail PM Find Quote Report
craig2k5
Junior Member
**


Posts: 64
Joined: Feb 2006
O.P. RE: [Release] Gradient Text
:) thanks guys this is the first script ive made lol and ill take what you have said and try for the next realse
07-05-2006 11:04 PM
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