To All-
When i create a ref movie (a small quicktime file that will direct a user to a different movie depending on speed, CPU, etc), and open it in TextEdit, it’s actually only a very small piece of text that directs quicktime with one letter modifiers (it would seem). I have tried to have AppleScript create a text document, and name it with a .mov extension but the file type still stays as text.
When i run a AppleScript ‘info for’ command on my AppleScript created ref.mov file i get
kind:“Text document”
file type:“TEXT”
file creator:“ttxt”
When i run a AppleScript ‘info for’ command on my origonal ‘MakeRefMovie’ created refMovie file i get
kind:“QuickTime Movie”
file type:“”
file creator:“”
But everything I see on the forums, nobody seems to know or can correctly state how I can either create a movie file directly from AppleScript or change the type when it’s all done so that it’ll open in quicktime correctly.
So, I challenge you all. How do i have AppleScript create a text document, save it with the correct guts, and modify it so that it has the exact same kind, type, and creator as the RefMovie?
All the tools you’ll need:
Where you can get Apples ‘MakeRefMov’ so you can create your own examples to start with:
http://developer.apple.com/quicktime/quicktimeintro/tools/
An online example of a ref movie, that points to a separate video:
http://mobile.pyxo.com/ref.mov
and finally the script as I have it right now:
--Make the Ref Movie
set the_file to (((path to desktop) as string) & "reference.mov") as file specification
set startRef to "" -- The Header to the ref mov, you'll have to get this on your own from your own or my example, when I copied the text into this web page it would cut off my post
--This is the URL of your movie
set wifiURL to "http://mobile.pyxo.com/test_video.m4v"
set endRef to "" -- the Footer of your mov, you'll have to get this on your own from your own or my example, when I copied the text into this web page it would cut off my post
set writeFile to startRef & wifiURL & endRef
try
open for access the_file with write permission
write writeFile to the_file
close access the_file
--Here is the tricky part, you can get all the info you want, but the origonal ref mov will come out with 'missing value' under file type
set FileType to "" as text
set CreatorType to "" as text
tell application "Finder"
set the file type of the_file to FileType
set the creator type of the_file to CreatorType
end tell
on error theError
display dialog "Error: " & theError
try
close access the_file
end try
end try
You might be asking, why reference one movie. I need to reference many, but for my expament i just wanted to try starting with one. So can anybody help? This would be of great help to anybody who has to alter / update a lot of reference movies.
Cheers,
TalonGold
Model: Power Mac G5 Dual 2.7 GHz
AppleScript: 1.10.7
Browser: Safari 419.3
Operating System: Mac OS X (10.4)