- Code: Select all
register as application "Handbrake Encode Growler" all
‘Expected end of line, etc. but found “””.’
No idea what to do.
Moderator: Mr_Noodle
register as application "Handbrake Encode Growler" all
tell application "Finder"
try
--Set to red label to indicate processing
set label index of theFile to 2
--Assemble original and new file paths
set origFilepath to quoted form of POSIX path of (theFile as alias)
set newFilepath to (characters 1 thru -5 of origFilepath as string) & "m4v'"
--Start the conversion
set shellCommand to "nice /Applications/HandBrakeCLI -i " & origFilepath & " -o " & newFilepath & " --preset=\"Normal\" ;"
do shell script shellCommand
--Set the label to orange
set label index of theFile to 3
--Remove the old file
set shellCommand to "rm -f " & origFilepath
do shell script shellCommand
end try
end tell
tell application "Finder"
set movieName to name of item theFile
end tell
tell application "Growl"
set the allNotificationsList to {"Handbrake convert complete"}
set the enabledNotificationsList to {"Handbrake convert complete"}
register as application "Handbrake Encode Growler" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "HandBrake"
notify with name "Handbrake convert complete" title "Handbrake conversion complete" description "The video \"" & movieName & "\" has been converted." application name "Handbrake Encode Growler"
end tell