huoqingpo 发表于 2011-5-7 10:24:45

终止循环问题

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 380, 286, 192, 114)
$Input1 = GUICtrlCreateInput("", 128, 96, 25, 21)
$Input2 = GUICtrlCreateInput("", 160, 96, 25, 21)
$Button1 = GUICtrlCreateButton("开始", 128, 200, 57, 33)
$Button2 = GUICtrlCreateButton("停止", 200, 200, 57, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###




While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                IniWrite ( "client.ini", "开关", "值", "开" )

             Do
                        $r=IniRead ( "client.ini", "开关", "值", "" )
                        $a=Ceiling (Random ( 0,7,1 ))
                        $b=Ceiling (Random ( 0,7,1 ))
                GUICtrlSetData($Input2,$a)
            GUICtrlSetData($Input1,$b)
                  Until $r="关"
          Case $Button2
                  IniWrite ( "client.ini", "开关", "值", "关" )
        EndSwitch
WEnd
开始 按钮下是一个死循环
停止 按钮下是写入INI文件··停止死循环的··
但是写不进去··

这个怎么解决啊·
或者有别的思路·给个·

3mile 发表于 2011-5-7 15:13:37

http://www.autoitx.com/forum.php?mod=redirect&goto=findpost&ptid=22703&pid=275013&fromuid=7639113

easefull 发表于 2011-5-7 18:32:55

http://www.autoitx.com/thread-23841-1-1.html

huoqingpo 发表于 2011-5-8 09:31:35

很好···问题已经解决·
页: [1]
查看完整版本: 终止循环问题