Hi there,
I am new to the forums so hopefully I post in the correct place. I have been learning Applescript and I love it. I recently got stuck on a project. I am trying to create a script that takes a file, moves it, renames it and then opens it with a compressor droplet. I can get it to work without the rename and move but as soon as i do that compressor complains that there is a problem with the source file.
I am copying the code below. If anyone has ideas on what I did wrong, that would be wonderful.
Thanks!
:D:D:D:D:D:D
-- get the title of movie
set movie_title to ""
display dialog "What is the title of your movie?" default answer movie_title
set movie_title to text returned of the result
-- set the title to lowerrcase and concatenate
set lowercase_movie_title to movie_title's words as string
on trim(lowercase_movie_title_trimmed)
--Make a list out of the text provided.
set myText to words of myText
--Change that list into a string of words that only have a single space between.
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to " "
set myText to myText as string
set AppleScript's text item delimiters to oldDelimiters
end trim
set lowercase_movie_title_trimmed to result
-- did they edit in HD or SD?
set project_type to (choose from list {"HD", "SD"} with prompt "How was your movie made?") as string
-- grab the full quality file to compress
tell application "Finder"
activate
set full_quality_file to (choose file with prompt "Select your full quality file") as string
end tell
-- move the full quality file to the final folder
tell application "Finder"
move file full_quality_file to folder "my folder address"
set full_quality_file_a to result
end tell
tell application "Finder"
activate
set name of full_quality_file_a to (lowercase_movie_title_trimmed & ".mov")
set new_full_quality_file to result
end tell
-- compress the hd or sd movie
if project_type = "SD" then
-- compress the SD Movie
tell application "09cmf_H264_480pw" to (open new_full_quality_file)
else
-- compress the HD Movie
tell application "comp3_H264_720pw" to (open new_full_quality_file)
end if