Wirecast でメディア ファイルを開くスクリプトを作成しようとしています。特定のフォルダー内のすべてのファイルを Wirecast の「ショット」として開きたいです。
Wirecast Dictionary によると、ショットを追加するための applescript コマンド構文は次のとおりです。
posix_pathを含むAddShotWithMediaレイヤー
フォルダー内のすべてのファイルへの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.