<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/">

<channel>
	<title>TannieSpace &#187; easy</title>
	<atom:link href="http://tanniespace.com/tag/easy/feed/" rel="self" type="application/rss+xml" />
	<link>http://tanniespace.com</link>
	<description>geekery, drawing, and then some</description>
	<lastBuildDate>Sat, 24 Dec 2011 08:32:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Applescripts for OmniFocus: change the context or project of selected tasks.</title>
		<link>http://tanniespace.com/2009/applescripts-for-omnifocus-change-the-context-or-project-of-selected-tasks/</link>
		<comments>http://tanniespace.com/2009/applescripts-for-omnifocus-change-the-context-or-project-of-selected-tasks/#comments</comments>
		<pubDate></pubDate>
		<dc:creator>tanja</dc:creator>
				<category><![CDATA[geekery]]></category>
		<category><![CDATA[random_stuff]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[context]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[omnifocus]]></category>
		<category><![CDATA[omniweb]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://tanniespace.com/applescripts-for-omnifocus-change-the-context-or-project-of-selected-tasks/</guid>
		<description><![CDATA[I use OmniFocus a lot, and have recently tweaked some more AppleScripts to make my workflow even more smooth. I can add any mail to OmniFocus for replies, add confirmation of orders from mail to OmniFocus which will automatically go into my project-shoebox for orders, with a &#8216;waiting for&#8217; context and a due date set [...]]]></description>
			<content:encoded><![CDATA[<p>I use OmniFocus a lot, and have recently tweaked some more AppleScripts to make my workflow even more smooth. I can add any mail to OmniFocus for replies, add confirmation of orders from mail to OmniFocus which will automatically go into my project-shoebox for orders, with a &#8216;waiting for&#8217; context and a due date set to 1 week into the future, unless I&#8217;ve changed or added <a href="http://www.indev.ca/MailTags.html">MailTags</a> with a project, a keyword and a due date. In that case it&#8217;ll take the project, the first keyword and the due date and use them to set up the OmniFocus task. I have a few more scripts:</p>

<ul>
<li>in OmniWeb I can take and add a URL for later reading, it&#8217;ll go into my inbox by default</li>
<li>in OmniWeb I can take and add a URL to my &#8216;wish-list&#8217; project (with a start date for at 2 weeks in the future)</li>
<li>in OmniFocus I have scripts to easily change the context or the project of selected tasks</li>
<li>in Mail I can press a key and have the selected e-mail(s) sent to OmniFocus with a &#8216;Respond to: &#8216; before the subject line, sorting into either a default project or the one specified in MailTags, with the context set to &#8216;mail&#8217; and the message URL in the note-field</li>
<li>in OmniFocus I can select such a task, press a key to run a script that will open the message and immediately create a reply (I have a separate one for just opening, in case I have to read it thoroughly first)</li>
</ul>

<p>All these scripts make the integration between all these programs very easy. That and <a href="http://www.red-sweater.com/fastscripts/">FastScripts</a>.<br />
I found useful scripts over at <a href="http://www.rose-hulman.edu/~clifton/software.html">Curtis Clifton&#8217;s site</a>. His scripts use <a href="http://growl.info/">Growl</a> notification so if you have Growl installed you get a small notification.</p>

<p>I had some trouble putting my own scripts together, so I decided to paste the info here, just in case I need it later on, or someone else runs into similar issues. I found it quite hard to figure out how to add a task to an existing project or to move it from inbox / other project. In the end, it only took a few lines.</p>

<p><span id="more-1207"></span>
First, when I started my script, I wanted a default project or context (I&#8217;ll use &#8216;project&#8217; from now on, but it also applies to the context-script). To do this I created a &#8216;property&#8217; at the beginning of the script:</p>

<div class="codecolorer-container applescript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">property</span> defaultProject : <span style="color: #009900;">&quot;Miscellaneous&quot;</span><br />
<span style="color: #ff0033; font-weight: bold;">property</span> alertItemNum : <span style="color: #009900;">&quot;&quot;</span></div></div>

<p>I used the alterItemNum for my alerts through this very simple routine:</p>

<div class="codecolorer-container applescript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">on</span> notify<span style="color: #000000;">&#40;</span>alertName, alertTitle, alertText<span style="color: #000000;">&#41;</span><br />
&nbsp; <span style="color: #0066ff;">display dialog</span> alertText <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">string</span> <span style="color: #ff0033; font-weight: bold;">with</span> icon <span style="color: #000000;">1</span><br />
<span style="color: #ff0033; font-weight: bold;">end</span> notify</div></div>

<p>That went at the end of my script.</p>

<p>I started by addressing OmniFocus and &#8216;talking&#8217; to the open document:</p>

<div class="codecolorer-container applescript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;OmniFocus&quot;</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #ff0033;">front</span> <span style="color: #0066ff;">document</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #000000;">&#40;</span><span style="color: #ff0033;">first</span> <span style="color: #0066ff;">document</span> <span style="color: #0066ff;">window</span> <span style="color: #ff0033;">whose</span> <span style="color: #ff0033;">index</span> <span style="color: #ff0033; font-weight: bold;">is</span> <span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span></div></div>

<p>Then, I checked to see if that document had anything selected, and if not, give an error-dialogue:</p>

<div class="codecolorer-container applescript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">set</span> SelectedItems <span style="color: #ff0033; font-weight: bold;">to</span> selected trees <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">content</span><br />
<span style="color: #ff0033; font-weight: bold;">set</span> numItems <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#40;</span><span style="color: #0066ff;">count</span> <span style="color: #0066ff;">items</span> <span style="color: #ff0033; font-weight: bold;">of</span> SelectedItems<span style="color: #000000;">&#41;</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">if</span> numItems <span style="color: #ff0033; font-weight: bold;">is</span> <span style="color: #000000;">0</span> <span style="color: #ff0033; font-weight: bold;">then</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> alertName <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;Error&quot;</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> alertTitle <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;Script failure&quot;</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> alertText <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;No valid task(s) selected&quot;</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">my</span> notify<span style="color: #000000;">&#40;</span>alertName, alertTitle, alertText<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">return</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">if</span></div></div>

<p>If I have no items selected, the script will call the alert routine from above ( my notify(alertName, alertTitle, alertText) ). Because I created a separate routine, I can use this anywhere in the script.</p>

<p>Next, display a dialogue asking for the project:</p>

<div class="codecolorer-container applescript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0066ff;">display dialog</span> <span style="color: #009900;">&quot;Change to what Project? &quot;</span> <span style="color: #0066ff;">default answer</span> defaultProject <span style="color: #0066ff;">buttons</span> <span style="color: #000000;">&#123;</span><span style="color: #009900;">&quot;Cancel&quot;</span>, <span style="color: #009900;">&quot;OK&quot;</span><span style="color: #000000;">&#125;</span> default button <span style="color: #000000;">2</span><br />
<br />
<span style="color: #ff0033; font-weight: bold;">set</span> theProject <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#40;</span><span style="color: #ff0033;">the</span> <span style="color: #0066ff;">text</span> returned <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #ff0033;">the</span> <span style="color: #0066ff;">result</span><span style="color: #000000;">&#41;</span></div></div>

<p>The variable &#8216;theProject&#8217; will now contain the name of the (new) project to move the tasks too.</p>

<p>Next, the loop to go through all the items and move them:</p>

<div class="codecolorer-container applescript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">set</span> selectNum <span style="color: #ff0033; font-weight: bold;">to</span> numItems<br />
<span style="color: #ff0033; font-weight: bold;">set</span> successTot <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">0</span><br />
&nbsp;<span style="color: #ff0033; font-weight: bold;">repeat</span> <span style="color: #ff0033; font-weight: bold;">while</span> selectNum &gt; <span style="color: #000000;">0</span><br />
&nbsp; &nbsp;<span style="color: #ff0033; font-weight: bold;">set</span> selectedItem <span style="color: #ff0033; font-weight: bold;">to</span> value <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">item</span> selectNum <span style="color: #ff0033; font-weight: bold;">of</span> SelectedItems<br />
&nbsp; &nbsp;<span style="color: #ff0033; font-weight: bold;">set</span> succeeded <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033; font-weight: bold;">my</span> ChangeProject<span style="color: #000000;">&#40;</span>selectedItem, theProject<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #ff0033; font-weight: bold;">if</span> succeeded <span style="color: #ff0033; font-weight: bold;">then</span> <span style="color: #ff0033; font-weight: bold;">set</span> successTot <span style="color: #ff0033; font-weight: bold;">to</span> successTot <span style="color: #000000;">+</span> <span style="color: #000000;">1</span><br />
&nbsp; &nbsp;<span style="color: #ff0033; font-weight: bold;">set</span> selectNum <span style="color: #ff0033; font-weight: bold;">to</span> selectNum <span style="color: #000000;">-</span> <span style="color: #000000;">1</span><br />
&nbsp;<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">repeat</span></div></div>

<p>This loop will end as soon as the variable &#8216;selectNum&#8217; (= numItems which I set to the count of the items in the variable SelectedItems) reaches 0. It calls the routine &#8216;ChangeProject&#8217; which I&#8217;ll get to in a bit, but I first want to wrap up this part.
Let me also explain the &#8216;if succeeded then set successTot to successTot + 1&#8242; line. The line before sets &#8216;succeeded&#8217; to the result of the ChangeProject routine. This result can mean anything, numbers, letters, whatever. In this case we use it to return a &#8216;true&#8217; or &#8216;false&#8217;. That way, we only need to use &#8216;if succeeded&#8217; (which will either be &#8216;true&#8217; or &#8216;false&#8217;) as a condition. We don&#8217;t need to check the actual content of the variable. This can come in handy for various checks, and it took me a while to catch on to that, so I figured I&#8217;d mention it here.</p>

<p>To end this main routine, I used:</p>

<div class="codecolorer-container applescript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> alertName <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;General&quot;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> alertTitle <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;Script complete&quot;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">if</span> successTot <span style="color: #000000;">&amp;</span>gt; <span style="color: #000000;">1</span> <span style="color: #ff0033; font-weight: bold;">then</span> <span style="color: #ff0033; font-weight: bold;">set</span> alertItemNum <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;s&quot;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> alertText <span style="color: #ff0033; font-weight: bold;">to</span> successTot <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot; item&quot;</span> <span style="color: #000000;">&amp;</span> alertItemNum <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot; changed to Project &quot;</span> <span style="color: #000000;">&amp;</span> theProject<br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span><br />
<span style="color: #ff0033; font-weight: bold;">my</span> notify<span style="color: #000000;">&#40;</span>alertName, alertTitle, alertText<span style="color: #000000;">&#41;</span><br />
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></div></div>

<p>Basically, this tells the dialogue box to say the script ran successfully and displays the number of items successfully moved and only to use the &#8216;s&#8217; after &#8216;item&#8217; if the count of successful moves is higher than 1.</p>

<p>That wraps up the main part.</p>

<p>The routine to actually move the task to the other project only took 21 lines:</p>

<div class="codecolorer-container applescript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">on</span> ChangeProject<span style="color: #000000;">&#40;</span>selectedItem, theProject<span style="color: #000000;">&#41;</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> success <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">false</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;OmniFocus&quot;</span> <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033; font-weight: bold;">tell</span> default <span style="color: #0066ff;">document</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>theProject <span style="color: #ff0033; font-weight: bold;">is</span> <span style="color: #ff0033;">not</span> <span style="color: #009900;">&quot;&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #ff0033; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> MyProjectArray <span style="color: #ff0033; font-weight: bold;">to</span> null<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> MyProjectArray <span style="color: #ff0033; font-weight: bold;">to</span> complete theProject <span style="color: #ff0033;">as</span> project maximum matches <span style="color: #000000;">1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">try</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> MyProjectID <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">id</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #ff0033;">first</span> <span style="color: #0066ff;">item</span> <span style="color: #ff0033; font-weight: bold;">of</span> MyProjectArray<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> theNewProject <span style="color: #ff0033; font-weight: bold;">to</span> project <span style="color: #0066ff;">id</span> MyProjectID<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">on</span> <span style="color: #ff0033; font-weight: bold;">error</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> theNewProject <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#40;</span><span style="color: #0066ff;">make</span> project <span style="color: #ff0033; font-weight: bold;">with</span> <span style="color: #0066ff;">properties</span> <span style="color: #000000;">&#123;</span><span style="color: #0066ff;">name</span>:theProject<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">try</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">try</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> newtask <span style="color: #ff0033; font-weight: bold;">to</span> selectedItem<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066ff;">move</span> newtask <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">of</span> tasks <span style="color: #ff0033; font-weight: bold;">of</span> theNewProject<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> success <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">true</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">try</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">if</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">return</span> success<br />
<span style="color: #ff0033; font-weight: bold;">end</span> ChangeProject</div></div>

<p>The first line sets the success to &#8216;false&#8217;, because we want to actively, <em>after</em> having our success, set it to &#8216;true&#8217;.<br />
We then chat with OmniFocus again, and this time, we&#8217;ll just talk to the default document (the one you have open). If the variable &#8216;theProject&#8217; is not empty, we&#8217;ll continue. If it is, the &#8216;if-end if&#8217; ends, without having set the &#8216;success&#8217; variable to true (and thus, the script failed). You could technically build in an extra loop to change it to a default project, however, I prefer it this way. If I accidentally emptied that dialogue-box, nothing will happen, just as I like it.</p>

<p>If theProject does contain something (anything), the script continues with its routine. It sets the MyProjectArry to null (makes it empty, just in case). It then used OmniFocus complete option to find the first matching project of OmniFocuses project-list. If you&#8217;ve ever only typed the first three letters in one of OmniFocus&#8217;s project-areas (to set the project) and it magically came up with the right project, this is the same thing. It means you only have to type the first three or four letters of your project, and the script will find it. If it can&#8217;t find the project, it will create it for you (at the end of your project-list).</p>

<p>After that, it will simply try to add the task to the desired project.</p>

<div class="codecolorer-container applescript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">try</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> newtask <span style="color: #ff0033; font-weight: bold;">to</span> selectedItem<br />
&nbsp; <span style="color: #0066ff;">move</span> newtask <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">of</span> tasks <span style="color: #ff0033; font-weight: bold;">of</span> theNewProject<br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> success <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">true</span><br />
<span style="color: #ff0033; font-weight: bold;">end</span></div></div>

<p>I&#8217;ve copied this part again, because <em>this</em> took me hours to figure out. I knew how to do it for a context-change:</p>

<div class="codecolorer-container applescript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">try</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> newtask <span style="color: #ff0033; font-weight: bold;">to</span> selectedItem<br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> context <span style="color: #ff0033; font-weight: bold;">of</span> newtask <span style="color: #ff0033; font-weight: bold;">to</span> theNewContext<br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> success <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">true</span><br />
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">try</span></div></div>

<p>so I tried to &#8216;set project of newtask to theNewProject&#8217; but that didn&#8217;t work. It drove me crazy for a while, still haven&#8217;t fully recovered&#8230;</p>

<p>But it works! The complete script changes the project of selected tasks and gives a confirmation dialogue (so you know that it happened). Of course, before using it, make a back up of your OmniFocus database, and run the script from Script Editor first. Open the &#8216;Event Log&#8217; (&#8984;-3) to follow what happens while you run the script.</p>

<p><strong>zipped up version of <a href="http://tanniespace.com/files/2009/09/ChangeProject.scpt.zip">ChangeProject</a> and <a href="http://tanniespace.com/files/2009/09/ChangeContext.scpt.zip">ChangeContext</a> for easy downloading</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://tanniespace.com/2009/applescripts-for-omnifocus-change-the-context-or-project-of-selected-tasks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy peasy beans.</title>
		<link>http://tanniespace.com/2009/easy-peasy-beans/</link>
		<comments>http://tanniespace.com/2009/easy-peasy-beans/#comments</comments>
		<pubDate></pubDate>
		<dc:creator>tanja</dc:creator>
				<category><![CDATA[gardening]]></category>
		<category><![CDATA[balcony]]></category>
		<category><![CDATA[bean plants]]></category>
		<category><![CDATA[beans]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[grow]]></category>
		<category><![CDATA[plants]]></category>
		<category><![CDATA[seeds]]></category>

		<guid isPermaLink="false">http://tanniespace.com/?p=1022</guid>
		<description><![CDATA[I&#8217;ve grown a few bean-plants on my balcony (more than a few actually) and have looked for the best way to get them to germinate. In the beginning I tried sticking them in the ground and just keeping the ground wet, and though that did work for some beans, it also failed plenty of times. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve grown a few bean-plants on my balcony (more than a few actually) and have looked for the best way to get them to germinate. In the beginning I tried sticking them in the ground and just keeping the ground wet, and though that did work for some beans, it also failed plenty of times.</p>

<p>Lots of times my beans got eaten by the larvae of the bean-fly (oh how I hate them!). I went looking for a better way and found something that works very well. This will probably work for other seeds too, and will give you a good idea about the germination rate of your seeds (if you have old seeds you sometimes want to check). I&#8217;ve had no problem transplanting the resulting sprouts, just keep in mind you will have to transplant them at some point. Not all sprouts like that.</p>

<p>Kids will usually love this too. Use beans though, they sprout fast :)</p>

<p>You will need:<br />
- a ziploc bag (or another type of firm plastic bag)<br />
- some toiletpaper or paper towels<br />
- something to spray water with<br />
- beans!
<span id="more-1022"></span>
<a href="http://tanniespace.com/2009/easy-peasy-beans/" title="Put beans on paper."><img src=http://tanniespace.com/files/2011/10/3738961097_f6933fc616_o-500x375.jpg class="image-in-post"  alt="Put beans on paper."/></a>
Take the toiletpaper and put down several layers. Place a few beans on the paper. Spray thoroughly with water until the paper becomes moist with water, but does not drip.
<br class="clearer" /></p>

<p><a href="http://tanniespace.com/2009/easy-peasy-beans/" title="beans, germination in a ziploc bag."><img src=http://tanniespace.com/files/2011/10/3738963131_e25597e2b5_o-500x375.jpg class="image-in-post"  alt="beans, germination in a ziploc bag."/></a>
Fold the paper, with the beans in the fold. It helps to not line up the edges so you can check later on. Keep the bag open (very important) and place it in a dark warm place. Most people prefer the top of their fridge, I used a kitchen-cabinet with pipes behind it.
<br class="clearer" /></p>

<p><a href="http://tanniespace.com/2009/easy-peasy-beans/" title="Nothing happens the first day&#8230;."><img src=http://tanniespace.com/files/2011/10/3739758416_e4cdecb003_o-500x375.jpg class="image-in-post"  alt="Nothing happens the first day&#8230;."/></a>
After the first day you may or may not see little roots coming from the bean. Check daily if you prefer, or every other day, to make sure the paper stays moist and to check for beans that rot (it sometimes happens, especially with older beans, they smell bad so it&#8217;s best to remove the asap).
<br class="clearer" /></p>

<p><a href="http://tanniespace.com/2009/easy-peasy-beans/" title="5 days later&#8230;"><img src=http://tanniespace.com/files/2011/10/3739777716_1ef892c4d3_o-500x375.jpg class="image-in-post"  alt="5 days later&#8230;"/></a>
A few days later, however, the beans have sprouted!
<br class="clearer" /></p>

<p><a href="http://tanniespace.com/2009/easy-peasy-beans/" title="Carefully take them out."><img src=http://tanniespace.com/files/2011/10/3738985685_98fb944f1f_o-500x375.jpg class="image-in-post"  alt="Carefully take them out."/></a>
Take it out of the bag, carefully. Make sure not to break any roots.
<br class="clearer" /></p>

<p><a href="http://tanniespace.com/2009/easy-peasy-beans/" title="Not all will have sprouted.."><img src=http://tanniespace.com/files/2011/10/3738987449_4896378100_o-500x375.jpg class="image-in-post"  alt="Not all will have sprouted.."/></a>
You&#8217;ll see here that not all beans sprouted. Two of them rotted (I felt very sad), but the others shot up! The ones on the right I deemed plant-worthy and planted them outside. I took the risk with the two on the left as well, but left the other two (barely rooting) in the bag for a while.<br />
If the roots have gone through the paper, don&#8217;t worry! Just rip the paper and plant it with the bean-sprout. It&#8217;ll dissolve quickly enough.</p>

<p>Some beans take longer than others, perfectly normal. However, if after a week to ten days you see no action at all, and the beans have gone mushy, they failed. They&#8217;ll smell bad too.</p>
]]></content:encoded>
			<wfw:commentRss>http://tanniespace.com/2009/easy-peasy-beans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url="http://tanniespace.com/files/2011/10/3738961097_f6933fc616_o-500x375.jpg" length="23713" type="image/jpg" /><media:content url="http://tanniespace.com/files/2011/10/3738961097_f6933fc616_o-500x375.jpg" width="500" height="375" medium="image" type="image/jpeg" />	</item>
		<item>
		<title>Tomato-lentil stew</title>
		<link>http://tanniespace.com/2008/tomato-lentil-stew/</link>
		<comments>http://tanniespace.com/2008/tomato-lentil-stew/#comments</comments>
		<pubDate></pubDate>
		<dc:creator>tanja</dc:creator>
				<category><![CDATA[cookery]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[lentils]]></category>
		<category><![CDATA[stew]]></category>
		<category><![CDATA[tomato]]></category>

		<guid isPermaLink="false">http://tanniespace.com/?p=176</guid>
		<description><![CDATA[I wanted a simple stew to put in my lunchbox for a busy day tomorrow, so I basically took some stuff I had in my cupboard. It approximated this: Ingredients: 1 cup water &#189; cup lentils, red &#189; cup lentils, brown 14 oz tomatoes, chopped, with herbs 2 tsp maggi sauce 1 tsp marmite 1 [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted a simple stew to put in my lunchbox for a busy day tomorrow, so I basically took some stuff I had in my cupboard. It approximated this:</p>

<p><a href="http://tanniespace.com/files/2011/10/2968113368_86a490efc1_o-1024x768.jpg" rel="lightbox[176]" title="Tomato-lentil stew."><img src="http://tanniespace.com/files/2011/10/2968113368_86a490efc1_o-300x225.jpg" alt="Tomato-lentil stew." title="Tomato-lentil stew." width="300" height="225" class="alignleft size-medium wp-image-3833" /></a></p>

<p><b>Ingredients:</b></p>

<div class='ingredients'><ul class='ingr-list'>
<li><span class='ingr-unit'>1</span> <span class='ingr-meas'>cup</span> <span class='ingr-descr'>water</span></li>
<li><span class='ingr-unit'>&#189;</span> <span class='ingr-meas'>cup</span> <span class='ingr-descr'>lentils, red</span></li>
<li><span class='ingr-unit'>&#189;</span> <span class='ingr-meas'>cup</span> <span class='ingr-descr'>lentils, brown</span></li>
<li><span class='ingr-unit'>14</span> <span class='ingr-meas'>oz</span> <span class='ingr-descr'>tomatoes, chopped, with herbs</span></li>
<li><span class='ingr-unit'>2</span> <span class='ingr-meas'>tsp</span> <span class='ingr-descr'>maggi sauce</span></li>
<li><span class='ingr-unit'>1</span> <span class='ingr-meas'>tsp</span> <span class='ingr-descr'>marmite</span></li>
<li><span class='ingr-unit'>1</span> <span class='ingr-meas'>tsp</span> <span class='ingr-descr'>pepper, grounded</span></li>
<li><span class='ingr-unit'>&#8531;</span> <span class='ingr-meas'>cup</span> <span class='ingr-descr'>parrano, grated (50 gr)</span></li>
<li><span class='ingr-unit'>&#8531;</span> <span class='ingr-meas'>cup</span> <span class='ingr-descr'>parmesan, grated (50 gr)</span></li>
</ul></div>

<p><br class="clear" />
<b>Directions:</b><br />
Cook the lentils and mix together. Simmer with tomatoes and spices for about 45 minutes.<br />If needed drain excess liquid, and serve with grated cheese on top.</p>

<p>(Serves 4)</p>

<p>Note: I used a can of Bonduelle (brown) Lentils, dried red lentils and Heinz Tomatoes chopped, with herbs, in juice.</p>
]]></content:encoded>
			<wfw:commentRss>http://tanniespace.com/2008/tomato-lentil-stew/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<enclosure url="http://tanniespace.com/files/2011/10/2968113368_86a490efc1_o-500x375.jpg" length="30944" type="image/jpg" /><media:content url="http://tanniespace.com/files/2011/10/2968113368_86a490efc1_o-500x375.jpg" width="500" height="375" medium="image" type="image/jpeg" />	</item>
	</channel>
</rss>

