Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. property Main_folder : missing value
  2. set Main_folder to choose folder
  3.  
  4. tell application "QuickTime Player"
  5. if not (exists movie 1) then error "No movies are open."
  6. stop movies
  7. tell front movie to set {currMovie, T_name, duration_list, current time} to ¬
  8. {it, text 1 thru -5 of (get name), duration of chapters of (get first track whose kind is "Sprite"), 0}
  9. set T_target to my makeFolder(T_name)
  10.  
  11. repeat with i from 1 to (count duration_list)
  12. tell currMovie
  13. set current time to current time + (item i of duration_list)
  14. export to (T_target & T_name & " Chapter " & i) as picture using settings preset "Photo-JPEG" -- or "Uncommpressed", or "PNG"
  15. end tell
  16. end repeat
  17. end tell
  18.  
  19. on makeFolder(n)
  20. tell application "Finder" to return (make new folder at Main_folder with properties {name:"Images from Movie " & n}) as Unicode text
  21. end makeFolder
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement