• 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: Mail.app - dictionary implementation questions.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail.app - dictionary implementation questions.


  • Subject: Re: Mail.app - dictionary implementation questions.
  • From: crooked-eye <email@hidden>
  • Date: Wed, 3 Sep 2003 08:48:27 +0100

On Wednesday, September 3, 2003, at 02:21 am, John W. Baxter wrote:

I don't see anything short of reading the top level tag, modifying the text
as desired, and writing the tag that would allow defaults to be used.

I thought I had it there for a minute.

I have just been trying this script below, and as you said,
(A backup "might" be a good idea.)
Luckily I had a backup of com.apple.mail.plist.

set mailAccts to do shell script "defaults read com.apple.mail \"MailAccounts\"" as string
set the mailAccts to replace_chars(mailAccts, "DeletionPolicy = RightAway", "DeletionPolicy = Never")
display dialog mailAccts
set theResult to do shell script "defaults write com.apple.mail \"MailAccounts\" -array '" & mailAccts & "'"
display dialog theResult

on replace_chars(this_text, search_string, replacement_string)
set AppleScript's text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript's text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript's text item delimiters to ""
return this_text
end replace_chars


The script returns an empty string, and my email account preferences are scrubbed leaving me with the email internet settings as recorded in the System Preferences. What is wrong with this script?

Thanks for your help

John Maisey
_______________________________________________
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.

  • Follow-Ups:
    • Re: Mail.app - dictionary implementation questions.
      • From: crooked-eye <email@hidden>
References: 
 >Re: Mail.app - dictionary implementation questions. (From: "John W. Baxter" <email@hidden>)

  • Prev by Date: RE: Prob w/Jons Commands & Novell
  • Next by Date: Re: tell application "FileMaker Pro/Developer"
  • Previous by thread: Re: Mail.app - dictionary implementation questions.
  • Next by thread: Re: Mail.app - dictionary implementation questions.
  • Index(es):
    • Date
    • Thread