philgood

why my filename is not exactly the same when i send it ??

5 posts in this topic

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)

Share this post


Link to post
Share on other sites



i try with "a001.mov" ,"a002.mov" and it's the same thing, the "a" disappear...

Share this post


Link to post
Share on other sites

Have you tried adding a pause before the send or maybe another WinWaitActive for the open file dialog?

Share this post


Link to post
Share on other sites

no, just waiting the qicktime opening... but i try "ConsoleWrite($sFileName)" and the name is correct...

Share this post


Link to post
Share on other sites

oh my god, it's that !

 

adding a sleep solve my problem ... thank's a lot !

Share this post


Link to post
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