I want to have the user choose their QT movie so I can add HREF tracks to it.
When I say “choose file”, I get a window to choose my QT movie, but I always get an error from QT Player saying “unknown object type”. Can anyone tell me the correct way to choose my QT file? Thanks.
This works for me:
set theFile to (choose file)
tell app "QuickTime Player" to open theFile
Thanks, jj, that worked.
Now, I’ve made a script that will open a file, but it’s looking for a specific file. How can I make my script work with any file? This script opens a text file as a movie in QT Player, copies it, then opens a normal QT movie and pastes the text file contents into it. Then it quits asking you to save the file or not. What it does is to add an HREF track to the movie. Now I need to convert it to open ANY movie. I’m assuming that I will need to use a variable for the movie name. I tried to put ‘theMovie’ and ‘theFile’ as my variable, but neither worked.
Is there a good tutorial on the net about Applescript? Thanks.
Here’s what I’ve got so far:
tell application “QuickTime Player”
activate
open file “Macintosh HD:Users:pzb4:Desktop:MovieFolder:url.txt”
select all movie “url.txt”
copy movie “url.txt”
close movie “url.txt” saving no
set theFile to choose file
try
set theMovie to open theFile
set show detailed movie info window of movie “calm.mov” to true
select window “calm.mov”
select all movie “calm.mov”
add movie “calm.mov”
select window “calm.mov Properties”
set name of track “Text Track” of movie “calm.mov” to “HREFTrack”
set enabled of track “HREFTrack” of movie “calm.mov” to false
end try
quit
end tell