Created
July 24, 2013 00:13
-
-
Save nicwolff/6067187 to your computer and use it in GitHub Desktop.
AppleScripts to skip forward 30 seconds or back 10 seconds in either VLC or QuickTime Player
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if application "VLC" is running then | |
tell application "VLC" | |
step backward | |
end tell | |
end if | |
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 | |
end if | |
if (playerPosition ≥ movieDuration) 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if application "VLC" is running then | |
tell application "VLC" | |
step forward | |
step forward | |
step forward | |
end tell | |
end if | |
property step : 30 | |
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 | |
end if | |
if (playerPosition ≥ movieDuration) 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 |
@nicwolff: Very usefull scripts. Thank you for providing it!
Hi! Thanks for providing the script, it looks exactly like what I need. Since I'm new to AppleScript, can you explain how could I use it? Ideally I would like to use arrow keys to go forward/backward of 10 seconds while playing videos in Quicktime Player.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tell application "VLC"
set current time to current time - 5
end tell