본문 바로가기

Tips/Mac

How to Run Fast Forward or Fast Backward on QuickTime Player with AppleScript





property step : 10

if application "QuickTime Player" is running then

tell application "QuickTime Player"

set playerPosition to (current time of front document) + step

set movieDuration to duration of front document

if (front document is playing) then

set isPlaying to true

else

set isPlaying to false

end if

if (playerPositionmovieDuration) then

if front document is playing then

stop front document

end if

set playerPosition to movieDuration

set current time of front document to playerPosition

else

set current time of front document to playerPosition

if (isPlaying) then

play front document

end if

end if

end tell

end if



Third Party app 인 BTT와 같은 앱과 함께 연동하여 사용하면, QuickTime Player 에서도 마우스나 키보드 커서를 


사용하여 보다 편리하게 FF or FB 할 수 있다.




- References -

http://stackoverflow.com/questions/27070251/applescript-to-launch-and-loop-a-video

http://macscripter.net/viewtopic.php?id=14689

https://developer.apple.com/library/content/documentation/AppleScript/Conceptual/

AppleScriptLangGuide/reference/ASLR_cmds.html