Moderator: Mr_Noodle
if name extension of (info for theFile) is "mp4" then
-- display dialog "Passing Through import - mp4" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as QuickTime movie with deleting without gui
end tell
else if name extension of (info for theFile) is "mkv" then
-- display dialog "Passing Through import - mkv" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as QuickTime movie with deleting without gui
set newFile to POSIX path of the result
end tell
else if name extension of (info for theFile) is "m2ts" then
-- display dialog "Passing Through import - m2ts" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as QuickTime movie with deleting without gui
end tell
else if name extension of (info for theFile) is "avi" then
-- display dialog "Converting import - avi" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as new Apple TV & iPad video with deleting without gui
end tell
end if
{hazelSwitchFile:newFile}
tell application "Finder"
move theFile to "/Users/<me>/Music/iTunes/iTunes Media/Automatically Add to iTunes/" as alias
end tell
return {hazelSwitchFile:newFile}
if name extension of (info for theFile) is "mp4" then
-- display dialog "Passing Through import - mp4" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as QuickTime movie with deleting without gui
end tell
else if name extension of (info for theFile) is "mkv" then
-- display dialog "Passing Through import - mkv" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as QuickTime movie with deleting without gui
end tell
else if name extension of (info for theFile) is "m2ts" then
-- display dialog "Passing Through import - m2ts" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as QuickTime movie with deleting without gui
end tell
else if name extension of (info for theFile) is "avi" then
-- display dialog "Converting import - avi" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as new Apple TV & iPad video with deleting without gui
end tell
end if
return {hazelSwitchFile:the result}
tell application "Finder"
move theFile to "/Users/<me>/Music/iTunes/iTunes Media/Automatically Add to iTunes/" as alias
end tell
MoodyM wrote:The following script STILL tells me the variable "result" is undefined:
if name extension of (info for theFile) is "mp4" then
-- display dialog "Passing Through import - mp4" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as QuickTime movie with deleting without gui
end tell
else if name extension of (info for theFile) is "mkv" then
-- display dialog "Passing Through import - mkv" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as QuickTime movie with deleting without gui
end tell
else if name extension of (info for theFile) is "m2ts" then
-- display dialog "Passing Through import - m2ts" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as QuickTime movie with deleting without gui
end tell
else if name extension of (info for theFile) is "avi" then
-- display dialog "Converting import - avi" buttons {"OK"} default button 1
tell application "iFlicks"
import theFile as new Apple TV & iPad video with deleting without gui
end tell
end if