帮助里说的很清楚了。
在GUI上创建 Dummy(虚拟) 控件
这种控件可接收由 GUICtrlSendToDummy 发送的消息,它将"通知(notify)" 当作正常值, 而 GUISendToDummy 发送的值可由 GUICtrlRead 来读取.#include <GUIConstantsEx.au3>
Opt('MustDeclareVars', 1)
Example()
Func Example()
Local $user, $button, $cancel, $msg
GUICreate("Dummy虚拟控件", 250, 200, 100, 200)
GUISetBkColor(0x00E0FFFF) ; 设置背景色
$user = GUICtrlCreateDummy()
$button = GUICtrlCreateButton("事件", 75, 170, 70, 20)
$cancel = GUICtrlCreateButton("取消", 150, 170, 70, 20)
GUISetState()
Do
$msg = GUIGetMsg()
Select
Case $msg = $button
GUICtrlSendToDummy($user)
Case $msg = $cancel
GUICtrlSendToDummy($user)
Case $msg = $user
; 关闭前的特定动作语句
; ...
Exit
EndSelect
Until $msg = $GUI_EVENT_CLOSE
EndFunc ;==>Example
|