Generating a random code

Results 1 to 2 of 2

Thread: Generating a random code

  1. #1
    Join Date
    Dec 1969

    Default Generating a random code

    I need to generate a random code that is 8 characters long. When I looked through, I found multiple topics on how to find the numeric position of a character within a string. For example, in the string "This is a test", I could search for the character "h" and have it output the number 2. However, what I want to do is the opposite: find a character based on its numeric position in the string. For example, if my string is:<BR><BR>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm nopqrstuvwxyz0123456789<BR><BR>I want to choose a random number between 1 and 62 (the number of characters in the string above) and store that character into an array based on its numeric position in the string. If the random number is 33, I want it to store g into the array and then reiterate through 8 times to give me a randomly generated 8 character code.<BR><BR>Any ideas on how to accomplish this, or maybe a better/easier way of getting a random code? Thanks for your help!<BR><BR>-eric

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default R&D randomize and RND function <eop>


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts