Kovitt Posted June 20, 2008 Share Posted June 20, 2008 Hey guys, I wrote a script to scan some network machines to check for files in certain folders. I am having some latency issues with some of the machines, and it takes a few seconds to reach the folders. CODE #Include <File.au3> #Include <Array.au3> $count = 0 $PC_File = FileOpen("Names.txt",0) While True $CompName = FileReadLine($PC_File) If @error = -1 Then ExitLoop EndIf $count = $count+1 $Files = _FileListToArray("*******") ;normally contains folder location #cs------------------------------------------------------------ ; I need it to wait here but if I put a sleep command it says that I am calling on a variable that is not an array... Can anyone help? #ce------------------------------------------------------------ If @error = 1 Then MsgBox(0, "Error", "Unable to connenct to Machine "&$CompName&"!") Else If @error <> 4 Then If $Files[0] >= 10 Then MsgBox(1,"ADR FTP", "The Machine "&$CompName&" is not executing the ftp service.") EndIf EndIF If Mod($count,10) = 0 Then MsgBox(0,"Update:","Currently Scanning "&$CompName) EndIf EndIf Wend SoundPlay("tada.wav",0) MsgBox(0,"Complete","The Scan has succesfully been completed.") Is there a sleep alternative or something? I really apreciate it.. Thanks in advance! Link to comment Share on other sites More sharing options...
Kovitt Posted June 20, 2008 Author Share Posted June 20, 2008 Problem solved.... 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