试试下面的效果,看是否符合要求。#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
Example()
Func Example()
Local $Button_1, $Button_2, $Button_3, $Button_4, $msg
GUICreate("My GUI Button")
Opt("GUICoordMode", 2)
$Button_1 = GUICtrlCreateButton("Button_1", 10, 30, 90)
$Button_2 = GUICtrlCreateButton("Button_2", 0, -1)
$Button_3 = GUICtrlCreateButton("Button_3", 0, -1)
$Button_4 = GUICtrlCreateButton("Button_4", 0, -1)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
GUICtrlSendMsg($Button_4, $BM_CLICK, 0, 0)
Case $msg = $Button_2
GUICtrlSendMsg($Button_4, $BM_CLICK, 0, 0)
Case $msg = $Button_3
GUICtrlSendMsg($Button_4, $BM_CLICK, 0, 0)
Case $msg = $Button_4
Run('Notepad.exe')
EndSelect
WEnd
EndFunc
|