I am a total Applescript newbie - mostly I work by copying examples.
I have created a simple droplet that uses the image mounter built into Toast to mount disk images that are dropped on the droplet without actually launching the full Toast program. The droplet works, but I would like the script to quit once the disk images are mounted. (As things stand now, the script application becomes unresponsive shortly after the images are mounted, but sometimes it doesn't quit when the images are dismounted.) I searched the forum and figured out I'm supposed to do a "redirect" using > /dev/null 2>&1 &, but I can't get the syntax right.
May I please have some help - Thanks!
on open image
set mount to "/Applications/'Toast 11 Titanium/Toast Titanium.app'/Contents/MacOS/ToastImageMounter"
repeat with path in image
set mount to mount & space & quote & POSIX path of path & quote
end repeat
do shell script mount
end open
EDIT: I solved it, but I'm sure this isn't the most elegant solution, so I'd appreciate feedback.
on open image
set mount to "/Applications/'Toast 11 Titanium/Toast Titanium.app'/Contents/MacOS/ToastImageMounter"
set foo to space & "> /dev/null 2>&1 &"
repeat with path in image
set mount to mount & space & quote & POSIX path of path & quote & foo
end repeat
do shell script mount
end open