• 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: Scripting Apple Mail to "Go On/Offline
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Apple Mail to "Go On/Offline


  • Subject: Re: Scripting Apple Mail to "Go On/Offline
  • From: Luther Fuller <email@hidden>
  • Date: Wed, 14 May 2008 16:13:42 -0500

On May 14, 2008, at 1:11 PM, Michelle Steiner wrote:
On May 14, 2008, at 8:20 AM, Luther Fuller wrote:

This will achieve the same effect:

tell application "Mail"
	repeat with thisAccount in accounts
		set enabled of thisAccount to not enabled of thisAccount
	end repeat
end tell

But, wouldn't this take some accounts offline (those that are online) and take others online (those that are offline)?

That is correct, but Mr. Wing's original message implied that all of them would be online at the same time or offline at the same time.

I like (eventually!) to write idiot proof script. One day they are NOT going to be all on or all off because you let someone use your computer for just a moment and ... In other words, you are depending on good habits to make the script work. So, how about this ...


display dialog "blah blah blah" buttons {"All Offline", "All Online", "Cancel"} default button 3
set lineStatus to ((button returned of the result) contains "Online")
tell application "Mail"
repeat with thisAccount in accounts
set enabled of thisAccount to lineStatus
end repeat
end tell


_______________________________________________
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: Scripting Apple Mail to "Go On/Offline
      • From: Michelle Steiner <email@hidden>
References: 
 >Scripting Apple Mail to "Go On/Offline (From: Brian Christmas <email@hidden>)
 >Re: Scripting Apple Mail to "Go On/Offline (From: "W. R. Wing" <email@hidden>)
 >Re: Scripting Apple Mail to "Go On/Offline (From: Michelle Steiner <email@hidden>)
 >Re: Scripting Apple Mail to "Go On/Offline (From: Luther Fuller <email@hidden>)
 >Re: Scripting Apple Mail to "Go On/Offline (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Find duplicate numbers and replace
  • Next by Date: Re: Find duplicate numbers and replace
  • Previous by thread: Re: Scripting Apple Mail to "Go On/Offline
  • Next by thread: Re: Scripting Apple Mail to "Go On/Offline
  • Index(es):
    • Date
    • Thread