给 QuickTime 播放器添加方向键快进/快退功能

来源:互联网 发布:免费查询大数据征信 编辑:程序博客网 时间:2024/04/29 12:45

文章转自:https://c7sky.com/add-step-forward-backward-feature-to-quicktime-player.html
版权归原作者!

最近用上了 MacBook, 发现自带的 QuickTime Player 没有大多数播放器的方向键快进/快退功能。于是 Google 了一下,分享下解决方法~

使用 Automator 创建服务

1. 打开 OS X 中自带的 Automator 软件,选择[新建文稿];2. 文稿类型选择[服务],“服务”收到设置为[没有输入],应用程序选择[QuickTime Player];3. 在左侧的资源库面板中,将[实用工具]中的[运行 AppleScript]拖拽到右侧区域;4. 在出现的 AppleScript 编辑框中粘贴以下代码(选其一,之后再创建另一个):

5 秒快进

on run {input, parameters}    set step to 5    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 inputend run

5 秒快退

on run {input, parameters}    set step to 5    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 inputend run

这里写图片描述

5. 保存服务。

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

设置快捷键

1. 点击[服务]列表中最后的[服务偏好设置…];2. 在弹出的设置窗口右侧,[通用]分组中找到要设置的服务,选中该服务可以看到[添加快捷键]按钮;3. 点击[添加快捷键]按钮,在键盘上按下需要设置的快捷键;

这里写图片描述

大功告成!播放一个影片试试吧~

参考文章:AppleScript:让普通键盘长出多媒体键!
代码来自:Add step forward/backward feature to QuickTime Player

另外,
按住option+J 调慢播放速度 option+L 调快播放速度 每次调整幅度为0.1

阅读全文
1 0
原创粉丝点击