找回密码
 加入
搜索
查看: 1895|回复: 3

[AU3基础] 终止循环问题

[复制链接]
发表于 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文件··停止死循环的··
但是写不进去··

这个怎么解决啊·
或者有别的思路·给个·
发表于 2011-5-7 15:13:37 | 显示全部楼层
发表于 2011-5-7 18:32:55 | 显示全部楼层
 楼主| 发表于 2011-5-8 09:31:35 | 显示全部楼层
很好···问题已经解决·
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 08:00 , Processed in 0.074431 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表