#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=C:\WINDOWS\system32\SHELL32.dll
#AutoIt3Wrapper_Res_Description=在线机器信息查看(机器号,线号,产品,IP,软件版本)
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=Copy Right 2011
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <File.au3>
#Include <Array.au3>
#include <FTPEx.au3>
#Region ### START Koda GUI section ### Form=d:\autoit3\koda formdesigner\koda_1.7.3.0\forms\软件检测器.kxf
Opt('GUIOnEventMode', 1)
Dim $Computer[1019],$Pic[1019]
$Form1 = GUICreate("客户机运行状态", 1438, 830, 1, 1)
GUISetOnEvent(-3, '_exit')
$Computer[1001] = GUICtrlCreateLabel("1001", 60, 68, 25, 10)
$Computer[1002] = GUICtrlCreateLabel("1002", 60, 92, 25, 10)
$Computer[1003] = GUICtrlCreateLabel("1003", 60, 116, 25, 10)
$Computer[1004] = GUICtrlCreateLabel("1004", 60, 140, 25, 10)
$Computer[1005] = GUICtrlCreateLabel("1005", 60, 165, 25, 10)
$Computer[1006] = GUICtrlCreateLabel("1006", 60, 190, 25, 10)
$Computer[1007] = GUICtrlCreateLabel("1007", 60, 214, 25, 10)
$Computer[1008] = GUICtrlCreateLabel("1008", 60, 238, 25, 10)
$Computer[1009] = GUICtrlCreateLabel("1009", 60, 261, 25, 10)
$Computer[1010] = GUICtrlCreateLabel("1010", 60, 285, 25, 10)
$Computer[1011] = GUICtrlCreateLabel("1011", 60, 309, 25, 10)
$Computer[1012] = GUICtrlCreateLabel("1012", 60, 333, 25, 10)
$Computer[1013] = GUICtrlCreateLabel("1013", 60, 359, 25, 10)
$Computer[1014] = GUICtrlCreateLabel("1014", 60, 383, 25, 10)
$Computer[1015] = GUICtrlCreateLabel("1015", 60, 407, 25, 10)
$Computer[1016] = GUICtrlCreateLabel("1016", 60, 431, 25, 10)
$Computer[1017] = GUICtrlCreateLabel("1017", 60, 452, 25, 10)
$Computer[1018] = GUICtrlCreateLabel("1018", 60, 476, 25, 10)
$Pic[1001] = GUICtrlCreatePic("c:\offline.jpg", 166, 67, 10, 10)
$Pic[1002] = GUICtrlCreatePic("c:\offline.jpg", 166, 91, 10, 10)
$Pic[1003] = GUICtrlCreatePic("c:\offline.jpg", 166, 115, 10, 10)
$Pic[1004] = GUICtrlCreatePic("c:\offline.jpg", 166, 140, 10, 10)
$Pic[1005] = GUICtrlCreatePic("c:\offline.jpg", 166, 164, 10, 10)
$Pic[1006] = GUICtrlCreatePic("c:\offline.jpg", 166, 189, 10, 10)
$Pic[1007] = GUICtrlCreatePic("c:\offline.jpg", 166, 212, 10, 10)
$Pic[1008] = GUICtrlCreatePic("c:\offline.jpg", 166, 237, 10, 10)
$Pic[1009] = GUICtrlCreatePic("c:\offline.jpg", 166, 260, 10, 10)
$Pic[1010] = GUICtrlCreatePic("c:\offline.jpg", 166, 285, 10, 10)
$Pic[1011] = GUICtrlCreatePic("c:\offline.jpg", 166, 310, 10, 10)
$Pic[1012] = GUICtrlCreatePic("c:\offline.jpg", 166, 333, 10, 10)
$Pic[1013] = GUICtrlCreatePic("c:\offline.jpg", 166, 358, 10, 10)
$Pic[1014] = GUICtrlCreatePic("c:\offline.jpg", 166, 382, 10, 10)
$Pic[1015] = GUICtrlCreatePic("c:\offline.jpg", 166, 407, 10, 10)
$Pic[1016] = GUICtrlCreatePic("c:\offline.jpg", 166, 430, 10, 10)
$Pic[1017] = GUICtrlCreatePic("c:\offline.jpg", 166, 452, 10, 10)
$Pic[1018] = GUICtrlCreatePic("c:\offline.jpg", 166, 475, 10, 10)
GUICtrlSetOnEvent(-1, '_zx')
GUISetState()
UDPStartup()
$socket = UDPBind(@IPAddress1, 3001)
If @error <> 0 Then
MsgBox(0,"Error", "Server port open error")
$Server_open = 0
EndIf
While 1
;If $Server_open <> 0 Then
$data = UDPRecv($socket, 128,1)
If $data <> "" Then
$data = BinaryToString($data,4)
$Data_array = StringSplit($data,",")
If $Data_array[0] = 2 Then
;_ArrayDisplay($Data_array)
$Number = number(StringMid($Data_array[1],4,1)&StringRight($Data_array[1],3))
if $Data_array[2]="Counting..." then
GUICtrlSetImage($pic[$Number], "c:\online.jpg")
else
GUICtrlSetImage($pic[$Number], "c:\locked.jpg")
endif
EndIf
ELSE
EndIf
;EndIf
Sleep(100)
WEnd
Func _exit()
Switch @GUI_CtrlId
Case -3
UDPShutdown()
Exit
EndSwitch
EndFunc