想要一个在QuickTime中打开文件并将它们全部静音的AppleScript Droplet。该脚本仅将最前面打开的文件静音。
on open the_Droppings
tell application "QuickTime Player 7" to activate
tell application "QuickTime Player 7" to open the_Droppings
tell application "System Events" to tell process "QuickTime Player 7"
keystroke (ASCII character 31) using {command down, option down}
end tell
end open
答案 0 :(得分:0)
您需要依次在Quicktime中打开每个窗口以执行操作。动作必须在Applescript中具有特定目标;他们现在就用它来编写,你告诉Quicktime应用程序,而不是Quicktime中的窗口。
未测试:
on open the_Droppings
tell application "QuickTime Player 7" to activate
tell application "QuickTime Player 7"
open the_Droppings
set documentCount to (count documents)
end tell
repeat with thisDocument from 1 to documentCount
tell application "System Events"
tell process "QuickTime Player 7"
tell document thisDocument
keystroke (ASCII character 31) using {command down, option down}
end tell
end tell
end tell
end repeat
end open
但我相信也有偏好在开场时没有电影自动播放。
答案 1 :(得分:0)
这是我开始工作的方式。
on open the_Droppings
activate application "QuickTime Player 7"
repeat with oneDrop in the_Droppings
tell application "QuickTime Player 7"
open oneDrop
set sound volume of document 1 to 0
end tell
end repeat
end open