saving mail.app attachment
saving mail.app attachment
- Subject: saving mail.app attachment
- From: Alan Kimelman <email@hidden>
- Date: Tue, 3 Jun 2003 17:37:14 -0700
When I select a message in mail and run this script, it causes Stuffit
Deluxe to err with a -211 error code. I want to extract or save a mail
attachment but I cannot figure what is causing the error in the scrip
or any manner that will fix it. Any ideas?
tell application "Mail"
set selectedMessages to (get selection)
set s to source of item 1 of selectedMessages
end tell
set theSavedClipboard to the clipboard as record
set the clipboard to s
set f to "/tmp/temp.txt"
set fMac to POSIX file f
try
close access fMac
end try
open for access fMac with write permission
set eof fMac to 0
write s to fMac
close access fMac
set the clipboard to theSavedClipboard
set DestinationFolder to "Macintosh HD:foo:Destination"
tell application "StuffIt Deluxe" to set {d} to decode {alias fMac}
into alias DestinationFolder
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.