EMAIL VERIFICATION |
Author: |
Message: |
novolo
Junior Member
L2Luna GM
Posts: 67
– / /
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
|
|
06-28-2006 12:49 PM |
|
|
novolo
Junior Member
L2Luna GM
Posts: 67
– / /
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....
|
|
06-28-2006 01:08 PM |
|
|
Bmw1000c
Junior Member
yay!
Posts: 45
44 / / –
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
|
|
06-28-2006 01:13 PM |
|
|
novolo
Junior Member
L2Luna GM
Posts: 67
– / /
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...
|
|
06-28-2006 01:21 PM |
|
|
Bmw1000c
Junior Member
yay!
Posts: 45
44 / / –
Joined: May 2004
|
RE: EMAIL VERIFICATION
uhuh ok, sorry =P
This post was edited on 06-28-2006 at 01:23 PM by Bmw1000c.
|
|
06-28-2006 01:23 PM |
|
|
Ezra
Veteran Member
Forgiveness is between them and God
Posts: 1960 Reputation: 31
37 / /
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 , tested it!
EDIT: changed it a little to make better use of cpu cycles
This post was edited on 06-28-2006 at 01:42 PM by Ezra.
|
|
06-28-2006 01:37 PM |
|
|
Bmw1000c
Junior Member
yay!
Posts: 45
44 / / –
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.
|
|
06-28-2006 01:43 PM |
|
|
novolo
Junior Member
L2Luna GM
Posts: 67
– / /
Joined: May 2006
|
O.P. RE: EMAIL VERIFICATION
great, IT WORKS GREAT!! thnx
|
|
06-28-2006 01:46 PM |
|
|
Mr. Bougo
Junior Member
Posts: 51
34 / / –
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 |
|
|
Ezra
Veteran Member
Forgiveness is between them and God
Posts: 1960 Reputation: 31
37 / /
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.
|
|
06-28-2006 03:15 PM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|