Func randNameArray()
$firstname = randName() & Chr(Random(Asc("a"), Asc("z"), 1))
$lastname = randName() & Chr(Random(Asc("a"), Asc("z"), 1))
$emailname = $firstname & $lastname
;MsgBox(64,"提示",$emailname,100)
While StringLen($emailname) > Random(10,14,1)
$pos = Random(1,StringLen($emailname)-1)
$emailname = StringMid ($emailname,1,$pos-2) & StringMid ($emailname,$pos)
WEnd
;MsgBox(64,"提示",$emailname,100)
$password = "520" & randName() & Chr(Random(Asc("a"), Asc("z"), 1)) & Chr(Random(Asc("a"), Asc("z"), 1))
$birthyear = "19"&Random(60,85, 1)
Dim $result[5] = [$firstname,$lastname,$emailname,$password,$birthyear]
Return $result
EndFunc ;==>randName
func randName()
Dim $namearray1[356] = [xxxx,xxxx,xxxx]
endfunc
这是我自己写的一个完整的例子。 想楼主要的就是这个吧。
有前面定义几个变量 , 后面就用定义几个数组, 我随便写了一个。 |