Oct 12, '04 10:55:00AM • Contributed by: Anonymous
#!/bin/sh
FILE_LIST=""
while [ "$*" != "" ]; do
FILE_LIST="$FILE_LIST , POSIX file \"$1\""
shift
done
osascript \
-e " set file_list to { $FILE_LIST } " \
-e " tell application \"Mail\" " \
-e " open file_list " \
-e " activate " \
-e " end tell "
Note that the obvious way to do this with a droplet and on open fails to work because using the open(1) command causes the on open to receive the first file passed in, rather than the list of files. I imagine this is a bug.
