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

[Help] program opener
Author: Message:
.:lil-wolf:.
New Member
*

Avatar
Its peanut butter jelly time!

Posts: 6
43 / – / –
Joined: Sep 2006
O.P. [Help] program opener
Chances are there is a program out tehre that does this but i am sorta new to this whole programing thingy and I'm trying to make a program my self and all i'm trying to do is get this to open paint and i got it to open paint but a pop up saying "The Command you entered was not recognized.
If the message was not ment to be a commant, insert a double '//' at its beginning." when i try and use the command. can you help me?

here is what i got for the script:
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
   
    if(Message=="/paint"){

        var shell = new ActiveXObject("wscript.shell");
        shell.Run("mspaint.exe");

    }

}
function OnGetScriptCommands(){
    var commands = '<ScriptCommands>';
        commands+='<Command>';
            commands+='<Name>/paint</Name>';
            commands+='<Description>Open paint.</Description>';
        commands+='</Command>';
    return commands;
}
04-07-2007 02:04 PM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: [Help] program opener
Your code was quite good, the only problem was you forgot to return a blank string at the end of calling the command.  I updated the code with this small fix to help you.  Have fun coding ;)
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
   
    if(Message=="/paint"){

        var shell = new ActiveXObject("wscript.shell");
        shell.Run("mspaint.exe");
        return "";

    }

}
function OnGetScriptCommands(){
    var commands = '<ScriptCommands>';
        commands+='<Command>';
            commands+='<Name>paint</Name>';
            commands+='<Description>Open paint.</Description>';
        commands+='</Command>';
    return commands;
}

This post was edited on 04-07-2007 at 02:44 PM by markee.
[Image: markee.png]
04-07-2007 02:24 PM
Profile PM Find Quote Report
.:lil-wolf:.
New Member
*

Avatar
Its peanut butter jelly time!

Posts: 6
43 / – / –
Joined: Sep 2006
O.P. RE: [Help] program opener
thanks :D
04-07-2007 02:28 PM
Profile E-Mail PM Find Quote Report
.:lil-wolf:.
New Member
*

Avatar
Its peanut butter jelly time!

Posts: 6
43 / – / –
Joined: Sep 2006
O.P. RE: [Help] program opener
one more tiny thing. The command isn't showing up on the commands list, why?
04-07-2007 02:39 PM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: [Help] program opener
There was a / before paint in the <name> area which was causing the problem because it wasn't needed.  I update the code in the post above so it doesn't have this problem.
[Image: markee.png]
04-07-2007 02:45 PM
Profile PM Find Quote Report
.:lil-wolf:.
New Member
*

Avatar
Its peanut butter jelly time!

Posts: 6
43 / – / –
Joined: Sep 2006
O.P. RE: [Help] program opener
oh ok thanks :) i just like entered the code and that never checked the list after entering the code
04-07-2007 02:49 PM
Profile E-Mail PM 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