abohmam
08-01-2010, 02:11 AM
:slaam:
كيفية حماية تشغيل التجميعة بكلمة سر
http://i76.photobucket.com/albums/j5/karim_dz/image001.gif
-- the 'correct' password
real_password = "password";
-- prompt the user to enter a password
user_password = Dialog.PasswordInput("Password", "Please enter the password: ", MB_ICONQUESTION);
-- compare the user's password to the 'correct' password.
-- If the user supplies the wrong password, exit the program.
if real_password ~= user_password then
Application.Exit();
end
أما إذا أردت إدراج مجموعة من كلمات السر قم بوضع الكود التالي
--assume the user enters a bad password
correct_password = false;
-- the 'correct' password
real_passwords = {"password", "password2", "3rdPassword"};
-- prompt the user to enter a password
user_password = Dialog.PasswordInput("Password", "Please enter the password: ", MB_ICONQUESTION);
-- compare the user's password to the 'correct' password.
for j in real_passwords do
if real_passwords[j] == user_password then
correct_password = true;
end
end
--if the password was bad, exit
if not correct_password then
Application.Exit();
end
http://i76.photobucket.com/albums/j5/karim_dz/image002.gif
منقول عن شرح الأخ /karim
كيفية حماية تشغيل التجميعة بكلمة سر
http://i76.photobucket.com/albums/j5/karim_dz/image001.gif
-- the 'correct' password
real_password = "password";
-- prompt the user to enter a password
user_password = Dialog.PasswordInput("Password", "Please enter the password: ", MB_ICONQUESTION);
-- compare the user's password to the 'correct' password.
-- If the user supplies the wrong password, exit the program.
if real_password ~= user_password then
Application.Exit();
end
أما إذا أردت إدراج مجموعة من كلمات السر قم بوضع الكود التالي
--assume the user enters a bad password
correct_password = false;
-- the 'correct' password
real_passwords = {"password", "password2", "3rdPassword"};
-- prompt the user to enter a password
user_password = Dialog.PasswordInput("Password", "Please enter the password: ", MB_ICONQUESTION);
-- compare the user's password to the 'correct' password.
for j in real_passwords do
if real_passwords[j] == user_password then
correct_password = true;
end
end
--if the password was bad, exit
if not correct_password then
Application.Exit();
end
http://i76.photobucket.com/albums/j5/karim_dz/image002.gif
منقول عن شرح الأخ /karim