Jump to content

Script looping


Yaelh
 Share

Recommended Posts

Can any one help me understand why when running the script bellow after it runs the autoit icons continues to show as if it is still running and then it starts the script over again.

Thanks,

FileDelete ( "C:\Yael\output\Boy4*.*" )

Run("C:\Program Files\Adobe\Premiere Pro\Adobe Premiere Pro.exe C:\Yael\Boy4.prproj")

sleep(3000)

sleep(3000)

Send("{ALT}")

Send("W")

Send("{DOWN}")

Send("{DOWN}")

Send("{DOWN}")

Send("{DOWN}")

Send("{DOWN}")

Send("{DOWN}")

Send("{DOWN}")

Send("{DOWN}")

Send("{DOWN}")

Send("{RIGHT}")

Send("{ENTER}")

Send("{ALT}")

Send("F")

Send("E")

Send("E")

WinWaitActive("Transcode Settings")

Send("{ENTER}")

WinWaitActive("Save File")

ControlFocus("Save File", "", "Edit1")

ControlSetText("Save File", "", "Edit1", "C:\Yael\Output\Boy4" )

Send("{ENTER}")

SLEEP(500)

WinWaitNotActive("Rendering")

If WinActive("Rendering") Then

MsgBox(0, "", "Window RENDERING IS active")

ELSE

SLEEP(500)

Send("{ALT}")

Send("F")

Send("X")

WinWaitActive("Adobe Premiere Pro")

If WinActive("Adobe Premiere Pro") Then

SLEEP(500)

ControlFocus("Adobe Premiere Pro", "", "7")

SLEEP(3000)

Send("{ENTER}")

EndIf

EndIf

Exit

Link to comment
Share on other sites

You either need to add some timeouts to your WinWaitActive() commands or you need to specify what will happen if the windows is NOT active.

You can also cut down on the Send("{DOWN}")'s by using Send("{DOWN 9}").

Edit: Also, why do you have two Sleep (3000)'s right next to each other? Why not just do a Sleep (6000) unless the double Sleep() is accidental?

Edited by SerialKiller
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...