philgood Posted September 18, 2017 Share 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) Link to comment Share on other sites More sharing options...
philgood Posted September 18, 2017 Author Share Posted September 18, 2017 i try with "a001.mov" ,"a002.mov" and it's the same thing, the "a" disappear... Link to comment Share on other sites More sharing options...
Danp2 Posted September 18, 2017 Share 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 Link to comment Share on other sites More sharing options...
philgood Posted September 18, 2017 Author Share Posted September 18, 2017 no, just waiting the qicktime opening... but i try "ConsoleWrite($sFileName)" and the name is correct... Link to comment Share on other sites More sharing options...
philgood Posted September 18, 2017 Author Share Posted September 18, 2017 oh my god, it's that ! adding a sleep solve my problem ... thank's a lot ! 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