• 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: Weird message saving to desktop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird message saving to desktop


  • Subject: Re: Weird message saving to desktop
  • From: Brian Christmas <email@hidden>
  • Date: Sun, 30 Sep 2012 00:26:53 +1000


On 29/09/2012, at 5:47 PM, koenig.yvan <email@hidden> wrote:

Hello

I'm puzzled.

According to the entry of your handler, I assumed that Mail was at work with one of several messages selected in a window already open.

Your extraneous code match the case where Mail is not already running.

May you give more details about the environmment available when your script calls the handler ?

Yvan KOENIG (VALLAURIS, France) samedi 29 septembre 2012 09:47:41

G'day Yvan

Here's a rough outline of what the app  does, and the problems encountered.

Regards

Santa



Incoming mail is moved to a mail folder “* items to shift” and a mail rule calls the script application MM

MM moves all mail to a new folder called “* items to store”, and calls them one at a time

Each mail is selected, and it is normally stored and treated as an rtfd document. rtfd’s with attachments are broken in Mail under Lion and Mountain Lion, so I’m trying to rebuild them, using the GUI, with some success, apart from the intermittent saving error.

An initial cover sheet is printed showing the details and attachments, with a universal date bar code.

Each attachment (usually a graphic file(s) and/or folder) is printed using CS5 suite, Graphic Converter, or QuarkXPress, depending on it’s type. A bar code is added to each graphic.

All data is saved (the email, the Attachments, and data related to clients etc) in three places for security.

As each email is dealt with, it’s saved in a dated mail folder.

Emails are sent when/if errors  occur, and also giving daily, monthly, yearly data.

As well, the App has to ‘watch’ an ftp download folder that takes priority.

Any mail that requires reprinting must be able to be dropped on the folders, and printed when activated by toggling the on/off app.



The main problems are...

  1. Emails moved from folder to folder often exist in the two folders at once, for a considerable time, and are picked up by the ‘get every message of folder “* items to store”’. I have to deal with them. I call them ‘ghosts’. I can’t use ‘get first or last message’, as they are sometimes ghosts. I get the whole list, and use a repeat loop to go through them. 
set tempstore to messages of mailbox MailBoxProcessName as list
       my CheckForSwitchOff()
try
    repeat with Cyclethroughmessages in reverse of tempstore

  1. Moving a message is often not instantaneous, and can be ‘seen’ multiple times by the script, more ghosts. I’ve had 50+ ghosts in a folder that had no visible messages in it.
  1. There doesn’t seem to be a way of saving attachments directly by scripting.
  1. There doesn’t seem to be a way of saving messages in raw message source directly by scripting
  1. because of 3 &  4 I’m trying to resort to the GUI, but it seems that if a ghost email is opened, the save to desktop fails with the error message I posted. This error is erratic, and if an email is opened that is a ghost, problems occur. I hate using GUI for this, it’s slow, and unreliable.
  1. Choosing the individual emails is difficult, the list of emails often contain ghosts. 
  1. To add to the difficulty, the Application must be idiot proof. If someone clicks on the screen during execution, or hits Quit, the app must not stop. To make it bow out gracefully, i have a small app that sets a variable in a folder. The App checks this variable, and stops appropriately. It’s imperative that no email is lost, and no attachment goes unprinted.
8. the app has been running under Snow Leopard for 18 months non-stop, running 24/7. BUT it relies on the mail being saved as rtfd’s with attachments. The Macs are only used for this, and all files must be able to be opened by PC’s. So, I change the Mac’s eml mail to emlx by appending the ‘x’. They open fine.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Weird message saving to desktop
      • From: "koenig.yvan" <email@hidden>
References: 
 >Re: Weird message saving to desktop (From: "koenig.yvan" <email@hidden>)
 >Re: Weird message saving to desktop (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Weird message saving to desktop
  • Next by Date: Continuing agrivation
  • Previous by thread: Re: Weird message saving to desktop
  • Next by thread: Re: Weird message saving to desktop
  • Index(es):
    • Date
    • Thread