JamesHoho Posted May 25, 2011 Share Posted May 25, 2011 why $counter[0][0] works all the same value? somebody help me,please,thanks a lot MsgBox(0,"",$counter[0][0],2) #include <FTPEx.au3> #include <SmtpMailer.au3> #include <Array.au3> do If Ping($Ftpserver4) > 0 Then $Open4 = _FTP_Open('Monitor tencor6420 machine ') $Conn4 = _FTP_Connect($Open4, $Ftpserver4, $username4, $pass4,$i_Passive) If $Conn4 Then ;ftp连接成功 $counter = _FTP_ListToArrayEx($Conn4) If IsArray($counter) Then ;_ArrayDisplay($counter) MsgBox(0,"",$counter[0][0],2) #CS If $counter[0] >= 5 And $sendflag4=0 then ;如果机台ftp被监控的目录出现5个以上数目并且没有发送过警告邮件,则发邮件警告。 ;Sendmailerror($Ftpserver4) $sendflag4=1 ;标记已经发送过警告邮件 ElseIf $sendflag4=1 And $counter[0]< 5 Then ;如果发送过警告邮件并且被监控的ftp文件夹数据数目少于2个,则排除警告。 ;Sendmailok($Ftpserver4) $sendflag4=0 ;警告解除,同时设定发送邮件标志为未发送。 EndIf #CE EndIf EndIf $Ftp4 = _FTP_Close($Open4) ;ftp结束 EndIf #EndRegion Sleep(10000) ;设定每2分钟扫描一次系统。 Until $i=0 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now