<?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/"
	>

<channel>
	<title>tlrobinson.net blog &#187; AppleScript</title>
	<atom:link href="http://tlrobinson.net/blog/category/applescript/feed/" rel="self" type="application/rss+xml" />
	<link>http://tlrobinson.net/blog</link>
	<description></description>
	<lastBuildDate>Mon, 06 Apr 2009 08:37:15 +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>&quot;Mark Old As Read&quot; for NetNewsWire</title>
		<link>http://tlrobinson.net/blog/2008/11/mark-old-as-read-for-netnewswire/</link>
		<comments>http://tlrobinson.net/blog/2008/11/mark-old-as-read-for-netnewswire/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 01:58:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://tlrobinson.net/blog/?p=73</guid>
		<description><![CDATA[I recently heard about an RSS reader (can&#8217;t remember which) that had a feature to mark all messages older than a certain threshold as &#8220;read&#8221;. I thought this was an incredibly useful feature, since I often forget to check my &#8230; <a href="http://tlrobinson.net/blog/2008/11/mark-old-as-read-for-netnewswire/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently heard about an RSS reader (can&#8217;t remember which) that had a feature to mark all messages older than a certain threshold as &#8220;read&#8221;. I thought this was an incredibly useful feature, since I often forget to check my feeds for days at a time, and end up with hundreds of unread items that I don&#8217;t have time to read.</p>
<p>Luckily my current RSS reader, <a href="http://www.newsgator.com/INDIVIDUALS/NETNEWSWIRE/">NetNewsWire</a>, has AppleScript built in, so I whipped up this script that prompts for the number of days you want to keep as unread, and marks the rest as read.</p>
<div style="text-align:left;color:#000000; background-color:#ffffff; border:solid black 1px; padding:0.5em 1em 0.5em 1em; overflow:auto;font-size:small; font-family:monospace; "><span style="color:#0b0bff;">tell</span> <span style="color:#0b0bff;">application</span> &quot;NetNewsWire&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;display dialog &quot;How many days old to mark read?&quot; default answer &quot;7&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#0b0bff;">set</span> numDays <span style="color:#0b0bff;">to</span> text returned <span style="color:#0b0bff;">of</span> <span style="color:#0b0bff;">result</span><br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#0b0bff;">set</span> threshold <span style="color:#0b0bff;">to</span> (current date) &#8211; (numDays * <span style="color:#0b0bff;">days</span>)<br />
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#0b0bff;">set</span> isRead <span style="color:#0b0bff;">of</span> (headlines <span style="color:#0b0bff;">of</span> subscriptions <span style="color:#0b0bff;">where</span> (isRead <span style="color:#0b0bff;">is</span> <span style="color:#0b0bff;">equal</span> <span style="color:#0b0bff;">to</span> <span style="color:#0b0bff;">false</span> <span style="color:#0b0bff;">and</span> date published &lt; threshold)) <span style="color:#0b0bff;">to</span> <span style="color:#0b0bff;">true</span><br />
<span style="color:#0b0bff;">end</span> <span style="color:#0b0bff;">tell</span></div>
]]></content:encoded>
			<wfw:commentRss>http://tlrobinson.net/blog/2008/11/mark-old-as-read-for-netnewswire/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

