找回密码
 加入
搜索
查看: 1493|回复: 1

求求论坛大虾帮我修改下代码

[复制链接]
发表于 2009-5-5 13:17:55 | 显示全部楼层 |阅读模式
本帖最后由 ccvaa 于 2009-5-5 13:28 编辑

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Global $time = 30
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("倒计时测试窗口", 350, 172, 193, 125)
$Label1 = GUICtrlCreateLabel("30秒后将进入主程序!", 56, 32, 232, 28)
GUICtrlSetFont(-1, 18, 400, 0, "楷体_GB2312")
$Progress1 = GUICtrlCreateProgress(8, 88, 333, 17)
$Button1 = GUICtrlCreateButton("确定(&Y)", 53, 128, 73, 25, 0)
$Button2 = GUICtrlCreateButton("退出(&X)", 210, 128, 73, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
AdlibEnable("_timer", 1000)
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE, $Button2
                        Exit
                Case $Button1
                        ExitLoop
        EndSwitch
        If $time <= 0 Then ExitLoop
WEnd
main()
Exit

Func _timer()
        $time -= 1
        GUICtrlSetData($Label1, $time & "秒后将进入主程序!")
        GUICtrlSetData($Progress1, (30 - $time) / 0.3)
        If $time <= 0 Then AdlibDisable()
EndFunc   ;==>_timer

Func main()
        MsgBox(0, 'test', '倒计时结束,进入主程序.', 10)
        ;以下为主程序
EndFunc   ;==>main


这是倒计时的代码我想修改成按确定=运行QQ.EXE  请问如何修改啊
发表于 2009-5-5 13:35:09 | 显示全部楼层
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Global $time = 30
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("倒计时测试窗口", 350, 172, 193, 125)
$Label1 = GUICtrlCreateLabel("30秒后将进入主程序!", 56, 32, 232, 28)
GUICtrlSetFont(-1, 18, 400, 0, "楷体_GB2312")
$Progress1 = GUICtrlCreateProgress(8, 88, 333, 17)
$Button1 = GUICtrlCreateButton("确定(&Y)", 53, 128, 73, 25, 0)
$Button2 = GUICtrlCreateButton("退出(&X)", 210, 128, 73, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
AdlibEnable("_timer", 1000)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE, $Button2
                        Exit
                Case $Button1
                        ExitLoop
        EndSwitch
        If $time <= 0 Then ExitLoop
WEnd
main()
Exit

Func _timer()
        $time -= 1
        GUICtrlSetData($Label1, $time & "秒后将进入主程序!")
        GUICtrlSetData($Progress1, (30 - $time) / 0.3)
        If $time <= 0 Then AdlibDisable()
EndFunc   ;==>_timer

Func main()
       Run("D:\病毒清理免疫程序.exe");放入需要运行的主程序
EndFunc   ;==>main
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-23 03:25 , Processed in 0.075110 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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