Re: Script stops (freeze) -please help, Script doesn’t process all records in _FileListToArray.

larrydalooza <[email protected]> Tue, 20 Nov 2007 21:24:05 -0000
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
--- In [email protected], new roof tile <new_roof_tile@...> 
wrote:
>
> I am new in this and I really need help.
>   I have this script - works fine for about 50 records and than 
stops (freeze). If I launch the script again, works for one or two 
records and then stops again. After a while I tried again. The 
script execute up to "Send("{CTRLDOWN}{SHIFTDOWN}f{CTRLUP}{SHIFTUP}")
> " and freeze again. It did work yesterday, but now doesn't process 
all records in _FileListToArray. No error messages.
> I created a script using AU3Recorder. 
>   Your help will be appreciated.
>   Thanks.
> 
> Here is the script:
> 
> #include <File.au3>
> #Include <Array.au3>
> $Folder1 = "C:\working\";<-- Fill this in correctly
> $Folder2 = "c:\complete\";<-- Fill this in correctly
> $Files1 = ""
> $Files2 = ""
> $File = ""
> $FileWin = ""
> 
> 
> $Files = _FileListToArray($Folder1)
> For $i = 1 To UBound($Files)-2
> 
> $Files1 = $Folder1 & $Files[$i]
> $Files2 = "c:\complete\" & StringLeft($Files[$i], StringLen($Files
[$i]) - 4) & ".jpg"
> $File = "c:\templates\" & StringLeft($Files[$i], 9) & ".app"
> $FileWin = StringLeft($Files[$i], 9) & ".app"
> 
> ShellExecute($File, "Open")
> WinWait($FileWin & " - Application","")
> If Not WinActive($FileWin & " - Application","") Then WinActivate
($FileWin & " - Application","")
> WinWaitActive($FileWin & " - Application","")
> Send("{CTRLDOWN}{SHIFTDOWN}f{CTRLUP}{SHIFTUP}")
> WinWait("All Files (*.*)|*.*||","")
> If Not WinActive("All Files (*.*)|*.*||","") Then WinActivate("All 
Files (*.*)|*.*||","")
> WinWaitActive("All Files (*.*)|*.*||","")
> Send($Files1)
> Send("{ENTER}")
> WinWait($FileWin & " - Application","")
> If Not WinActive($FileWin & " - Application","") Then WinActivate
($FileWin & " - Application","")
> WinWaitActive($FileWin & " - Application","")
> Send("{CTRLDOWN}{SHIFTDOWN}x{SHIFTUP}{CTRLUP}")
> WinWait("Export file","")
> If Not WinActive("Export file","") Then WinActivate("Export 
file","")
> WinWaitActive("Export file","")
> Send($Files2)
> Send("{ENTER}")
> WinWait("Export as JPG","")
> If Not WinActive("Export as JPG","") Then WinActivate("Export as 
JPG","")
> WinWaitActive("Export as JPG","")
> Send("{ENTER}")
> WinClose($FileWin & " - Application","")
> FileDelete($Files1)
> Next
> 
> 
>        
> ---------------------------------
> Be a better sports nut! Let your teams follow you with Yahoo 
Mobile. Try it now.
> 
> [Non-text portions of this message have been removed]
>

There may be a herpes creme for it... see some previous posts.

Lar.