Terminal Automator、AppleScript、Finder-文件名的传递很奇怪

Terminal Automator、AppleScript、Finder-文件名的传递很奇怪,terminal,applescript,automator,Terminal,Applescript,Automator,我有以下问题。我想在Automator中编写一个服务。它应该将文件传递给AppleScript操作。这也行。奇怪的是,这条路存在两次 自动程序AppleScript代码: on run {input, parameters} tell application "Terminal" activate set f to (input as text) set thisPOSIXPath to (the POSIX path of f)

我有以下问题。我想在Automator中编写一个服务。它应该将文件传递给AppleScript操作。这也行。奇怪的是,这条路存在两次

自动程序AppleScript代码:

on run {input, parameters}
    tell application "Terminal"
        activate
        set f to (input as text)
        set thisPOSIXPath to (the POSIX path of f)
        do script "/Applications/HandBrakeCLI --format av_mp4 --optimize --align-av --encoder x265 --quality 21 --vfr  --first-audio --mixdown stereo --ab 192 --first-subtitle -i "  & thisPOSIXPath & " -o /Desktop/FERTIG.m4v"
        return input
    end tell
end run
终端输出:

% /Applications/HandBrakeCLI --format av_mp4 --optimize --align-av --encoder x265 --quality 21 --vfr  --first-audio --mixdown stereo --ab 192 --first-subtitle -i /Users/testuser/Desktop/Sample Videos _ Dummy Videos For Demo Use.mp4Macintosh HD/Users/testuser/Desktop/Sample Videos _ Dummy Videos For Demo Use.mp4Macintosh HD/Users/testuser/Desktop/Sample Videos _ Dummy Videos For Demo Use.mp4 -o /Desktop/FERTIG.m4v 

它来自何处?

听起来你在获取服务输入之外的项目-在应用程序脚本之前的操作是什么?RE:“奇怪的是,路径存在两次。”,实际上是
示例视频\uuuu用于演示的虚拟视频。mp4
-i
选项之后出现三次。请附上您的自动机工作流程的适当屏幕截图,以便我们可以看到它是如何设置的。否则,我们只能猜测你做错了什么。