本帖最后由 landays 于 2010-9-29 16:23 编辑
#include <ButtonConstants.au3>;;;;;;;;;;;;;;;;程序2 监控程序1输入框的
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("程序2", 423, 188)
$Input1 = GUICtrlCreateInput("等待获取程序1输入框的信息", 48, 32, 313, 21)
$Input2 = GUICtrlCreateInput("", 48, 80, 313, 21)
$Button1 = GUICtrlCreateButton("Button1", 120, 120, 113, 41)
$Button2 = GUICtrlCreateButton("Button1", 248, 120, 113, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
WinSetOnTop($Form1, "", 1)
While 1
$Text = ControlGetText("程序1---全屏的", "", "Edit1")
If $Text = "" Then
GUICtrlSetData($Input2, "")
Else
GUICtrlSetData($Input2, $Text)
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button
Msgbox (0,0,GuictrlRead($Input2))
EndSwitch
WEnd
|