. 打開 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,就能在菜單欄中的[服務]列表中看到剛剛創建的服務了,但此時只能通過點擊來運行服務。
現在操作起來不方便,可以給這兩個腳本設置快捷鍵
偏好設置->鍵盤->快捷鍵 左邊選中”服務“,右邊就看到”通用“中有我們剛才新增的快進、快退,旁邊有設置快捷鍵按鈕