Hello, hello.
Take a look at the verbiage I have below. What I’m asking this page to do On Initialize is first check to see if the user input a password by looking in the registry. If they did, go to the bottom of the page (<font color=green>continue</font color=green>).
Now if the password was not input, it would ask for a password and then write it to the registry, so the next time the CD is used, it will see that the password was stored in the registry and bypass having to input that information again.
My problem is that the first part of this verbiage does not catch the fact that I do have the password installed.
Hello, hello.
Take a look at the verbiage I have below. What I’m asking this page to do On Initialize is first check to see if the user input a password by looking in the registry. If they did, go to the bottom of the page (<font color=green>continue</font color=green>).
Now if the password was not input, it would ask for a password and then write it to the registry, so the next time the CD is used, it will see that the password was stored in the registry and bypass having to input that information again.
My problem is that the first part of this verbiage does not catch the fact that I do have the password installed.
Help!
<font color=green>// Does the user have a valid password, If yes, continue to the bottom of this page.</font color=green>
Registry.SetValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data", "pwdbin", "%EnteredText%")
%DoesKeyExist% = Registry.DoesKeyExist ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data")
<font color=blue>IF (%DoesKeyExist% = FALSE)</font color=blue>
Registry.SetValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data", "pwdbin", "%EnteredText%")
GOTO ("false")
<font color=blue>ELSE</font color=blue>
GOTO ("continue")
<font color=blue>END IF</font color=blue>
<font color=blue>false</font color=blue>
<font color=green>// This action script will ask the user for a password, and give them 3 tries to get it right
// We'll give the user 3 tries</font color=green>
%attempts_remaining% = "3"
<font color=green>// While the user has any attempts remaining...</font color=green>
<font color=blue>WHILE (%attempts_remaining% > 0)</font color=blue>
<font color=green>// Prompt the user for their password</font color=green>
%EnteredText% = Dialog.GetInformation ("Attention", "Please enter your password:")
<font color=green>// Try to find that password in a global list</font color=green>
%ItemIndex% = GlobalList[Passwords].Find (%EnteredText%)
<font color=blue>IF (%ItemIndex% = -1)</font color=blue>
<font color=green>// The password is not valid (no matching password found)
// Does the user have any tries left?</font color=green>
<font color=blue>IF (%attempts_remaining% > 1)</font color=blue>
<font color=green>// The user still has attempts remaining
// Prompt the user to try again</font color=green>
%Result% = Dialog.MessageBox ("Incorrect Password", "Incorrect password. Please try...", Ok, Exclamation)
<font color=blue>ELSE</font color=blue>
<font color=green>// This was the user's last attempt
// All attempts were not valid, so exit the application</font color=green>
%Result% = Dialog.MessageBox ("Incorrect Password", "Password verification failed. ...", Ok, Exclamation)
Application.Exit
<font color=blue>END IF</font color=blue>
<font color=blue>ELSE</font color=blue>
<font color=green>// The password is valid</font color=green>
GOTO ("Password is valid")
<font color=blue>END IF</font color=blue>
<font color=green>// Decrease the number of attempts remaining by 1</font color=green>
%attempts_remaining% = Evaluate (%attempts_remaining% - 1)
<font color=blue>END WHILE</font color=blue>
<font color=blue>Password is valid</font color=blue>
%DoesKeyExist% = Registry.DoesKeyExist ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data")
<font color=blue>IF (%DoesKeyExist% = FALSE)</font color=blue>
Registry.CreateKey ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data")
<font color=blue>END IF</font color=blue>
Registry.SetValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data", "pwdbin", "%EnteredText%")
%Result% = Dialog.MessageBox ("", "Password confirmed.", Ok, None)
<font color=green>// The password-protected application continues on from here...</font color=green>
<font color=blue>continue</font color=blue>
Take a look at the verbiage I have below. What I’m asking this page to do On Initialize is first check to see if the user input a password by looking in the registry. If they did, go to the bottom of the page (<font color=green>continue</font color=green>).
Now if the password was not input, it would ask for a password and then write it to the registry, so the next time the CD is used, it will see that the password was stored in the registry and bypass having to input that information again.
My problem is that the first part of this verbiage does not catch the fact that I do have the password installed.
Hello, hello.
Take a look at the verbiage I have below. What I’m asking this page to do On Initialize is first check to see if the user input a password by looking in the registry. If they did, go to the bottom of the page (<font color=green>continue</font color=green>).
Now if the password was not input, it would ask for a password and then write it to the registry, so the next time the CD is used, it will see that the password was stored in the registry and bypass having to input that information again.
My problem is that the first part of this verbiage does not catch the fact that I do have the password installed.
Help!
<font color=green>// Does the user have a valid password, If yes, continue to the bottom of this page.</font color=green>
Registry.SetValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data", "pwdbin", "%EnteredText%")
%DoesKeyExist% = Registry.DoesKeyExist ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data")
<font color=blue>IF (%DoesKeyExist% = FALSE)</font color=blue>
Registry.SetValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data", "pwdbin", "%EnteredText%")
GOTO ("false")
<font color=blue>ELSE</font color=blue>
GOTO ("continue")
<font color=blue>END IF</font color=blue>
<font color=blue>false</font color=blue>
<font color=green>// This action script will ask the user for a password, and give them 3 tries to get it right
// We'll give the user 3 tries</font color=green>
%attempts_remaining% = "3"
<font color=green>// While the user has any attempts remaining...</font color=green>
<font color=blue>WHILE (%attempts_remaining% > 0)</font color=blue>
<font color=green>// Prompt the user for their password</font color=green>
%EnteredText% = Dialog.GetInformation ("Attention", "Please enter your password:")
<font color=green>// Try to find that password in a global list</font color=green>
%ItemIndex% = GlobalList[Passwords].Find (%EnteredText%)
<font color=blue>IF (%ItemIndex% = -1)</font color=blue>
<font color=green>// The password is not valid (no matching password found)
// Does the user have any tries left?</font color=green>
<font color=blue>IF (%attempts_remaining% > 1)</font color=blue>
<font color=green>// The user still has attempts remaining
// Prompt the user to try again</font color=green>
%Result% = Dialog.MessageBox ("Incorrect Password", "Incorrect password. Please try...", Ok, Exclamation)
<font color=blue>ELSE</font color=blue>
<font color=green>// This was the user's last attempt
// All attempts were not valid, so exit the application</font color=green>
%Result% = Dialog.MessageBox ("Incorrect Password", "Password verification failed. ...", Ok, Exclamation)
Application.Exit
<font color=blue>END IF</font color=blue>
<font color=blue>ELSE</font color=blue>
<font color=green>// The password is valid</font color=green>
GOTO ("Password is valid")
<font color=blue>END IF</font color=blue>
<font color=green>// Decrease the number of attempts remaining by 1</font color=green>
%attempts_remaining% = Evaluate (%attempts_remaining% - 1)
<font color=blue>END WHILE</font color=blue>
<font color=blue>Password is valid</font color=blue>
%DoesKeyExist% = Registry.DoesKeyExist ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data")
<font color=blue>IF (%DoesKeyExist% = FALSE)</font color=blue>
Registry.CreateKey ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data")
<font color=blue>END IF</font color=blue>
Registry.SetValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Action Examples\data", "pwdbin", "%EnteredText%")
%Result% = Dialog.MessageBox ("", "Password confirmed.", Ok, None)
<font color=green>// The password-protected application continues on from here...</font color=green>
<font color=blue>continue</font color=blue>
Comment