#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("福彩.七乐彩选号器V1.0_卫和谐", 300, 240, 260, 160)
Local $aNum[30], $out[7], $d[7], $out2[7]
$Checkbox1 = GUICtrlCreateCheckbox("", 10, 8, 20, 20)
$Label1 = GUICtrlCreateLabel("排除的号码", 35, 5, 90, 20)
;GuiCtrlSetState(-1,$GUI_ONTOP)
GUICtrlSetFont(-1, 12, 800, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x00A820)
$Input1 = GUICtrlCreateInput("", 90, 36, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input2 = GUICtrlCreateInput("", 130, 36, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input3 = GUICtrlCreateInput("", 170, 36, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input4 = GUICtrlCreateInput("", 210, 36, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input5 = GUICtrlCreateInput("", 250, 36, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input21 = GUICtrlCreateInput("", 90, 66, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input22 = GUICtrlCreateInput("", 130, 66, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input23 = GUICtrlCreateInput("", 170, 66, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input24 = GUICtrlCreateInput("", 210, 66, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input25 = GUICtrlCreateInput("", 250, 66, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input31 = GUICtrlCreateInput("", 90, 96, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input32 = GUICtrlCreateInput("", 130, 96, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input33 = GUICtrlCreateInput("", 170, 96, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input34 = GUICtrlCreateInput("", 210, 96, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input35 = GUICtrlCreateInput("", 250, 96, 25, 25, $ES_NUMBER)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Label5 = GUICtrlCreateLabel("七乐彩=======选号结果=======七乐彩", 10, 135, 290, 16)
GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS")
$out[0] = GUICtrlCreateInput("", 50, 160, 28, 30, $ES_NUMBER)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xff0000)
$out[1] = GUICtrlCreateInput("", 80, 160, 28, 30, $ES_NUMBER)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xff0000)
$out[2] = GUICtrlCreateInput("", 110, 160, 28, 30, $ES_NUMBER)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xff0000)
$out[3] = GUICtrlCreateInput("", 140, 160, 28, 30, $ES_NUMBER)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xff0000)
$out[4] = GUICtrlCreateInput("", 170, 160, 28, 30, $ES_NUMBER)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xff0000)
$out[5] = GUICtrlCreateInput("", 200, 160, 28, 30, $ES_NUMBER)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xff0000)
$out[6] = GUICtrlCreateInput("", 230, 160, 28, 30, $ES_NUMBER)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xff0000)
$Button1 = GUICtrlCreateButton("开始", 40, 200, 97, 33, 0)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("停止", 170, 200, 97, 33, 0)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Quit()
Case $Button1
While 1
$x1 = Execute(GUICtrlRead($Checkbox1)) ;执行一个表达式(主要用于数学求值).
$s1 = Execute(GUICtrlRead($Input1))
$s2 = Execute(GUICtrlRead($Input2))
$s3 = Execute(GUICtrlRead($Input3))
$s4 = Execute(GUICtrlRead($Input4))
$s5 = Execute(GUICtrlRead($Input5))
$s21 = Execute(GUICtrlRead($Input21))
$s22 = Execute(GUICtrlRead($Input22))
$s23 = Execute(GUICtrlRead($Input23))
$s24 = Execute(GUICtrlRead($Input24))
$s25 = Execute(GUICtrlRead($Input25))
$s31 = Execute(GUICtrlRead($Input31))
$s32 = Execute(GUICtrlRead($Input32))
$s33 = Execute(GUICtrlRead($Input33))
$s34 = Execute(GUICtrlRead($Input34))
$s35 = Execute(GUICtrlRead($Input35))
If $x1 = 1 Then ;选择“排除的数”执行下面的循环
;For $i = 0 To 6
For $i = 0 To 6
$out[$i] = Random(1, 30, 1)
While $out[$i] = $s1 Or $out[$i] = $s2 Or $out[$i] = $s3 Or $out[$i] = $s4 Or $out[$i] = $s5 Or $out[$i] = $s21 Or $out[$i] = $s22 Or $out[$i] = $s23 Or $out[$i] = $s24 Or $out[$i] = $s25 Or $out[$i] = $s31 Or $out[$i] = $s32 Or $out[$i] = $s33 Or $out[$i] = $s34 Or $out[$i] = $s35
$out[$i] = Random(1, 30, 1)
;MsgBox(32, "123456", $out[$i])
WEnd
GUICtrlSetData($out[$i], $out[$i])
Next
;Next
Else
For $i = 0 To 29 ;-- 赋初值
$aNum[$i] = $i + 1
Next
For $i = 0 To 28 ;-- 重新排列
$r = Random($i, 29, 1)
$temp = $aNum[$i] ;-- 交换值
;MsgBox(32,"$aNum[$i]",$aNum[$i])
$aNum[$i] = $aNum[$r]
$aNum[$r] = $temp
Next
For $i = 0 To 6
GUICtrlSetData($out[$i], $aNum[$i])
Next
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button2 ;按下“停止”按钮死循环停止
ExitLoop
EndSwitch
WEnd
EndSwitch
WEnd
Func Quit()
GUISetState(@SW_HIDE)
; DllCall($Dll, "int:cdecl", "DeInitDecoration")
; DllCall($Dll, "int:cdecl", "RemoveSkin")
; DllClose($Dll)
; FileDelete(@TempDir & "\SkinCrafterDll.dll");退出后删除
; FileDelete(@TempDir & "\Zondar.skf")
Exit
EndFunc ;==>Quit