Re: Scripting Apple Mail to "Go On/Offline
Re: Scripting Apple Mail to "Go On/Offline
- Subject: Re: Scripting Apple Mail to "Go On/Offline
- From: Michelle Steiner <email@hidden>
- Date: Wed, 14 May 2008 11:11:40 -0700
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.
Aren't you wanting something like Mail's "Take All Accounts ..."
menu items? But, these are not directly scriptable!
So, what about this ...
property lineStatus : false
set lineStatus to not lineStatus
tell application "Mail"
repeat with thisAccount in accounts
set enabled of thisAccount to lineStatus
end repeat
end tell
You would have to run it twice initially to get all the accounts
disabled; after that, it would toggle all the accounts together.
-- Michelle
--
We're surrounded. That simplifies the problem.
_______________________________________________
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