#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <array.au3>
Global Const $haoma[33] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33]
Dim $haomax[33],$haomay[1],$array[1][3] ;$haomax[33]定义复选框
Local $i, $a = 50, $b = 80, $j,$x1,$x2,$y1,$y2,$suoyin,$z ;$a\$b表示界面上的距离 $i\$j定义复选框文本以及字体大小,$x/$x1\y1\y2表示输入的组数的值,$suoyin表示被选择的数组最后一个数值的下标,$z无意义
$anzhuang = GUICreate("彩票幸运分 QQ:1375030119", 800, 600)
Func duqu() ;读取被选择的元素$haomay
Dim $haomay[1]
Local $xx,$yy=0
For $xx=0 To 32 Step 1
If GUICtrlRead($haomax[$xx]) == $gui_checked Then
ReDim $haomay[$yy+1]
$haomay[$yy] = GUICtrlRead($haomax[$xx], 1)
$yy = $yy + 1
EndIf
Next
Return $haomay
EndFunc
Func sange($m)
Local $i1,$i2,$i3,$num1,$num2,$num3,$k=0
For $i1 = 0 To $m Step 1
$num1 = $haomay[$i1]
For $i2 = 1 To $m Step 1
If $i2 > $i1 Then
$num2 = $haomay[$i2]
For $i3 = 2 To $m Step 1
If $i3 > $i2 Then
$num3 = $haomay[$i3]
ReDim $array[$k+1][3]
$array[$k][0]=$num1
$array[$k][1]=$num2
$array[$k][2]=$num3
$k=$k+1
EndIf
Next
EndIf
Next
Next
Return $array
EndFunc
Func _Array2DGetRow(ByRef $avArray, $row)
Local $rowstring = ''
For $j = 0 To UBound($avArray, 2) - 1
If $avArray[$row][$j] Then $rowstring &= '|' & $avArray[$row][$j]
Next
Return StringSplit(StringTrimLeft($rowstring, 1), '|', 2)
EndFunc ;==>_Array2DGetRow
$label1 = GUICtrlCreateLabel("请选择你需要的号码:", 50, 10, 200, 50)
GUICtrlSetFont($label1, 15)
GUICtrlSetColor($label1, 0xff0000)
For $i = 0 To 32 Step 1
$haomax[$i] = GUICtrlCreateCheckbox($i + 1, $a, $b, 50, 30)
$a = $a + 65
If $a > 700 Then
$a = 50
$b = $b + 100
EndIf
Next
For $j = 0 To 32 Step 1
GUICtrlSetFont($haomax[$j], 12)
Next
$label2=GUICtrlCreateLabel("输入组数",50,360,50,30)
$y1=GUICtrlCreateInput($x1,110,350,80,30)
$label3=GUICtrlCreateLabel("输入分数", 600, 360, 50, 30)
$y2=GUICtrlCreateInput($x2, 650, 350, 80, 30)
$quxiao = GUICtrlCreateButton("重新选择", 50, 540, 100, 50)
$kaishi = GUICtrlCreateButton("开始", 650, 540, 100, 50)
GUISetState(@SW_SHOW, $anzhuang)
While 1
$msg = GUIGetMsg()
If $msg = $gui_event_close Then
ExitLoop
EndIf
Select
Case $msg=$kaishi
$haomay=duqu()
$jieguo=sange(UBound($haomay)-1) ;得到二维数组的结果$jieguo[$k][3]
_Array2DGetRow($jieguo,UBound($jieguo))
EndSelect
WEnd
GUIDelete($anzhuang)
麻烦你看一下这段代码