• 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: file path problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file path problem


  • Subject: Re: file path problem
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 30 Jun 2011 06:45:22 -0700

On Jun 30, 2011, at 1:36 AM, Jean-Christophe Helary wrote:

The problem is that, when I use that script on a reply (ie a mail that has a ":" in the subject). The script ends with an error:

File file Macintosh HD:...:...:...:(part of the subject before":"):(part of the subject after":").eml was not found.

My idea is that the ":" in the reply is considered as a folder separator when put into the path and I'd like to avoid that obviously.

Is there a way to fix that ?

You could try this:

set job_name to "Re: file path problem"
set AppleScript's text item delimiters to ":"
set job_items to text items of job_name
set AppleScript's text item delimiters to "-" -- or whatever separator you want
set job_name to job_items as text

Save and restore the original text item delimiters if you wish.

Also, it would be a good idea to put that code as well as the code that writes the file outside the tell application "mail" wrapper.

-- Michelle

--
"The right to be heard does not automatically include the right to be taken seriously." -- Hubert H. Humphrey 

 _______________________________________________
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: file path problem
      • From: Luther Fuller <email@hidden>
References: 
 >file path problem (From: Jean-Christophe Helary <email@hidden>)

  • Prev by Date: Re: file path problem
  • Next by Date: Re: Help with retrieving messages from GMail account in Mail.app
  • Previous by thread: Re: file path problem
  • Next by thread: Re: file path problem
  • Index(es):
    • Date
    • Thread