首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >quicktime将所有文件静音

quicktime将所有文件静音
EN

Stack Overflow用户
提问于 2010-10-15 01:35:02
回答 2查看 221关注 0票数 0

我想要一个可以在QuickTime中打开文件并将它们全部静音的applescript快捷批处理程序。该脚本仅将最前面打开的文件静音。

代码语言:javascript
复制
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
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2010-11-18 02:10:23

这是我让它工作的方式。

代码语言:javascript
复制
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
票数 0
EN

Stack Overflow用户

发布于 2010-10-15 02:04:50

您需要依次告诉每个在Quicktime中打开的窗口执行该操作。动作必须在Applescript中有一个特定的目标;按照你现在编写的方式,你是在告诉Quicktime应用程序,而不是Quicktime中的一个窗口。

未经测试:

代码语言:javascript
复制
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

但我相信也有一种偏好,那就是不让电影在开机时自动播放。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3935887

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档