From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-18-2009 07:52 AM
I am creating a password application and so far I have made it work but it will not allow me to have an unlimited amount of user name and passwords how can I make this possible?
here is my VI so far
thanks,
Solved! Go to Solution.
06-18-2009 08:20 AM
Harold,
Replace the AND and the case structure in the OK Button case with an =? comparison.
If you change the Search arrays to indicators and move them outside the event structure, you do not need the local variables. As indicators someone cannot change the values!
Are you aware that you can use the Password display mode on the string controls/indicators so the user sees **** as passwords are entered?
Lynn
06-18-2009 08:23 AM
What is your limit? I just added 130 until my finger got tired.
As a side note, I found some issues which I assume you're going to adress. But just in case I will list them here. I can enter a username without a password. And I can add the same user name more than once.
06-18-2009 08:28 AM
06-18-2009 09:22 AM
what if I want to hook this up to a case statment so that when it is false it shows a message box I tried to do this but because they both equaled -1 it was true.......
06-18-2009 09:28 AM
Harold,
Test for the -1 before testing for equality.
Lynn
06-18-2009 04:27 PM
ok cool so here is the password.4 completed:)
I think lol
06-19-2009 08:31 AM
Harold,
If you get a duplicate entry, it clears the entire array. Is that what you wanted?
1. Do not use the Default if unwired option on the case structure for the arrays. Wire them straight through.
2. Move the build array into the case where no match was detected.
3. Use local variables to clear the string controls rather than property nodes. This is one of the few appropriate uses for locals.
4. The timeout event case is not used. It can be removed.
5. Use of a while loop (or in LV 8.6 the conditional stop for loop) for the match will stop the loop as soon as a duplicate is found rather than searching the entire array. For small arrays it does not make much difference but it could be significant on large arrays.
Note: the Searchnames2 array is just to watch what was going on.
Lynn
06-19-2009 08:42 AM
yes after further testing i realized that and fixed it I also added a few other thind such as the password must have atleast 6 characters and if you enter in the wrong username and/or password the password application will stop.
thank you for the example of your code it works great.
06-19-2009 08:51 AM
I can type any number of spaces and create a user name. Probably not desirable.