#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$Button1 = GUICtrlCreateButton("Button1", 88, 40, 89, 57)
$Button2 = GUICtrlCreateButton("Button2", 264, 56, 129, 57)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
cs()
Case $Button2
MsgBox(0, 0, "我是按钮2")
cs2()
EndSwitch
WEnd
Func cs()
;;;;;;;;这里我执行了好多的命令 ,然后在这里引用 $Button2 的执行命令!
;;;...
$a = 1
If $a = 1 Then
For $i = 1 To 10
;;;执行 $Button2 中的内容!
cs2()
Next
EndIf
EndFunc ;==>cs
|