yeah, this is how i ended up making it work for those of you who are looking for this function in the future. it's more logic than anything but... all you have to do is run the loop, run the conditional, and only increment the loop if the conditional returns what you want it to. here's my test script i'm working on for random password generation...

Code:
Break ON
$ = SetOption("WrapAtEOL","ON")
$ = SetOption("ASCII","On")

$PassLength = 10
$LowChar = 33
$HighChar = 126

$RandomNumSeed = SRnd(@MSECS)

While $x <= $PassLength
$num = Rnd(126)
if $num >= $LowChar AND $num <= $HighChar
$newNum = CHR($num)
$pw = $pw+$newNum
if $x = $PassLength
? $pw
endif
$x = $x + 1
endif
Loop



thanx for the help guys...


Edited by thepip3r (2005-07-18 09:51 PM)