有很多网友私信问我自带的QuickTime Player没有大多数播放器的方向键快进/快退功能。有没有解决方案,当然有了,不过稍微复杂一点,具体操作如下:

使用 Automator 创建服务

1.打开OS X中自带的Automator软件,选择[新建文稿];

2.文稿类型选择[服务],“服务”收到设置为[没有输入],应用程序选择[QuickTime Player];

3. 在左侧的资源库面板中,将[实用工具]中的[运行 AppleScript]拖拽到右侧区域;

4.在出现的AppleScript编辑框中粘贴以下代码(选其一,之后再创建另一个):

3秒快进

on run

set step to 3

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

3秒快退

on run

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 input

end run

打开网易新闻 查看精彩图片

5. 保存服务。

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

设置快捷键

1. 点击[服务]列表中最后的[服务偏好设置…];

2. 在弹出的设置窗口右侧,[通用]分组中找到要设置的服务,选中该服务可以看到[添加快捷键]按钮;

3.点击[添加快捷键]按钮,在键盘上按下需要设置的快捷键;