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

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

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. EMAIL VERIFICATION
Hi,   i made a script so that i could run apps remotely on my computer,  its simple actually,   the thing is,   i want it o be able only to one email...   my secconadary account...

here's the code (doesn't work)   anyone knows why?

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
    var Contact = ChatWnd.Contacts;
    var e = new Enumerator(Contact);
    if (e < 2){
        if (Contact.Email == 'remotocasa@hotmail.com') {
            //PROGRAMAS
            if(Message == "!runNotepad"){
            ChatWnd.SendMessage("/run c:\\windows\\notepad.exe");
            ChatWnd.SendMessage("Notepad open");
            }
            if(Message == "!runMusic"){
            ChatWnd.SendMessage("/run c:\\music.mp3");
            ChatWnd.SendMessage("Listenning music");
            }
            if(Message == "!runNudge"){
            ChatWnd.SendMessage("/nudge");
            }
        }
    }
}

if i remove the email verification it works fine...      but i dont seem to be able to make this email thing to work!!
HELLPP
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
06-28-2006 12:49 PM
Profile PM Web Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. RE: EMAIL VERIFICATION
Ok,  i just tested it,  and it doesn't work either   with  if(Origin == 'email@hotmail.com'){

so,  it has to be something else....
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
06-28-2006 01:08 PM
Profile PM Web Find Quote Report
Bmw1000c
Junior Member
**

Avatar
yay!

Posts: 45
44 / Male / –
Joined: May 2004
RE: EMAIL VERIFICATION
and the "else"?
i don't know very much of programming, but i think that is there a "if", must to ve a "else", too
I'm portuguese!
06-28-2006 01:13 PM
Profile E-Mail PM Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. RE: EMAIL VERIFICATION
not always,  you have to put an else if you want something to happen when the requirements are not met...   in this case i don't put an else because if not,  everyone who talks to me will receive whatever is in the else...  and i don't want that...
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
06-28-2006 01:21 PM
Profile PM Web Find Quote Report
Bmw1000c
Junior Member
**

Avatar
yay!

Posts: 45
44 / Male / –
Joined: May 2004
RE: EMAIL VERIFICATION
uhuh ok, sorry =P

This post was edited on 06-28-2006 at 01:23 PM by Bmw1000c.
I'm portuguese!
06-28-2006 01:23 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: EMAIL VERIFICATION
code:
function OnEvent_Initialize(MessengerStart)
{
}

function OnEvent_Uninitialize(MessengerExit)
{
}

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
  var Contacts = ChatWnd.Contacts;
 
  if (Contacts.Count == 1)
  {
    var e = new Enumerator(Contacts);
    for (;!e.atEnd();e.moveNext())
    {
      var Contact = e.item();
      if (Contact.Email == 'xxx@yyy.zzz')
      {
        //PROGRAMAS
        if (Message == "!runNotepad")
        {
          ChatWnd.SendMessage("/run c:\\windows\\notepad.exe");
          ChatWnd.SendMessage("Notepad open");
        }
        if (Message == "!runMusic")
        {
          ChatWnd.SendMessage("/run c:\\music.mp3");
          ChatWnd.SendMessage("Listenning music");
        }
        if (Message == "!runNudge")
        {
          ChatWnd.SendMessage("/nudge");
        }
      }
    }
  }
}

That will work :D, tested it!

EDIT: changed it a little to make better use of cpu cycles :P

This post was edited on 06-28-2006 at 01:42 PM by Ezra.
[Image: 1-0.png]
             
06-28-2006 01:37 PM
Profile PM Web Find Quote Report
Bmw1000c
Junior Member
**

Avatar
yay!

Posts: 45
44 / Male / –
Joined: May 2004
RE: EMAIL VERIFICATION
it works!

edit

quote:
function OnEvent_Initialize(MessengerStart)
{
}

function OnEvent_Uninitialize(MessengerExit)
{
}

this isn't necessary

edit2: how can i had allow 2 mails?

This post was edited on 06-28-2006 at 01:54 PM by Bmw1000c.
I'm portuguese!
06-28-2006 01:43 PM
Profile E-Mail PM Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. RE: EMAIL VERIFICATION
great,   IT WORKS GREAT!!   thnx  :D
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
06-28-2006 01:46 PM
Profile PM Web Find Quote Report
Mr. Bougo
Junior Member
**


Posts: 51
34 / Male / –
Joined: Jun 2006
RE: RE: EMAIL VERIFICATION
quote:
edit2: how can i had allow 2 mails?


change the
code:
if (Contact.Email == 'xxx@yyy.zzz')
to
code:
if (Contact.Email == 'xxx@yyy.zzz' || Contact.Email == "aaa@bbb.ccc")

This post was edited on 06-28-2006 at 03:03 PM by Mr. Bougo.
06-28-2006 03:02 PM
Profile 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: EMAIL VERIFICATION
Or use a fancy function like this:

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
  var Contacts = ChatWnd.Contacts;
  var e = new Enumerator(Contacts);
  if (Contacts.Count == 1)
  {
    for (;!e.atEnd();e.moveNext())
    {
      var Contact = e.item();
      switch (Contact.Email)
      {
        case "xxx@yyy.zzz":
          run(ChatWnd, Message);
          break;
        case "xxx2@yyy.zzz":
          run(ChatWnd, Message);
          break;
      }
    }
  }
}

function run(ChatWnd, Message)
{
  //PROGRAMAS
  if (Message == "!runNotepad")
  {
    ChatWnd.SendMessage("/run c:\\windows\\notepad.exe");
    ChatWnd.SendMessage("Notepad open");
  }
  if (Message == "!runMusic")
  {
    ChatWnd.SendMessage("/run c:\\music.mp3");
    ChatWnd.SendMessage("Listenning music");
  }
  if (Message == "!runNudge")
  {
    ChatWnd.SendMessage("/nudge");
  }
}

This post was edited on 06-28-2006 at 03:16 PM by Ezra.
[Image: 1-0.png]
             
06-28-2006 03:15 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