#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 321, 94, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 24, 8, 81, 33)
$Button2 = GUICtrlCreateButton("Button2", 152, 8, 81, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$a = 0
$b = 0
While 1
If $a + $b = 2 Then
MsgBox(0,"","Done")
$a = 0
$b = 0
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$a = 1
Case $Button2
$b = 1
EndSwitch
WEnd
这样貌似可以 |