首页  :: 新随笔  :: 管理

给 QuickTime 播放器添加快进x秒,快退x秒

Posted on 2021-10-02 00:06  季枫  阅读(1664)  评论(0编辑  收藏  举报

 

. 打开 OS X 中自带的 ”自动操作“ 软件;

2. 文稿类型选择[快捷操作],“工作流程收到当前”收到设置为[没有输入],应用程序选择[QuickTime Player];

3. 在左侧的资源库面板中,将[实用工具]中的[运行 AppleScript]拖拽到右侧区域; 4. 在出现的 AppleScript 编辑框中粘贴以下代码(选其一,之后再创建另一个):

快进10秒脚本

on run {input, parameters}
    set step to 10
    tell application "QuickTime Player"
        if front document exists then
            if ((current time of front document) + step) ≤ (duration of front document) then
                set (current time of front document) to ((current time of front document) + step)
            else
                set (current time of front document) to (duration of front document)
            end if
        end if
    end tell
    return input
end run

 快退10秒脚本 (要从自动操作中在新建一个,对应这个快退)

on run {input, parameters}
    set step to 10
    tell application "QuickTime Player"
        if front document exists then
            if ((current time of front document) - step) ≥ 0 then
                set (current time of front document) to ((current time of front document) - step)
            else
                set (current time of front document) to 0
            end if
        end if
    end tell
    return input
end run

  

 

5. 保存服务。

现在打开 QuickTime Player,就能在菜单栏中的[服务]列表中看到刚刚创建的服务了,但此时只能通过点击来运行服务。

现在操作起来不方便,可以给这两个脚本设置快捷键

偏好设置->键盘->快捷键 左边选中”服务“,右边就看到”通用“中有我们刚才新增的快进、快退,旁边有设置快捷键按钮

 

 

智读 | 成都会领科技有限公司官网 | 智读App下载 | 每天听本书的博客 | |