找回密码
 加入
搜索
查看: 1870|回复: 2

[GUI管理] 求助:如何不让这gui卡住?[已解决]

[复制链接]
发表于 2013-4-25 15:00:53 | 显示全部楼层 |阅读模式
本帖最后由 lin6051 于 2013-4-26 20:54 编辑
#include <Timers.au3>
dim $iTime0=_Timer_SetTimer('',1000,'test')
Example1()

Func Example1()
$hgui=GUICreate("My GUI") 
$Button_1 = GUICtrlCreateButton("测试按钮", 0, -1)
GUISetState(@SW_SHOW)
while 1
    Local $msg = GUIGetMsg()
        Select
            Case $msg = -3
                Exit
            Case $msg = $Button_1
                        msgbox(0,'','111')
        EndSelect
wend
EndFunc

Func test($hWnd, $iMsg, $iwParam, $ilParam)
_Timer_KillTimer('', $iTime0)
sleep(5000)  ;这里安装软件需要好些时间
EndFunc
[已经解决]事件模式为佳,多进程亦可
发表于 2013-4-25 22:25:50 | 显示全部楼层
多进程吧,就不卡了
发表于 2013-4-26 17:35:33 | 显示全部楼层
回复 1# lin6051


    用事件模式来写gui吧
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-17 12:44 , Processed in 0.073617 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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