#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Opt("GUIOnEventMode", 1)
Global $start, $Num, $time, $timeS, $NumS = 1
Global $ini = @ScriptDir & "\DEFAULT.ini"
IniWrite($ini,"TEST","TIME","1200")
Local $time1 = IniRead ($ini,"TEST","TIME","err")
$Form1 = GUICreate("Form1", 659, 538, 192, 124)
GUISetBkColor(0x555555)
;$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Administrator\桌面\linux\111.jpg", 0, 0, 659, 538)
;GUICtrlSetState(-1,$GUI_DISABLE)
#cs
$Group1 = GUICtrlCreateGroup("Group1", 8, 152, 641, 361)
;GUICtrlSetData(-1, "port--->:")
$Label1 = GUICtrlCreateLabel("Port1", 16, 200, 68, 17)
$Label2 = GUICtrlCreateLabel("Port2", 16, 232, 68, 17)
$Label3 = GUICtrlCreateLabel("Port3", 16, 264, 68, 17)
$Label4 = GUICtrlCreateLabel("Port4", 16, 304, 68, 17)
$Label5 = GUICtrlCreateLabel("Port5", 16, 344, 68, 25)
$Label6 = GUICtrlCreateLabel("Port6", 16, 392, 60, 17)
$Label7 = GUICtrlCreateLabel("Port7", 16, 432, 68, 17)
$Label8 = GUICtrlCreateLabel("Port8", 16, 472, 68, 17)
$Label9 = GUICtrlCreateLabel("Port9", 352, 200, 36, 17)
$Label10 = GUICtrlCreateLabel("Port10", 352, 240, 42, 17)
$Label11 = GUICtrlCreateLabel("Port11", 352, 280, 42, 17)
$Label12 = GUICtrlCreateLabel("Port12", 352, 312, 42, 17)
$Label13 = GUICtrlCreateLabel("Port13", 352, 352, 42, 17)
$Label14 = GUICtrlCreateLabel("Port14", 352, 384, 42, 17)
$Label15 = GUICtrlCreateLabel("Port15", 352, 424, 42, 17)
$Label16 = GUICtrlCreateLabel("Port16", 352, 464, 42, 17)
#ce
$Button1 = GUICtrlCreateButton("开始烧录", 16, 88, 81, 25)
;GUICtrlSetBkColor(-1,0x555555)
$Button2 = GUICtrlCreateButton("退出", 168, 88, 89, 25)
$Label17 = GUICtrlCreateLabel("", 400, 8,180,141)
GUICtrlSetFont(-1, 12, 800, 0)
GUICtrlSetColor(-1, 0x19BD0A)
GUICtrlCreateLabel("烧录次数: ", 450, 110,90,45)
GUICtrlSetFont(-1, 12, 800, 0)
GUICtrlSetColor(-1, 0x2012E2)
$Label18 = GUICtrlCreateLabel("_?", 535, 109, 42, 17)
GUICtrlSetFont(-1, 12, 800, 0)
GUICtrlSetColor(-1, 0xE02ECE)
GUISetState(@SW_SHOW)
G
While 1
If $start And $timeS < 1 Then _Do_Something()
Sleep(10)
WEnd
Func CountDown()
If $NumS = $Num And $Num <> "" Then $start = False
AdlibUnRegister('CountDown')
EndIf
EndFunc ;==>CountDown
Func SpecialEvents()
Switch @GUI_CtrlId
Case $GUI_EVENT_CLOSE
Else
; execute codes after each countdown.
EndFunc ;==>_Do_Something
想实现的是: 1.打开本程序 就设定 DEFAULT.ini 中time为1200 S(这个原始的INI文件中没有这个字段,所以要先写入);