Guest User

Untitled

a guest
May 27th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1.  
  2. set timeout_seconds to 86400 -- 24 Hours
  3. set total_timeout_seconds to 864000 -- 10 Days
  4. set video_files to choose file with multiple selections allowed
  5.  
  6. with timeout of total_timeout_seconds seconds
  7. tell application "QuickTime Player"
  8. -- close every document
  9. repeat with video_file in video_files
  10. with timeout of timeout_seconds seconds
  11. set opened_file to open video_file
  12. set oldDelims to AppleScript's text item delimiters
  13. set AppleScript's text item delimiters to ":"
  14. set video_file_name to last text item of (video_file as string)
  15. set AppleScript's text item delimiters to oldDelims -- restore them
  16. --repeat until load state of document video_file_name is complete
  17. -- delay 1
  18. --end repeat
  19. set oldDelims to AppleScript's text item delimiters
  20. set AppleScript's text item delimiters to "."
  21. --export document video_file_name as iPhone to (first text item of (video_file as string)) & ".m4v"
  22. set AppleScript's text item delimiters to oldDelims -- restore them
  23. close document video_file_name
  24. end timeout
  25. end repeat
  26. end tell
  27. end timeout
Add Comment
Please, Sign In to add comment