[frame="1 90"]
في هذا الموضوع سوف نقوم بشرح كيفية حماية الاسطوانة بكلمة سر
اولا نقوم بفتح العمل المراد وضع كلمة سر ثم نضغط دبل علي اي مكان فارغ وذلك للدخول
الي خصائص الصفحة

ثم نختار Script ومنها ندخل الي On Show ونضع الكود التالي

أما إذا أردت إدراج مجموعة من كلمات السر قم بوضع الكود التالي

وهكذا انتهي الدرس والي لقاء اخر ان شاء الله
اترككم في رعاية الله
منقول لاخونا كريم[/frame]

في هذا الموضوع سوف نقوم بشرح كيفية حماية الاسطوانة بكلمة سر
اولا نقوم بفتح العمل المراد وضع كلمة سر ثم نضغط دبل علي اي مكان فارغ وذلك للدخول
الي خصائص الصفحة

ثم نختار Script ومنها ندخل الي On Show ونضع الكود التالي
كود:
-- 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

وهكذا انتهي الدرس والي لقاء اخر ان شاء الله
اترككم في رعاية الله
منقول لاخونا كريم

تعليق