Dim $i, $b, $a
Dim $List[3], $ok[4], $positon
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WindowsConstants.au3>
$positon = WinGetPos("新建文本文档.txt - 记事本", "")
If Not @error Then
$Form1 = GUICreate("Form1", 362, 269, $positon[0] + $positon[2] + 3, $positon[1] + 4)
$Input1 = GUICtrlCreateInput("Input1", 8, 8, 137, 50)
$List[1] = GUICtrlCreateList("", 160, 0, 193, 152)
GUICtrlSetData($List[1], "123")
GUICtrlSetData($List[1], "345")
GUICtrlSetData($List[1], "789")
$List[2] = GUICtrlCreateList("", 160, 160, 193, 153)
GUICtrlSetData($List[2], "bhg")
GUICtrlSetData($List[2], "llj")
GUICtrlSetData($List[2], "87u")
$ok[1] = GUICtrlCreateButton("ok1", 20, 80, 30, 30)
$ok[2] = GUICtrlCreateButton("ok2", 20, 150, 30, 30)
$ok[3] = GUICtrlCreateButton("ok3", 20, 200, 30, 30)
;GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")
GUISetState()
EndIf
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
$status = WinGetState("新建文本文档.txt - 记事本", "")
;MsgBox(0,0,$status)
If BitAnd($status, 16) Then WinSetState($Form1,"",@SW_MINIMIZE)
If BitAnd($status, 8) Then WinSetState($Form1,"",@SW_RESTORE)
Sleep(50)
WEnd
|