Page 1 of 1

help me please ^^

Posted: May 27th, 2011, 5:58 pm
by XANT0
hello everyone :)


I want to know how to do a validation code to my script :cry:
I try this:
var password;
var code1 = "my first pass";
var code2 = "my 2nd pass";
code3 var = "my 3rd pass";




password = prompt ("Enter your serial number :","");

if (password == code1 | | code2 == password | | password == code3) {
Run (this);
password = false;

alert ("Your serial number is \ n \ n \ n" + "OK! \ n \ n ", "C-replicator") / / file to open if password is correct
Else {}


alert ("Your serial number is \ n \ n \ n" + "WRONG! " \ n \ n ","C-replicator ") / / file to load if password is incorrect
}



but I have a problem
every time I open AE I must enter the password.

help me please! thank you!

and sorry for my English :mrgreen:

Re: help me please ^^

Posted: June 17th, 2011, 12:39 pm
by lloydalvarez
Once a valid password is entered you should store it somewhere. When you run the script it should only ask for the password only if the one stored one is not valid.

Re: help me please ^^

Posted: June 17th, 2011, 2:46 pm
by XANT0
Thank you very much ^^