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

Pages: (2): « First [ 1 ] 2 » Last »
EXECUTE APPLICATION
Author: Message:
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. EXECUTE APPLICATION
Hi,  i would like to know how would be the script to execute an application when receiving a certain message from someone..

for example,  my WLM is always online,  and i could connect from another account far from home and run a certain application in my home just by sending for example:  !runNorton   !runWinamp   or whatever...

is it possible?
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
06-27-2006 02:03 PM
Profile PM Web Find Quote Report
Jiggs
Full Member
***


Posts: 100
39 / Male / –
Joined: Jun 2006
RE: EXECUTE APPLICATION
cool, nice idea. but no idea here
06-27-2006 02:09 PM
Profile E-Mail PM Find Quote Report
The Brain
Junior Member
**

Avatar

Posts: 49
Reputation: 1
– / Male / Flag
Joined: Jan 2003
RE: EXECUTE APPLICATION
For sure. Not too difficult either

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind)
{
        if(Message == "!runNotepad")
        {
                ChatWnd.SendMessage("/run c:\\windows\\notepad.exe");
        }
}


makes use of the MsgPlus "/run" command. Simply replicate the if statement for your programs you want to run.

This post was edited on 06-27-2006 at 02:18 PM by The Brain.
06-27-2006 02:16 PM
Profile PM Web Find Quote Report
Colin-uk
New Member
*


Posts: 13
Joined: Mar 2004
RE: EXECUTE APPLICATION
i remember an old tool called "Arcine Messenger lite tools" did something similar for msn 4/5

but the developer stopped working on later versions :(

i loved that feature in the program

maybe research into that? :P
06-27-2006 02:17 PM
Profile E-Mail PM Find Quote Report
upsfeup
Junior Member
**


Posts: 67
Joined: Feb 2005
RE: EXECUTE APPLICATION
I would suggest to add a "trusted" remote account or somekind of password access. Otherwise your friends could start to mess with your computer. You would arrive home and have 400 notepads opened! ;)
06-27-2006 02:21 PM
Profile E-Mail PM Find Quote Report
The Brain
Junior Member
**

Avatar

Posts: 49
Reputation: 1
– / Male / Flag
Joined: Jan 2003
RE: EXECUTE APPLICATION
quote:
Originally posted by upsfeup
I would suggest to add a "trusted" remote account or somekind of password access. Otherwise your friends could start to mess with your computer. You would arrive home and have 400 notepads opened! ;)


Oh I agree completely! There is a lot of potential in the Plus Scripting engine for remotely controlling Messenger and the computer, but if not set up securely, it could be very bad. I just threw that together really quickly to illustrate that is could be done very simply.

Simple Security: Have your alternative account always have the same nickname. Check if(origin == "myOtherAccountsNick") before doing anything else. This is also quite insecure though, as anyone can change their nickname to whatever they want.

More secure would be getting the list of contacts in the ChatWnd, and checking that the specified contact is present & that the message came from their nickname. This would still be as insecure as the first option if you are in a group chat with your two accounts, but this is probably quite rare.

I don't plan on using this at all yet, I haven't come up with any cicumstances where it is useful to me. But it is certainly possible, and certainly could be useful.

And as far as passwords go - You probably don't want them sitting in a conversation window at your home computer all day, while you are at school or work.
06-27-2006 02:32 PM
Profile PM Web Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. RE: EXECUTE APPLICATION
ok i made this code,    it verifies if its your "Remote Control" account by email...  and then runs the command

please tell me if this code is correct i haven't tried it

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
    if (Contact.Email == xxx@yyy.zzz) {
        if(Message == "!runNotepad"){
            ChatWnd.SendMessage("/run c:\\windows\\notepad.exe");
        }
    }
   
}

EDIT:  i now wanted to try it,  but a message pops up and says it cant run the script because it is defective or i don't have privileges to run scripts

This post was edited on 06-27-2006 at 03:21 PM by novolo.
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
06-27-2006 03:11 PM
Profile PM Web Find Quote Report
The Brain
Junior Member
**

Avatar

Posts: 49
Reputation: 1
– / Male / Flag
Joined: Jan 2003
RE: EXECUTE APPLICATION
No, that won't work. The variable "Contact" isn't defined. In this situation it isn't so simple to check who the message is from. The limitations are explained in the scripting documentation.

You will have to get the Contacts from the ChatWnd Object, and then go through each Contact object, and check if your "Remote Control" account is there, and then if the Name of your "Remote Control" is the same as "Origin".

I have to go to bed now. Hopefully someone else can help you if you have more questions.
06-27-2006 03:31 PM
Profile PM Web Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. RE: EXECUTE APPLICATION
now?  does this work?

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
    var Contacts = ChatWnd.Contacts;
    var e = new Enumerator(Contacts);

    for(; !e.atEnd(); e.moveNext()){
        var Contact = e.item();
        if (Contact.Email == xxx@yyy.zzz) {
            if(Message == "!runNotepad"){
            ChatWnd.SendMessage("/run c:\\windows\\notepad.exe");
            }
        }
    }
   
   
}

[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
06-27-2006 03:38 PM
Profile PM Web Find Quote Report
Lou
Veteran Member
*****

Avatar

Posts: 2475
Reputation: 43
– / Male / Flag
Joined: Aug 2004
RE: EXECUTE APPLICATION
I suggest a simple login. You send !login <password> and if youre right, you can use the commands, if youre not right, you can't use them and therefore you can't do anything.
[Image: msghelp.net.png]
The future holds bright things in it\\\'s path, but only time will tell what they are and where they come from.
Messenger Stuff Forums
06-27-2006 03:59 PM
Profile PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » 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