Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set timeout_seconds to 86400 -- 24 Hours
- set total_timeout_seconds to 864000 -- 10 Days
- set video_files to choose file with multiple selections allowed
- with timeout of total_timeout_seconds seconds
- tell application "QuickTime Player"
- -- close every document
- repeat with video_file in video_files
- with timeout of timeout_seconds seconds
- set opened_file to open video_file
- set oldDelims to AppleScript's text item delimiters
- set AppleScript's text item delimiters to ":"
- set video_file_name to last text item of (video_file as string)
- set AppleScript's text item delimiters to oldDelims -- restore them
- --repeat until load state of document video_file_name is complete
- -- delay 1
- --end repeat
- set oldDelims to AppleScript's text item delimiters
- set AppleScript's text item delimiters to "."
- --export document video_file_name as iPhone to (first text item of (video_file as string)) & ".m4v"
- set AppleScript's text item delimiters to oldDelims -- restore them
- close document video_file_name
- end timeout
- end repeat
- end tell
- end timeout
Add Comment
Please, Sign In to add comment