无法在自动热键中使用 FFMPEG

问题描述 投票:0回答:1

我阅读了 Run 的文档,从中尝试了这个示例,但我在消息框中没有检索到任何内容:

command := """C:\Users\julien\OneDrive\Portable Softwares\FFMpeg\bin\ffmpeg.exe""" . " -i " ;ne pas oublier l'espace à la fin
path1 := """C:\Users\julien\OneDrive\Enregistrements videos pro\Point XL Engineering-20240705_140847-Enregistrement de la réunion.mp4""" ; path with spaces


command := command . path1
MsgBox %command%
MsgBox % RunWaitOne(command)

RunWaitOne(command) {
    shell := ComObjCreate("WScript.Shell")
    ; Execute a single command via cmd.exe
    exec := shell.Exec(ComSpec " /C " command)
    ; Read and return the command's output
    return exec.StdOut.ReadAll()
}

我一直在尝试双引号的多种组合,但我无法理解它。有人可以帮忙吗?

谢谢,

autohotkey
1个回答
0
投票

也许这可以给你一些起点。

command = "C:\Users\julien\OneDrive\Portable Softwares\FFMpeg\bin\ffmpeg.exe" -i
path1 = "C:\Users\julien\OneDrive\Enregistrements videos pro\Point XL Engineering-20240705_140847-Enregistrement de la réunion.mp4"
path2 = "C:\Users\julien\OneDrive\Enregistrements videos pro\output video name.mp4" ; output path with spaces

func( command ) {
    return % ComObjCreate("WScript.Shell").Exec( command ).StdErr.ReadAll()
}
msgbox % RunE( command " " path1 " " path2 )
© www.soinside.com 2019 - 2024. All rights reserved.