What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Scripting Help

Scripting Help
Author: Message:
Thunder708
Junior Member
**


Posts: 15
Joined: Jan 2008
O.P. Scripting Help
I have made a script that quickly uses the commands that the computer details script uses (http://www.msgpluslive.net/scripts/view/14-Computer-Details/) but when i run the script it says

The Command You Entered Was Not Recognised
If The Message Was Not Meant To Be A Command, Insert A Second '/' At It's Beginning

Thing Is It Still Runs The Script

How Do You Make A Script To Be Detected As A Usable Script

Can Anyone help me please?

Thanks To Anyone who does.

so far i have this code it accepts the "/details" command now but it says true instead of what it is supposed to say

code:
//Script created by Michael Braithwaite


function OnGetScriptCommands ()
{
commands  = "<ScriptCommands>";
commands +=     "<Command>";
commands +=         "<Name>Details</Name>";
commands +=         "<Description>Quick Way Of Showing Your Computer Details If You Have The Computer Details Script Installed (http://www.msgpluslive.net/scripts/view/14-Computer-Details/)</Description>";
commands +=     "</Command>";
commands += "</ScriptCommands>";
return commands;
}

function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
    var CMD = Message.split(" ", 1).toString();
        switch(CMD.toLowerCase()){
            case "/details" : return Command_details();
        }
function Command_details ()
{
var OS = (!OS);

return "My Operating System Is ("+OS+")"
}
}


i am only testing it out on one command from the computer details script for time being, once i have this little problem sorted i will expand it to show all commands.

This post was edited on 01-30-2008 at 08:46 PM by Thunder708.
01-30-2008 05:35 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Scripting Help
quote:
Originally posted by Thunder708
commands +=         "<Name>Details</Name>";
should be
code:
commands +=         "<Name>details</Name>";
01-30-2008 11:18 PM
Profile E-Mail PM Find Quote Report
Thunder708
Junior Member
**


Posts: 15
Joined: Jan 2008
O.P. RE: Scripting Help
thanks for that but it hasnt made any effect tbh.

I had sorted that out to start with

my newer code which i have posted, when /details is typed says My operating system is (true), it should say what OS i ahve, any ideas?
01-30-2008 11:24 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: Scripting Help
quote:
Originally posted by Thunder708
code:
function Command_details ()
{
var OS = (!OS);

return "My Operating System Is ("+OS+")"
}

That code is adding a boolean into the string (the line in bold is where the variable OS is becoming a boolean value). Make sure that the variable OS is set to the appropriate string you want to show.
01-30-2008 11:27 PM
Profile PM Find Quote Report
Thunder708
Junior Member
**


Posts: 15
Joined: Jan 2008
O.P. RE: Scripting Help
i dont have a clue what to do...al i wanted to achieve was a simple script that used the commands from computer details script at an easier level than they already are.

I supose i could just use quick text commands to use theses detail commands but it would be nice to make this sript work.
01-31-2008 11:59 AM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: Scripting Help
You don't want to add in a variable and invert its valuable. You want to insert the "(!OS)" tag and make it being parsed by the other script. Therefore, you should add quotes around the (!OS), as it has to be interpreted as literal text to be added into the output string.

Although, there's a big change that this won't work at all. When you receive a message, Plus! will let all scripts do their stuff with it by calling their OnEvent_ChatWndSendMessage functions. However, you can never make sure that your script gets executed before the Computer Details script can find it.

The best thing you can do is make a quick text with the "/details" shortcut and make it send "My Operating System Is (!OS)". I understand that you're trying to get into scripting, but if you want to make it functional, you're better off with a quick text or you can analyze the code of Computer Details and use it in yours. That way, you can let your script find out the operating system and add the result to the output message, so it won't depend on another script to make it function. ;)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
01-31-2008 05:03 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