philgood Posted September 18, 2017 Posted September 18, 2017 hello everybody, i'm new in autoit and , probably, you 'll find my problem "easy to solve"... (i hope) i need to use autoit for extract sound of a lot of .mov files. and i have a problem just to open the files (all, script and .mov are in the same directory ) all my files are named "001.mov", "002.mov", etc... but when i send the name , it's write "01.mov", "02.mov" ... why ??? if someone can explain me... thanks my script: #include <Constants.au3> #include <Array.au3> Opt("WinTitleMatchMode", 2) Local $hSearch = FileFindFirstFile("*.mov") If $hSearch = -1 Then MsgBox($MB_SYSTEMMODAL, "", "Error: No files/directories matched the search pattern.") exit EndIf Local $sFileName = "", $iResult = 0 While 1 $sFileName = FileFindNextFile($hSearch) If @error Then ExitLoop Run("C:\Program Files (x86)\QuickTime\QuickTimePlayer.exe") WinWaitActive("[TITLE:Apple QuickTime]") Send("^o") send($sFileName , 1) Send("{ENTER}") WEnd FileClose($hSearch)
philgood Posted September 18, 2017 Author Posted September 18, 2017 i try with "a001.mov" ,"a002.mov" and it's the same thing, the "a" disappear...
Danp2 Posted September 18, 2017 Posted September 18, 2017 Have you tried adding a pause before the send or maybe another WinWaitActive for the open file dialog? Latest Webdriver UDF Release Webdriver Wiki FAQs
philgood Posted September 18, 2017 Author Posted September 18, 2017 no, just waiting the qicktime opening... but i try "ConsoleWrite($sFileName)" and the name is correct...
philgood Posted September 18, 2017 Author Posted September 18, 2017 oh my god, it's that ! adding a sleep solve my problem ... thank's a lot !
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