Hazel Applescript does not begin conversion in iFlicks 2

I am very new to Hazel and Applescripts, so please bear with me as I try to explain and resolve this issue. I know it's foolish to play around with things you don't really understand, but this is all so cool! After some digging, I found an Applescript that does (in theory) what I would like it to do.
I want Hazel to take movie files, load them into iFlicks 2, update the metadata, and begin conversion.
I have my Hazel rules set as:
Kind is Movie
Run Applescript
Hazel will open iFlicks 2 and load the movie into the program, but it does not begin processing the file.
However, if iFlicks 2 is already open, it sort of works. The video will load in duplicate, then iFlicks 2 will process one video and fail to process the other. I'm assuming that it duplicates because "Kind is Movie," and after processing, the file is converted to a .m4v, which will then fail to process.
How can I fix this?
I want Hazel to take movie files, load them into iFlicks 2, update the metadata, and begin conversion.
I have my Hazel rules set as:
Kind is Movie
Run Applescript
- Code: Select all
tell application "iFlicks 2.app"
-- open file
open theFile
-- adjust settings and start
repeat with theVideo in videos
if file of theVideo as string is theFile as string then
-- modify settings and metadata
update metadata theVideo
-- start processing
start theVideo
end if
end repeat
end tell
Hazel will open iFlicks 2 and load the movie into the program, but it does not begin processing the file.
However, if iFlicks 2 is already open, it sort of works. The video will load in duplicate, then iFlicks 2 will process one video and fail to process the other. I'm assuming that it duplicates because "Kind is Movie," and after processing, the file is converted to a .m4v, which will then fail to process.
How can I fix this?