找回密码
 加入
搜索
查看: 1732|回复: 1

有没有人帮改个服务器网络监控

[复制链接]
发表于 2009-2-16 17:10:40 | 显示全部楼层 |阅读模式
我在论坛上看到了服务器网络监控这个东西,我也试着写了下,就是 那个延时的时时变化不知道是怎么样做到的
有没有人能帮下啊。。如有类似的源码能发给小弟个那就更谢谢了。。。183757577@qq.com
现面是我试着写的代码。。
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("TrayMenuMode", 1)
$g_szVersion = "服务器网络监控"
If WinExists($g_szVersion) Then Exit ; 此脚本已经运行了
AutoItWinSetTitle($g_szVersion)

$inifile = @ScriptDir & "\config.ini"
$Inputa1 = IniRead($inifile, "外网服务器1", "外网1", "")
$Inputb1 = IniRead($inifile, "外网服务器1", "名称","")
$Inputa2 = IniRead($inifile, "外网服务器2", "外网2", "")
$Inputb2 = IniRead($inifile, "外网服务器2", "名称","")
$Inputa3 = IniRead($inifile, "服务器1", "server1", "")
$Inputb3 = IniRead($inifile, "服务器1", "名称","")
$Inputa4 = IniRead($inifile, "服务器2", "server2", "")
$Inputb4 = IniRead($inifile, "服务器2", "名称","")
$Inputa5 = IniRead($inifile, "服务器3", "server3", "")
$Inputb5 = IniRead($inifile, "服务器3", "名称","")
$Inputa6 = IniRead($inifile, "服务器4", "server4", "")
$Inputb6 = IniRead($inifile, "服务器4", "名称","")
$Inputa7 = IniRead($inifile, "服务器5", "server5", "")
$Inputb7 = IniRead($inifile, "服务器5", "名称","")
$Inputa8 = IniRead($inifile, "服务器6", "server6", "")
$Inputb8 = IniRead($inifile, "服务器6", "名称","")



#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("服务器网络监控", 242, 306, -1, -1)
$Input1 = GUICtrlCreateInput($Inputb1, 8, 8, 105, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input2 = GUICtrlCreateInput($Inputb2, 8, 41, 105, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input3 = GUICtrlCreateInput($Inputb3, 8, 73, 105, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input4 = GUICtrlCreateInput($Inputb4, 8, 106, 105, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input5 = GUICtrlCreateInput($Inputb5, 8, 139, 105, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input6 = GUICtrlCreateInput($Inputb6, 8, 172, 105, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input7 = GUICtrlCreateInput($Inputb7, 8, 204, 105, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input8 = GUICtrlCreateInput($Inputb8, 8, 237, 105, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input9 = GUICtrlCreateInput("正常", 123, 8, 41, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input10 = GUICtrlCreateInput("正常", 122, 41, 41, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input11 = GUICtrlCreateInput("正常", 122, 73, 41, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input12 = GUICtrlCreateInput("正常", 122, 106, 41, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input13 = GUICtrlCreateInput("正常", 122, 139, 41, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input14 = GUICtrlCreateInput("正常", 122, 172, 41, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input15 = GUICtrlCreateInput("正常", 122, 205, 41, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input16 = GUICtrlCreateInput("正常", 122, 237, 41, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input17 = GUICtrlCreateInput("延时:", 171, 8, 65, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input18 = GUICtrlCreateInput("延时:", 171, 41, 65, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input19 = GUICtrlCreateInput("延时:", 171, 73, 65, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input20 = GUICtrlCreateInput("延时:", 171, 106, 65, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input21 = GUICtrlCreateInput("延时:", 171, 138, 65, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input22 = GUICtrlCreateInput("延时:", 171, 172, 65, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input23 = GUICtrlCreateInput("延时:", 171, 205, 65, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input24 = GUICtrlCreateInput("延时:", 171, 237, 65, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
$Input25 = GUICtrlCreateInput("本机器名为:" & @ComputerName, 21, 272, 201, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_READONLY,$WS_BORDER))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd
发表于 2009-4-22 05:07:53 | 显示全部楼层
循环ping
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-24 21:19 , Processed in 0.070913 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表