This is an Applescript that automatically plays a folder of QuickTime movies in succession and it works flawlessly (Credit goes to macdosth for creating the script):
What I would like to do is add a prompt that asks which folder contains the movies that are to be played. Here's the modified code, but it doesn't work. Can anyone figure out what's wrong?
Code:
tell application "QuickTime Player"
-- get the list of movie files to be played
tell application "Finder"
set myfolder to "Mac HD:Movies"
set filelist to list folder myfolder
end tell
-- play the movie files one after another
set myfolder to "Mac HD:Movies:"
repeat with movie1 in filelist
-- get the full path to the movie
set fullmovie1 to myfolder & movie1
-- play the movie
open fullmovie1
present document 1 scale screen
-- wait until movie is done
repeat until (get done of document 1)
end repeat
-- pause for a few seconds before next movie
-- (delay of greater than 2 seconds doesn't seem to work)
delay 2
-- close the played movie
close document 1
end repeat
end tell
What I would like to do is add a prompt that asks which folder contains the movies that are to be played. Here's the modified code, but it doesn't work. Can anyone figure out what's wrong?
Code:
tell application "QuickTime Player"
-- get the list of movie files to be played
tell application "Finder"
set myfolder to (choose folder with prompt "Select the folder containing QuickTime moves...")
set filelist to list folder myfolder
end tell
-- play the movie files one after another
set myfolder to myfolder --unsure about this line
repeat with movie1 in filelist
-- get the full path to the movie
set fullmovie1 to myfolder & movie1
-- play the movie
open fullmovie1
present document 1 scale screen
-- wait until movie is done
repeat until (get done of document 1)
end repeat
-- pause for a few seconds before next movie
-- (delay of greater than 2 seconds doesn't seem to work)
delay 2
-- close the played movie
close document 1
end repeat
end tell