此字符串的用意是以此格式生成随机数:l =字母n = num,
LLNNN
相反,它给了我这个:
NN
或者有时候:
N
Local $destination = "C:\Users\Ryan\Pictures\Aurora.jpg"
If Random() < 1 Then
$Lettera = Chr(Random(Asc("A"), Asc("Z")))
Endif
If Random() < 1 Then
$Letterb = Chr(Random(Asc("A"), Asc("Z")))
Endif
If Random() < 1 Then
$Numbera = Chr(Random(48, 57, 1))
Endif
If Random() < 1 Then
$Numberb = Chr(Random(48, 57, 1))
Endif
If Random() < 1 Then
$Numberc = Chr(Random(48, 57, 1))
Endif
SplashImageOn("Splash", $destination, 312, 146, 450, 300, 1)
Sleep(9000)
SplashOff()
If MsgBox(1, "code generator", "Create a new key?") = 1 Then
msgBox(0, "code generator", "Your registry is:" + $Lettera + $Letterb + $Numbera + $Numberb + $Numberc)
EndIf
答案 0 :(得分:0)
您可以将所有内容分配为字符串值,然后将其全部追加到最后。
Local $destination = "C:\Users\Ryan\Pictures\Aurora.jpg"
If Random() < 1 Then
$Lettera = Chr(Random(Asc("A"), Asc("Z")))
Endif
If Random() < 1 Then
$Letterb = Chr(Random(Asc("A"), Asc("Z")))
Endif
If Random() < 1 Then
$Numbera = Chr(Random("48", "57", "1"))
Endif
If Random() < 1 Then
$Numberb = Chr(Random("48", "57", "1"))
Endif
If Random() < 1 Then
$Numberc = Chr(Random("48", "57", "1"))
Endif
SplashImageOn("Splash", $destination, 312, 146, 450, 300, 1)
Sleep(9000)
SplashOff()
If MsgBox(1, "code generator", "Create a new key?") = 1 Then
msgBox(0, "code generator", "Your registry is:" & $Lettera & $Letterb & $Numbera & $Numberb & $Numberc)
EndIf