在QT中打开文件并使用export720p命令时,需要使用脚本/automator操作来寻找帮助(实际上是要做的)。我不想使用内置在查找器中的编码特性。在QT中使用我正在处理的文件中的“导出”功能可以完成这个任务,并且不会重新编码这些文件。我试过使用automator,但没有“导出”操作,只有“编码”,重新编码的文件。
我在字典里看到了这个命令,但似乎无法使它起作用。
我看到了很多脚本帮助,但大部分是针对QT 7和Pro的。对X来说就不一样了
这个是可能的吗?
提前感谢你的才华和技巧,
干杯!
发布于 2018-11-16 07:42:28
要查找QuickTime Player Applescript字典,使用如下脚本中的导出命令看起来非常简单:
set MyFile to choose file name -- open save as dialog to fill path and file name
tell application "QuickTime Player"
activate
export (document 1) in MyFile using settings preset "720p"
end tell但是,如果QuickTime正确地执行了导出(您可以看到QuickTime导出的进度条),如果目标文件夹是my Desktop,则总是出现错误(没有写入导出文件的权限)...even!
我认为这是QuickTime Applescript命令中的一个bug。也许有人知道怎么处理这件事?
然后,我使用了一个关于GUI脚本的工作。我试图避免GUI脚本,但在这种情况下,我没有找到如何。因此,脚本必须模拟用户单击导出菜单,然后填充“另存为”对话框。这样做,QuickTime就没有权限问题了!
下面是有许多注释的脚本:
set FileName to "test720p" -- your file name for the 720p exported video
set DestFolder to "myFolder/mySubFolder" -- path from Documents folder (folders should exit !!)
tell application "QuickTime Player" to activate
tell application "System Events" to tell process "QuickTime Player"
--click menu 720p of menu "Export" which is item 16 of menu File which is 3rd menu of main menu bar
click menu item 2 of menu 1 of menu item 16 of menu 1 of menu bar item 3 of menu bar 1
delay 1 -- leave time to open save as dialog
-- need to fill the save as dialog box
keystroke "h" using {command down, shift down} -- go home directory
keystroke "g" using {command down, shift down} -- go-to dialog
keystroke DestFolder
keystroke return -- close go-to dialog
keystroke FileName -- fill save as file name on top
keystroke return -- close the save-as dialog
end tell标准保存对话框中还有其他命令键(可转到其他标准文件夹)。取决于你如何适应你的需要。确保您的文件夹在DestFolder之前已经创建好了!
https://stackoverflow.com/questions/53330568
复制相似问题