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

KODA设计器与功能代码整合问题

[复制链接]
发表于 2009-4-22 15:06:30 | 显示全部楼层 |阅读模式
各位 小弟现在才玩au3 用koda设计了一个简单的窗体,有一个进度条,和一个按钮,在点下按钮后执行
If ProcessExists("groove.exe") Then
    ProcessClose("groove.exe")
EndIf
Sleep(1000) ;five seconds
DirCopy(@homepath&"\Local Settings\Application Data\Microsoft\Office\Groove", "d:\Backups\Groove", 1)
这段代码 我应该怎么做呢 加到窗体代码的哪个位置呢。请各位指点下

以下为窗体代码
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Groove = GUICreate("Groove  帐户信息备份工具      By---破剑", 501, 243, 192, 124)
$jindutiao = GUICtrlCreateProgress(24, 48, 441, 105)
$Button1 = GUICtrlCreateButton("开始备份", 168, 176, 105, 49, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

                Case $Groove
                Case $Groove
                Case $Groove
                Case $Groove
                Case $Button1
        EndSwitch
WEnd
发表于 2009-4-25 02:33:24 | 显示全部楼层
$nMsg = GUIGetMsg()
这里不停的得到系统信息 就是看用户进行了什么操作
Case $Button1
这里就是 当用户按了 $Button1的时候进行的操作

所以你那段放这下面
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-23 05:28 , Processed in 0.068028 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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