|
|
-- Mailsmith.applescript
-- Scope
-- Copyright (c) 2002 Apple Computer. All rights reserved.
-- Adapted for use with Mailsmith by Charlie Garrison; 2003-06-04
on mail_images(email_subject, default_address, image_count, new_files, new_captions, new_comments, cancel_string)
try
tell application "Mailsmith"
activate
set the new_message to make new message window
tell new_message
set the subject to email_subject
if image_count is 0 then
set the comments to new_captions
else
set the comments to return & return & return & return
end if
repeat with image_idx from 1 to image_count
set this_caption to item image_idx of new_captions
set this_comment to item image_idx of new_comments
set the comments to the comments & this_caption & return & this_comment & return & return & return
end repeat
set the contents to comments
repeat with image_idx from 1 to image_count
set this_imagefile to item image_idx of new_files
set this_caption to item image_idx of new_captions
set this_comment to item image_idx of new_comments
set the comments to this_caption & return & this_comment
make new enclosure at end with properties {file:this_imagefile}
end repeat
end tell
end tell
on error error_message number error_number
log error_message & " " & error_number
if the error_number is not -128 then
tell application "Finder"
beep
display dialog error_message buttons {cancel_string} default button 1
end tell
end if
end try
end mail_images
property ASDScriptUniqueIdentifier : "Mailsmith.applescript"
|
|||||||||