• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Saving Attachment from Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving Attachment from Mail.app


  • Subject: Re: Saving Attachment from Mail.app
  • From: John Delacour <email@hidden>
  • Date: Fri, 21 Mar 2003 18:27:33 +0000
  • Mac-eudora-version: 6.0a11

At 9:29 am -0800 21/3/03, cricket wrote:

Looks like you're doing everything correctly. My only suggestion would be to possibly explore a shell script alternative, which I've personally found to be much faster than the built-in 'write to file' functionality.


See my message of this morning entitled

SOLVED! -- Saving Attachment from Mail.app

As I have already explained, if you read my replies to this message (which quotes my original script), the slowness had nothing to do with the write command which took 1/5 of a second in my test.

You will find if you run this script that the shell script method takes about ten ticks. The osax method takes from o to 1 tick on my machine.



set _ticks to {}
set t to (the ticks)
global f
set f to "" & (path to "desk") & "temp.txt"
tell application "Mail" to set s to source of item 1 of (get selection)
set t to (the ticks)
writesource(s)
set end of _ticks to (the ticks) - t
set t to (the ticks)
writefile(s)
set end of _ticks to (the ticks) - t

on writesource(s)
set theSavedClipboard to the clipboard as record
set the clipboard to s
do shell script "pbpaste > ~/Desktop/temp.txt"
set the clipboard to theSavedClipboard
-- then process with Stuffit Expander
end writesource
on writefile(s)
set f to open for access file f with write permission
write s to f
close access f
end writefile
return _ticks
_______________________________________________
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.

References: 
 >Saving Attachment from Mail.app (From: Alan Kimelman <email@hidden>)
 >Re: Saving Attachment from Mail.app (From: cricket <email@hidden>)

  • Prev by Date: Re: Unicode search
  • Next by Date: Re: Eudora users - Did you know that...
  • Previous by thread: Re: Saving Attachment from Mail.app
  • Next by thread: Re: applescript-users digest, Vol 3 #1485 - 10 msgs
  • Index(es):
    • Date
    • Thread