本帖最后由 17911 于 2009-5-26 12:17 编辑
本人菜鸟,在脚本里加入AdlibEnable调用自定义函数ddd()后窗口不能正常关闭了,点关闭x没有反应,请帮忙解决一下
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <string.au3>
$Form1 = GUICreate("", 190, 240)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 190, 190, $ES_WANTRETURN)
$Button1 = GUICtrlCreateButton("显示", 10, 200, 150, 30)
GUISetState(@SW_SHOW)
AdlibEnable("ddd",10000)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$a = GUICtrlRead($Edit1)
$b = StringLen($a)
For $i = 1 To Round($b / 30)
If $i = 1 Then
$a = _StringInsert($a, @CR, $i * 30)
Else
$a = _StringInsert($a, @CR, $i * 30 + ($i - 1))
EndIf
Next
MsgBox(0, "", $a)
EndSwitch
WEnd
Func ddd()
Dim $i
$i=5
for $i=5 to $i^1000 Step 12
MsgBox(0+64,"你好","请注意休息,你已经上网"&$i&"秒",2)
Sleep(10000)
Next
EndFunc |