Jump to content

Script acting up on second time around a loop


4Bravo
 Share

Recommended Posts

I'm continuing to have problems with Flash and Autoit. This time I am able to execute everything I want on the first item in an array, but as soon as the second item in the array loads the script stops. I used to be able to try to jump start the script by getting it to the next WinWaitActive window, but that does not seem to work anymore

I changed my hotkeys to use plain menu keys to navigate around as I thought that might have been the problem, but it does not help nor hinder the problem

#include <Array.au3>
#include <RecFileListToArray.au3>
$sPath = "D:AnimationsCYOAApplicationApplication_AssetsCharacter_RendersHero_Anim"
$FileList = _RecFileListToArray($sPath, "*.fla", 1, 1, 1, 2)
$justFILE = _RecFileListToArray($sPath, "*.fla", 1, 1, 1, 0)
$flaDIR = _RecFileListToArray($sPath, "*.fla", 1, 1, 1, 2)
For $i = 1 To $justFILE[0]
$justFILE[$i] = StringTrimRight($justFILE[$i], 4)
next
For $i = 1 To $flaDIR[0]
$flaDIR[$i] = StringReplace($flaDIR[$i], $justFILE[$i] & ".fla", "")
next

For $i = 1 To $FileList[0]
Run("C:Program Files (x86)AdobeAdobe Flash CS5.5flash.exe " & $FileList[$i])

WinWaitActive($justFILE[$i])
WinWaitNotActive("Adobe Flash CS5.5")

;export movie
Send("!")
Send("f")
Send("e")
Send("m")

WinWaitActive("Export Movie")

; set new filepath and name
;Use this line if you want the render to have the same name as the movie
;Send($flaDIR[$i] & $justFILE[$i] & ".Mov")
Send($flaDIR[$i] & "Render.Mov")
Send("{ENTER}")
;overwrite if file exists
WinWaitActive("Confirm Save As", "", 1)
Send("{y}")

WinWaitActive("QuickTime Export Settings")
; dismiss export settings dialg
Send("{ENTER}")
WinWaitActive("Adobe Flash CS5.5")
; dismiss export settings dialg
Send("{ENTER}")

; wait for export to finish
WinWaitActive($justFILE[$i])
; close .fla file
Sleep(1000)
Send("!")
Send("f")
Send("c")

WinWaitActive("Adobe Flash CS5.5")
Next

I added the

WinWaitNotActive("Adobe Flash CS5.5")

after the file loads just to double check that the file was open, it hasn't changed the problem.

Any thoughts?

Edited by 4Bravo
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...