Re: osascript crashed and burned getting raw source of huge email attachments
Re: osascript crashed and burned getting raw source of huge email attachments
- Subject: Re: osascript crashed and burned getting raw source of huge email attachments
- From: fortepianissimo <email@hidden>
- Date: Sat, 20 Mar 2004 08:24:36 -0800 (PST)
>
OK. What happens if you do this?:
>
set theFN to "/tmp/src.txt"
>
set sourceF to (open for access POSIX file theFN with write
permission)
>
set eof sourceF to 0 --empty anything previously in the file
>
tell application "Mail"
>
set theSel to selection
>
set theMsg to (item 1 of theSel)
>
write (source of theMsg) to sourceF --no intermediate variable
>
end tell
>
close access sourceF
Using this did produce a file without seg fault, but the file is not
very useful (size is only 286 bytes when the message itself is 2.3MB in
size, and the content of the produced file is not really readable
text).
Changing the line
write (source of theMsg) to sourceF
to
write (source of theMsg) as string to sourceF
got me this error
testGetSrc.scpt: execution error: Mail got an error: Can't make source
of message 19 of mailbox "Sent Messages" into a string. (-1700)
So I'm still stuck.
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
_______________________________________________
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.