我想要一个可以在QuickTime中打开文件并将它们全部静音的applescript快捷批处理程序。该脚本仅将最前面打开的文件静音。
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发布于 2010-11-18 02:10:23
这是我让它工作的方式。
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发布于 2010-10-15 02:04:50
您需要依次告诉每个在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但我相信也有一种偏好,那就是不让电影在开机时自动播放。
https://stackoverflow.com/questions/3935887
复制相似问题