I keep getting that the variable fileLocation isn’t defined…
on open draggedItems
repeat with currentFile in draggedItems
tell application "QuickTime Player"
set openedFile to open (currentFile as alias)
set fileLocation to the location of openedFile
set fileName to the name of openedFile
set newFile to the name of openedFile & ".m4a"
export openedFile to file newFile as MPEG4 using most recent settings
close openedFile
end tell
display dialog fileLocation
end repeat
end open