Quantcast
Channel: DEVONtechnologies Community - Latest posts
Viewing all articles
Browse latest Browse all 16117

Video skip with keyboard shortcuts

$
0
0

This script does it.

-- Skip video

property theSeconds : 5
property forward : true

tell application id "DNtp"
	try
		set theRecord to content record of think window 1
		if theRecord = missing value then error "Please open a video record"
		set theRecord_Type to (type of theRecord) as string
		if theRecord_Type ≠ "quicktime" then error "Please open a video record"
		
		set theTab_CurrentTime to current time of current tab of think window 1
		
		if forward then
			set theTime to (theTab_CurrentTime + theSeconds)
			set theRecord_Duration to duration of theRecord
			if theTime > theRecord_Duration then
				set theTime to theRecord_Duration
			end if
		else
			set theTime to (theTab_CurrentTime - theSeconds)
		end if
		
		do shell script "open " & (reference URL of theRecord & "?time=" & theTime)
		
	on error error_message number error_number
		if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
		return
	end try
end tell

@cgrunenberg Trying to set the current time directly yields an AppleScript error.


Viewing all articles
Browse latest Browse all 16117

Trending Articles