Posts: 74
Threads: 15
Joined: Nov 2005
with the saving feature, it's a nice program. I'll use it alot. AND I would need it saved, because I forget my pws alot
y name is Nobody, and nobody's perfect. So now I am perfect
98% of the teenage population smokes or has smoked pot. If you're one of the 2% who hasn't, copy and paste this in your signature.
Posts: 1,956
Threads: 65
Joined: Jun 2003
Hybr!d, I thought about the program in my last post during lunch, and it can be simplified even further. No need to put the characters into the t() table, since the string of characters in itself can be treated as a table. Here's the new, simplified code:
Code:
rem Generate a random password.
defint a-z
RANDOMIZE TIMER
Chars$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
NChars=len(Chars$) 'This allows later add or delete of characters
print "Enter length of password desired (max=20) ";
input plen
if plen<1 or plen>20 then print "Invalid length":system
pw$=""
randlower=1
randupper=NChars
for x = 1 to plen
rand = int(RND * (randupper - randlower + 1)) + randlower
pw$=pw$+mid$(Chars$, rand,1) 'Pickup a char from random position in Chars$
next x
print "The random password is ";pw$
system
*****
EDIT: Just noticed that I haad left out the $ on:
NChars=len(Chars$) 'This allows later add or delete of characters
*****
Posts: 33
Threads: 8
Joined: Jan 2006
Moneo thanks for that man.. Your a real champ
img]http://img213.imageshack.us/img213/6104/sig1jb.gif[/img]
Posts: 684
Threads: 64
Joined: May 2004
He sure is.
quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Posts: 1,956
Threads: 65
Joined: Jun 2003
Shucks thanks, guys.
BTW, I edited and fixed a little problem on my last post. See above.
*****