3
我试图在Wirecast中编写媒体文件的打开脚本。 我想打开Wirecast“镜头”的特定文件夹中的所有文件。AppleScript:获取POSIX路径到文件夹中的所有文件
按照词典的Wirecast的AppleScript的命令语法加一出手就是:
AddShotWithMedia 层与posix_path 什么
我无法弄清楚如何要么得到的名单posix路径指向文件夹中的所有文件,或者将AppleScript路径转换为Wirecast可接受的posix路径。
下面的代码:
tell application "Finder"
set SettingsFolder to folder "WirecastMedia" of home
set MediaFolder to folder "Titles" of SettingsFolder
set TitleList to entire contents of MediaFolder
end tell
tell application "Wirecast"
activate
set myFile to (file "KorgWirecast.wcst" of SettingsFolder)
open myFile as alias
set myDoc to last document
set myLayer to the layer named "Titles" of myDoc
repeat with aFile in TitleList
AddShotWithMedia myLayer with posix_path aFile
end repeat
end tell
...它失败与消息的AddShotWithMedia行:
Can’t make «class docf» "ManyVoicesSuper.png" of «class cfol» "Titles"
of «class cfol» "WirecastMedia" of «class cfol» "ram" of «class cfol»
"Users" of «class sdsk» of application "Finder" into the expected type.
完美!谢谢!我花了我所有的时间试图强制从一种形式到另一种形式的路径。奇怪的是,你必须通过一个大脚本来执行两种不同的路径格式。你会认为会有一种强制路径格式的标准方式。 –