• 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 script help needed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail.app script help needed


  • Subject: Re: Mail.app script help needed
  • From: deivy petrescu <email@hidden>
  • Date: Fri, 18 Mar 2005 10:22:43 -0500


On Mar 18, 2005, at 2:55, Michelle Steiner wrote:

Here is the script:

tell application "Mail"
set account_List to (name of accounts)
end tell
set selected_Accounts to (choose from list (account_List) with multiple selections allowed without empty selection allowed)
if selected_Accounts is not false then
tell application "Mail"
set include when getting new mail of every account to false
repeat with this_account in selected_Accounts
set (include when getting new mail of account this_account) to true
end repeat
end tell
end if



This line errors: set (include when getting new mail of account this_account) to true

Here is the error:

set include when getting new mail of account "email@hidden" to true
"Mail got an error: NSReceiverEvaluationScriptError: 4"


The "every account" line works, but the line that sets only one account fails.



Michelle change your script to :

----
tell application "Mail"
set account_List to (name of accounts)
set selected_Accounts to (choose from list (account_List) with multiple selections allowed without empty selection allowed)
if selected_Accounts is not false then
set include when getting new mail of every account to false
repeat with this_account in selected_Accounts
set this_account to contents of this_account --> major change
set (account this_account)'s include when getting new mail to true
end repeat
end if
end tell
---







deivy -------------------------------------------- Agora quem da bola é o Santos, Salve o novo campeão! _______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Mail.app script help needed
      • From: Michelle Steiner <email@hidden>
References: 
 >Mail.app script help needed (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Unicode Codepoints
  • Next by Date: Re: Mail.app script help needed
  • Previous by thread: Mail.app script help needed
  • Next by thread: Re: Mail.app script help needed
  • Index(es):
    • Date
    • Thread