|
6#
楼主 |
发表于 2006-2-6 17:26:33
|
只看该作者
修改后代码如下:
Option Explicit
Dim ExcelSheet
Set ExcelSheet = CreateObject("Excel.Sheet")
ExcelSheet.Application.Visible = true
Dim i , j
For i = 0 to 10
Dialog("Microsoft Firewall Client").WinButton("立即检测(D)").Click
Dialog("Microsoft Firewall Client").Dialog("正在检测 ISA 服务器").WinEdit("防火墙客户端检测到下列:").Output CheckPoint("rd-isa-srv. opshrd.")
j = Dialog("Microsoft Firewall Client").Dialog("正在检测 ISA 服务器").WinEdit("防火墙客户端检测到下列:").GetROProperty("regexpwndtitle")
'Msgbox Cstr(j) & " " & Cstr(i)
If DataTable("Output_Text_out" , dtGlobalSheet) = "rd-isa-srv. opshrd. com. cn" Then
Reporter.ReportEvent micPass , "正在检测 ISA 服务器" , "OK"
Else
Reporter.ReportEvent micFail , "正在检测 ISA 服务器" , "UnOK"
End If
Dialog("Microsoft Firewall Client").Dialog("正在检测 ISA 服务器").WinButton("关闭").Click
ExcelSheet.ActiveSheet.Cells(i + 1 , 1).Value = Cstr(j)
Next
ExcelSheet.SaveAs "c:\testCheckTheFireWall.xls"
Set ExcelSheet = Nothing |
|