Re: Mail.app - dictionary implementation questions.
Re: Mail.app - dictionary implementation questions.
- Subject: Re: Mail.app - dictionary implementation questions.
- From: crooked-eye <email@hidden>
- Date: Mon, 8 Sep 2003 23:25:33 +0100
I got it! The script below will change my Mail.app preferences to
never remove mail from server for all my accounts.
My script now opens my home share-point, copies my Mail identity from
one machine to another, changes Mail's preferences and opens Mail with
the new identity. I think my script only works as my user name and
password are the same for both machines, otherwise this would seem to
be a security risk. I've used this line 'set ignore privileges of disk
remote_disk to true' - would this command work from outside my local
network?
Thanks to everyone who has given me pointers to this script, I
definitely wouldn't have got this without your help.
John Maisey
-- If running, stop Mail.app
delay 1
--Set Deletion Policy in Mail.app to 'Never'
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")
set the mailAccts to replace_chars(mailAccts, "DeletionPolicy =
AfterInterval", "DeletionPolicy = Never")
do shell script "defaults write com.apple.mail MailAccounts '" &
mailAccts & "'"
-- open Mail app.
--string replacement subroutine from Apple's website
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
_______________________________________________
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.