I have two scripts to watch folders for files and open in a particular application.
Script 1 will grab files even if they're in a folder, but Script 2 won't!
Script 1
on adding folder items to thisFolder after receiving addedItems
repeat with movieFile in addedItems
tell application "iFlicks"
import movieFile with gui
end tell
end repeat
end adding folder items to
Script 2
on adding folder items to thisFolder after receiving addedItems
repeat with movieFile in addedItems
if name of (info for movieFile) ends with ".mkv" then
tell application "iFlicks"
import movieFile as QuickTime movie without gui
end tell
else if name of (info for movieFile) ends with ".avi" then
tell application "iFlicks"
import movieFile as Apple TV 2 video without gui
end tell
end if
end repeat
end adding folder items to
Can someone please point out what I'm doing wrong? Thanks!
Script 1 will grab files even if they're in a folder, but Script 2 won't!
Script 1
on adding folder items to thisFolder after receiving addedItems
repeat with movieFile in addedItems
tell application "iFlicks"
import movieFile with gui
end tell
end repeat
end adding folder items to
Script 2
on adding folder items to thisFolder after receiving addedItems
repeat with movieFile in addedItems
if name of (info for movieFile) ends with ".mkv" then
tell application "iFlicks"
import movieFile as QuickTime movie without gui
end tell
else if name of (info for movieFile) ends with ".avi" then
tell application "iFlicks"
import movieFile as Apple TV 2 video without gui
end tell
end if
end repeat
end adding folder items to
Can someone please point out what I'm doing wrong? Thanks!