Tente
#If ProcessExist("bdcam.exe")
F1::
Sleep, 300
; get the newest file in F:\
Loop F:\*.*
If ( A_LoopFileTimeModified >= Time )
Time := A_LoopFileTimeModified, File := A_LoopFileLongPath
; MsgBox, Latest file in F:\ is 'n'n%File%
FileMove, %File%, %File%
If (!ErrorLevel)
{
; MsgBox, The program isn't recording
Send, {F4}
}
; else
; MsgBox, File is busy (The program is recording)
return
#If
ProcessExist(name){
Process, Exist, %name%
return Errorlevel
}
Substituir
Loop F:\*.*
com
Loop F:\*.avi
se você quiser verificar o arquivo avi mais recente em F:.