<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using Mail.app with multiple users — using AppleScript: Part 2</title>
	<atom:link href="http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2</link>
	<description>Hacks, scripts and ideas for the refined geek.</description>
	<lastBuildDate>Tue, 20 Jul 2010 15:45:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Jonathan Wise</title>
		<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/comment-page-1#comment-3595</link>
		<dc:creator>Jonathan Wise</dc:creator>
		<pubDate>Wed, 30 Dec 2009 17:04:31 +0000</pubDate>
		<guid isPermaLink="false">http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2#comment-3595</guid>
		<description>Ian,
That error looks like a more systemic AppleScript problem on your machine... but I&#039;ve never used .Mac/MobileMe so you could be right. Sorry I can&#039;t help :-/</description>
		<content:encoded><![CDATA[<p>Ian,<br />
That error looks like a more systemic AppleScript problem on your machine&#8230; but I&#8217;ve never used .Mac/MobileMe so you could be right. Sorry I can&#8217;t help :-/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Galley</title>
		<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/comment-page-1#comment-3582</link>
		<dc:creator>Ian Galley</dc:creator>
		<pubDate>Sun, 06 Dec 2009 22:03:56 +0000</pubDate>
		<guid isPermaLink="false">http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2#comment-3582</guid>
		<description>Dear Jonathan,

I tried running your email account switcher applescript only to be met with this error message...

NSCannotCreateScriptCommandError

The script editor highlights &#039;accounts&#039; and got me to thinking, is the error generated because one account is .mac and the other is IMAP?  If so do you think there may be an extra few lines of code which can be added to your initial script which would solve this?

I last wrote script nearly 20 years ago so I am more than rusty, any ideas?

I&#039;m sure if I, as Admin, set up a new account from login I&#039;d not need answer the above question but where would the fun be in that?

Thanks for taking the time out to read.
Sincerely,
Ian</description>
		<content:encoded><![CDATA[<p>Dear Jonathan,</p>
<p>I tried running your email account switcher applescript only to be met with this error message&#8230;</p>
<p>NSCannotCreateScriptCommandError</p>
<p>The script editor highlights &#8216;accounts&#8217; and got me to thinking, is the error generated because one account is .mac and the other is IMAP?  If so do you think there may be an extra few lines of code which can be added to your initial script which would solve this?</p>
<p>I last wrote script nearly 20 years ago so I am more than rusty, any ideas?</p>
<p>I&#8217;m sure if I, as Admin, set up a new account from login I&#8217;d not need answer the above question but where would the fun be in that?</p>
<p>Thanks for taking the time out to read.<br />
Sincerely,<br />
Ian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Wise</title>
		<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/comment-page-1#comment-3306</link>
		<dc:creator>Jonathan Wise</dc:creator>
		<pubDate>Sun, 06 Sep 2009 00:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2#comment-3306</guid>
		<description>Try it with a longer delay, Stew!</description>
		<content:encoded><![CDATA[<p>Try it with a longer delay, Stew!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Wise</title>
		<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/comment-page-1#comment-3305</link>
		<dc:creator>Jonathan Wise</dc:creator>
		<pubDate>Sat, 05 Sep 2009 00:44:36 +0000</pubDate>
		<guid isPermaLink="false">http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2#comment-3305</guid>
		<description>Sorry, I can&#039;t think of anything. If you want to send me the code of your script I can take a look...</description>
		<content:encoded><![CDATA[<p>Sorry, I can&#8217;t think of anything. If you want to send me the code of your script I can take a look&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stew Hutton</title>
		<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/comment-page-1#comment-3304</link>
		<dc:creator>Stew Hutton</dc:creator>
		<pubDate>Wed, 02 Sep 2009 03:54:25 +0000</pubDate>
		<guid isPermaLink="false">http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2#comment-3304</guid>
		<description>Hey Jonathan, this script works really well and is exactly what I was looking for. I&#039;m having  one issue though. The script runs really well when hitting &quot;run&quot; in script editor, but I&#039;m getting the following error when I try to run it saved as an application:

When I try to access my account &quot;Stew Gmail&quot;

Can&#039;t set &lt;&gt; of &lt;&gt; &quot;Mere Gmail&quot; of application &quot;Mail&quot; to false.

and when I try to access my wife&#039;s email &quot;Mere Gmail&quot;

Can&#039;t set &lt;&gt; of &lt;&gt; &quot;Stew Gmail&quot; of application &quot;Mail&quot; to false.


Any idea what I&#039;m doing wrong?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hey Jonathan, this script works really well and is exactly what I was looking for. I&#8217;m having  one issue though. The script runs really well when hitting &#8220;run&#8221; in script editor, but I&#8217;m getting the following error when I try to run it saved as an application:</p>
<p>When I try to access my account &#8220;Stew Gmail&#8221;</p>
<p>Can&#8217;t set &lt;&gt; of &lt;&gt; &#8220;Mere Gmail&#8221; of application &#8220;Mail&#8221; to false.</p>
<p>and when I try to access my wife&#8217;s email &#8220;Mere Gmail&#8221;</p>
<p>Can&#8217;t set &lt;&gt; of &lt;&gt; &#8220;Stew Gmail&#8221; of application &#8220;Mail&#8221; to false.</p>
<p>Any idea what I&#8217;m doing wrong?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GERALD</title>
		<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/comment-page-1#comment-3299</link>
		<dc:creator>GERALD</dc:creator>
		<pubDate>Wed, 26 Aug 2009 23:29:37 +0000</pubDate>
		<guid isPermaLink="false">http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2#comment-3299</guid>
		<description>Jonathan.  Fantastic little script.  It took me around 2 minutes to find you on the internet as we had the same challenge as you and your wife with regards to accessing only our particular mail account.  Thanks so much.  Works like a charm!  Gerald.</description>
		<content:encoded><![CDATA[<p>Jonathan.  Fantastic little script.  It took me around 2 minutes to find you on the internet as we had the same challenge as you and your wife with regards to accessing only our particular mail account.  Thanks so much.  Works like a charm!  Gerald.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Wise</title>
		<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/comment-page-1#comment-3246</link>
		<dc:creator>Jonathan Wise</dc:creator>
		<pubDate>Thu, 16 Jul 2009 13:11:42 +0000</pubDate>
		<guid isPermaLink="false">http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2#comment-3246</guid>
		<description>Bitte :)</description>
		<content:encoded><![CDATA[<p>Bitte <img src='http://www.wiseontech.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco</title>
		<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/comment-page-1#comment-3244</link>
		<dc:creator>Marco</dc:creator>
		<pubDate>Wed, 15 Jul 2009 20:48:15 +0000</pubDate>
		<guid isPermaLink="false">http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2#comment-3244</guid>
		<description>Hallo Jonathan,

vielen Dank für die ausführlichen Beschreibungen und Hilfen. Nach langem Suchen bin ich auf deine Seite gestoßen und es funktioniert fantastisch :-)</description>
		<content:encoded><![CDATA[<p>Hallo Jonathan,</p>
<p>vielen Dank für die ausführlichen Beschreibungen und Hilfen. Nach langem Suchen bin ich auf deine Seite gestoßen und es funktioniert fantastisch <img src='http://www.wiseontech.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Wise</title>
		<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/comment-page-1#comment-3088</link>
		<dc:creator>Jonathan Wise</dc:creator>
		<pubDate>Wed, 18 Mar 2009 15:21:50 +0000</pubDate>
		<guid isPermaLink="false">http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2#comment-3088</guid>
		<description>Sure Dan, this script could be used to toggle 5 or 50 accounts. Just modify the blocks of code that happen after a button is pressed, adding support for those other accounts...

&lt;code&gt;
if the button returned of the result is &quot;Jonathan&quot; then
&#160;&#160;tell application &quot;Mail&quot;
&#160;&#160;&#160;    activate
&#160;&#160;&#160;    delay 2
&#160;&#160;&#160;    set enabled of account &quot;Elizabeth Home&quot; to false
&#160;&#160;&#160;    set enabled of account &quot;Jonathan Home&quot; to true
&#160;&#160;&#160;    set enabled of account &quot;Jonathan Work&quot; to true
&#160;&#160;&#160;    set enabled of account &quot;Jonathan GMail&quot; to true
&#160;&#160;  end tell
else
&#160;&#160;  tell application &quot;Mail&quot;
&#160;&#160;&#160;    activate
&#160;&#160;&#160;    delay 2
&#160;&#160;&#160;    set enabled of account &quot;Jonathan Home&quot; to false
&#160;&#160;&#160;    set enabled of account &quot;Jonathan Work&quot; to false
&#160;&#160;&#160;    set enabled of account &quot;Jonathan GMail&quot; to false
&#160;&#160;&#160;    set enabled of account &quot;Elizabeth Home&quot; to true
&#160;&#160;  end tell
end if
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Sure Dan, this script could be used to toggle 5 or 50 accounts. Just modify the blocks of code that happen after a button is pressed, adding support for those other accounts&#8230;</p>
<p><code><br />
if the button returned of the result is "Jonathan" then<br />
&nbsp;&nbsp;tell application "Mail"<br />
&nbsp;&nbsp;&nbsp;    activate<br />
&nbsp;&nbsp;&nbsp;    delay 2<br />
&nbsp;&nbsp;&nbsp;    set enabled of account "Elizabeth Home" to false<br />
&nbsp;&nbsp;&nbsp;    set enabled of account "Jonathan Home" to true<br />
&nbsp;&nbsp;&nbsp;    set enabled of account "Jonathan Work" to true<br />
&nbsp;&nbsp;&nbsp;    set enabled of account "Jonathan GMail" to true<br />
&nbsp;&nbsp;  end tell<br />
else<br />
&nbsp;&nbsp;  tell application "Mail"<br />
&nbsp;&nbsp;&nbsp;    activate<br />
&nbsp;&nbsp;&nbsp;    delay 2<br />
&nbsp;&nbsp;&nbsp;    set enabled of account "Jonathan Home" to false<br />
&nbsp;&nbsp;&nbsp;    set enabled of account "Jonathan Work" to false<br />
&nbsp;&nbsp;&nbsp;    set enabled of account "Jonathan GMail" to false<br />
&nbsp;&nbsp;&nbsp;    set enabled of account "Elizabeth Home" to true<br />
&nbsp;&nbsp;  end tell<br />
end if<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.wiseontech.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2/comment-page-1#comment-3087</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 17 Mar 2009 22:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://software.jonandnic.com/hack/using-mailapp-with-multiple-users-%e2%80%94-using-applescript-part-2#comment-3087</guid>
		<description>Jonathan,

I love this idea and was wondering how you would address the following situation-
I currently have 5 email accounts set up for myself (various organizations require separate accounts) and my wife has one account. I would like to set up your separate user access, but want to be able to send/receive mail on my 5 accounts at the same time without having to set up separate access for each of those. This is currently how I have it set up in Entourage, but I&#039;m moving back to mac mail and want the same functionality, except I want to separate my wife&#039;s account so she has her own access and her mail is not mixed in with my accounts. Any idea if your script or a variation of it would work?</description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>I love this idea and was wondering how you would address the following situation-<br />
I currently have 5 email accounts set up for myself (various organizations require separate accounts) and my wife has one account. I would like to set up your separate user access, but want to be able to send/receive mail on my 5 accounts at the same time without having to set up separate access for each of those. This is currently how I have it set up in Entourage, but I&#8217;m moving back to mac mail and want the same functionality, except I want to separate my wife&#8217;s account so she has her own access and her mail is not mixed in with my accounts. Any idea if your script or a variation of it would work?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
