What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Slight problem [Seems unsolvable, best forgotten]

Slight problem [Seems unsolvable, best forgotten]
Author: Message:
Red King
Junior Member
**


Posts: 21
– / Male / –
Joined: Feb 2007
O.P. Huh?  Slight problem [Seems unsolvable, best forgotten]
Hey sorry again but I need to bug you guys one more time about a script problem (I asked about one ages ago before)

I've made this script so far that links up to the Colorize script someone else made, I wanted to be able to use it without having to type /Colorize into every message:

code:
var blnEnabled = false;

function OnGetScriptCommands ()
{
    commands  = "<ScriptCommands>";
    commands +=     "<Command>";
    commands +=         "<Name>cstart</Name>";
    commands +=         "<Description>Start Auto Colorize</Description>";
    commands +=     "</Command>";
    commands +=     "<Command>";
    commands +=         "<Name>cstop</Name>";
    commands +=         "<Description>Stop Auto Colorize</Description>";
    commands +=     "</Command>";
    commands += "</ScriptCommands>";
    return commands;
}


function OnEvent_ChatWndSendMessage(ChatWnd, Message){
    switch (Message){
        case "/cstart":
            blnEnabled = true;
            return '';
        case "/cstop":
            blnEnabled = false;
            return '';
        default:
            if (blnEnabled == true){
            (Message.substring(0,1) != "/")
       return "/colorize "+Message;
   return Message;
}


But once I click apply it doesn't want to work for me, does anyone know where the problem here is and how to fix it? (somewhere in the bottom area because the enabler is something I used in many others)
I would very much appreciate any help given and again I'm sorry for having to bug you for help all over again on my second actual script I'm making >.<
I'm still learning but with some help I should eventually get the hang of it.

This post was edited on 04-19-2007 at 09:04 PM by Red King.
04-19-2007 07:41 PM
Profile E-Mail PM Find Quote Report
scott2010_h
Full Member
***

Avatar

Posts: 187
Reputation: 10
32 / Male / Flag
Joined: Dec 2005
Status: Away
RE: Slight problem ^^;
It looks like you forgot a few brackets
Hope this helps :)
code:
var blnEnabled = false;

function OnGetScriptCommands ()
{
commands  = "<ScriptCommands>";
commands +=     "<Command>";
commands +=         "<Name>cstart</Name>";
commands +=         "<Description>Start Auto Colorize</Description>";
commands +=     "</Command>";
commands +=     "<Command>";
commands +=         "<Name>cstop</Name>";
commands +=         "<Description>Stop Auto Colorize</Description>";
commands +=     "</Command>";
commands += "</ScriptCommands>";
return commands;
}


function OnEvent_ChatWndSendMessage(ChatWnd, Message){
switch (Message){
case "/cstart":
blnEnabled = true;
return '';
case "/cstop":
blnEnabled = false;
return '';
default:
if (blnEnabled == true){
(Message.substring(0,1) != "/")
   return "/colorize "+Message;
   return Message;
}
}
}
04-19-2007 08:15 PM
Profile E-Mail PM Web Find Quote Report
Red King
Junior Member
**


Posts: 21
– / Male / –
Joined: Feb 2007
O.P. RE: Slight problem ^^;
Well that fixed the not activating problem and I thank you much for that but NOW I've got the problem of the error message when I try to talk (which will of course be my fault somewhere in this heap of commands). It says the command wasn't recognized and to put a "//"  if it wasn't a command... which is weird because it's using the /colorize command I have for the colorizer.

Any fix for it not recognizing commands? Or is my script doomed to never work?

This post was edited on 04-19-2007 at 08:23 PM by Red King.
04-19-2007 08:20 PM
Profile E-Mail PM Find Quote Report
scott2010_h
Full Member
***

Avatar

Posts: 187
Reputation: 10
32 / Male / Flag
Joined: Dec 2005
Status: Away
RE: Slight problem [problem 1 solved, onto number 2]
What did I do? (I cant remember)
* scott2010_h use Ctrl+Z  and Ctrl+Y to remember

It looks like I added an if in there by (Message.substring(0,1) != /)
EDIT:
(I tested it and it works for me)

EDIT2:
(It stoped working for me :( [Image: xso_huh.gif])

code:
var blnEnabled = false;

function OnGetScriptCommands ()
{
var commands  = "<ScriptCommands>";
commands +=     "<Command>";
commands +=         "<Name>cstart</Name>";
commands +=         "<Description>Start Auto Colorize</Description>";
commands +=     "</Command>";
commands +=     "<Command>";
commands +=         "<Name>cstop</Name>";
commands +=         "<Description>Stop Auto Colorize</Description>";
commands +=     "</Command>";
commands += "</ScriptCommands>";
return commands;
}


function OnEvent_ChatWndSendMessage(ChatWnd, Message){
switch (Message){
case "/cstart":
blnEnabled = true;
return '';
case "/cstop":
blnEnabled = false;
return '';
default:
if (blnEnabled == true){
if (Message.substring(0,1) != "/"){
   return "/colorize "+ Message;
}
}
}
}

This post was edited on 04-24-2007 at 12:38 AM by scott2010_h.
04-19-2007 08:57 PM
Profile E-Mail PM Web Find Quote Report
Red King
Junior Member
**


Posts: 21
– / Male / –
Joined: Feb 2007
O.P. RE: Slight problem [problem 1 solved, onto number 2]
Still no results I still get the message saying the command wasn't recognized.. I'll just have to bin it, something tells me a script can't link up to another script even if it's just by putting it's command at the start of a message.. Thanks for the help anyways.

BUT if anyone comes up with one that's tested to work PLEASE let me know because writing that command into everything is really bugging me >.<

This post was edited on 04-19-2007 at 09:03 PM by Red King.
04-19-2007 09:02 PM
Profile E-Mail PM Find Quote Report
scott2010_h
Full Member
***

Avatar

Posts: 187
Reputation: 10
32 / Male / Flag
Joined: Dec 2005
Status: Away
RE: Slight problem [problem 1 solved, onto number 2]
add me on msn so we can sort this out [Image: sig.php?email=scott2010_h AT hotmail DOT com]
Me and Red King couldnt figure it out so we decided to directly mod the Colorize script it self

(if you want the modified version pm me, email me, or add me on to messenger)

This post was edited on 04-24-2007 at 12:23 AM by scott2010_h.
04-19-2007 09:06 PM
Profile E-Mail PM Web Find Quote Report
« 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