(* * This is a droplet that will u/l dropped files and open a message * in Mail.app with the urls. *) on open filelist -- create the command line set this_command to "/usr/local/bin/maillink" repeat with i in filelist set this_command to this_command & " " & quoted form of POSIX path of i end repeat -- use Terminal.app to run the command, so that we can see progress -- and handle interactive parts such as entering passwords tell application "Terminal" activate -- The bit of shell-code at the end is there b/c Terminal.app -- runs the command under 'login -fp' and this way the window -- will close after a successful transfer, but will stay open -- if the Settings have 'Close only if the shell exited cleanly' -- on an error. This bit of code also works regardless of if -- the login shell is a Bourne or csh styles shell. do script this_command & " && exit || kill `ps $$ -o ppid=`" end tell end open