<?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>anoved.net &#187; applescript</title>
	<atom:link href="http://anoved.net/tag/applescript/feed/" rel="self" type="application/rss+xml" />
	<link>http://anoved.net</link>
	<description></description>
	<lastBuildDate>Sun, 13 May 2012 18:44:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Save Selection and Compare Selected Files scripts for BBEdit</title>
		<link>http://anoved.net/2012/03/save-selection-and-compare-selected-files-scripts-for-bbedit/</link>
		<comments>http://anoved.net/2012/03/save-selection-and-compare-selected-files-scripts-for-bbedit/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 15:26:26 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://anoved.net/?p=4046</guid>
		<description><![CDATA[Here are a pair of handy scripts for BBEdit (or TextWrangler). Paste them in to Applescript Editor, save them in your BBEdit Scripts folder, and assign shortcut keys in BBEdit &#62; Preferences &#62; Menus &#38; Shortcuts. Save Selection as New File Select some text and invoke this script to create and save a new file containing [...]]]></description>
			<content:encoded><![CDATA[<p>Here are a pair of handy scripts for <a href="http://barebones.com/products/bbedit/">BBEdit</a> (or <a href="http://barebones.com/products/textwrangler/">TextWrangler</a>). Paste them in to Applescript Editor, save them in your BBEdit Scripts folder, and assign shortcut keys in <em>BBEdit &gt; Preferences &gt; Menus &amp; Shortcuts</em>.</p>
<h3>Save Selection as New File</h3>
<p>Select some text and invoke this script to create and save a new file containing the selection. (Add <code>close doc</code> to the end of the block if you don&#8217;t need to edit the file.)</p>
<pre>tell application "BBEdit"
	set txt to contents of selection
	set doc to make new document with properties {contents:txt}
	save doc
end tell</pre>
<p>This is pretty similar to choosing <em>File &gt; New &gt; Text Document (with selection)</em> and then choosing <em>Save</em>, but it combines the two into one step, which is helpful if you need to do this repeatedly.</p>
<h3>Compare Selected Project Files</h3>
<p>Use this script to compare two files selected in the files list of a disk browser or project window.</p>
<pre>tell application "BBEdit"
	set selectedProjectItems to selected items of project window 1
	if (count of selectedProjectItems) is not 2 then return
	set comparisonResults to compare first item of selectedProjectItems against second item of selectedProjectItems
	if not differences found of comparisonResults then
		display alert "No differences found:" message reason for no differences of comparisonResults
	end if
end tell</pre>
<p>You can accomplish the same thing with <em>Search &gt; Find Differences</em>, but if you&#8217;ve already selected some files this is quicker.</p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2012/03/save-selection-and-compare-selected-files-scripts-for-bbedit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading List integration for Vienna</title>
		<link>http://anoved.net/2012/02/reading-list-integration-for-vienna/</link>
		<comments>http://anoved.net/2012/02/reading-list-integration-for-vienna/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 03:42:13 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[readinglist]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://anoved.net/?p=3831</guid>
		<description><![CDATA[Vienna is a desktop newsreader for OS X. Here is an AppleScript to add the article currently selected in Vienna to Safari&#8217;s Reading List: tell application "Vienna" set the_article to current article try set article_URL to the link of the_article set article_title to the title of the_article set article_intro to paragraph 1 of (body of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vienna-rss.org/">Vienna</a> is a desktop newsreader for OS X. Here is an AppleScript to add the article currently selected in Vienna to Safari&#8217;s <a href="http://anoved.net/tag/readinglist/">Reading List</a>:</p>
<pre>tell application "Vienna"
	set the_article to current article
	try
		set article_URL to the link of the_article
		set article_title to the title of the_article
		set article_intro to paragraph 1 of (body of the_article as text)
		tell application "Safari" to add reading list item article_URL with title article_title and preview text article_intro
	end try
end tell</pre>
<p><a href="http://anoved.net/media/2012/02/Add-Current-Article-to-Reading-List.scpt_.zip">Here&#8217;s a downloadable version.</a> Stick it in your <a href="http://anoved.net/2007/09/script-runners/">script runner</a> and read some articles. Requires Mac OS X Ten Point Recent.</p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2012/02/reading-list-integration-for-vienna/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML Parsing in AppleScript</title>
		<link>http://anoved.net/2010/02/xml-parsing-in-applescript/</link>
		<comments>http://anoved.net/2010/02/xml-parsing-in-applescript/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 22:51:52 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[pinboard]]></category>

		<guid isPermaLink="false">http://anoved.net/?p=1613</guid>
		<description><![CDATA[I recently wrote a script that posts bookmarks from Yojimbo to Pinboard. Now that I have a nice system for posting links, I find that I&#8217;d like even more integration. For instance, I&#8217;d like to be able to keep Yojimbo in sync by downloading any links I post to Pinboard via other interfaces. The Pinboard/Delicious API [...]]]></description>
			<content:encoded><![CDATA[<p>I recently wrote a script that <a href="http://anoved.net/2010/02/safari-netnewswire-yojimbo-and-pinboard/#post-bookmark-to-yojimbo">posts bookmarks from Yojimbo to Pinboard</a>. Now that I have a nice system for posting links, I find that I&#8217;d like even more integration. For instance, I&#8217;d like to be able to keep Yojimbo in sync by downloading any links I post to Pinboard via other interfaces.</p>
<p>The Pinboard/Delicious <a href="http://delicious.com/help/api">API</a> provides a variety of methods for retrieving link information, but there isn&#8217;t a straightforward way to parse the results in AppleScript. In my posting script, I just search the response for <code>code="done"</code>. This is sufficient to tell if the <a href="http://delicious.com/help/api#posts_add">add</a> method succeeded, but methods that return more detailed information need more rigorous handling.</p>
<p>Incidentally, AppleScript supports direct interaction with <a href="http://en.wikipedia.org/wiki/SOAP">SOAP</a> or <a href="http://en.wikipedia.org/wiki/XML-RPC">XML-RPC</a> web services; <a href="http://developer.apple.com/mac/library/documentation/AppleScript/Conceptual/soapXMLRPC/chapter1/soapXMLRPC_intro.html">see the documentation here</a>. However, the Pinboard API uses a different architecture, <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_web_services">REST</a> (<a href="http://www.peej.co.uk/articles/restfully-delicious.html">sort of</a>).</p>
<p>Essentially, a query is represented as a URL, with parameters, and the XML results are returned by the server like the content of any other web page. (I use <code>do shell script</code> and <a href="http://en.wikipedia.org/wiki/CURL">curl</a> to make the request and get the raw results; I don&#8217;t know if there is a better AppleScript idiom for general HTTP transactions. URL Access Scripting is dusty and requires writing temporary files.) The task is to extract the relevant bookmark information from the response.</p>
<p><a href="http://anoved.net/media/2010/02/systemevents.png"><img class="alignnone size-medium wp-image-1621" title="systemevents" src="http://anoved.net/media/2010/02/systemevents-300x247.png" alt="" width="300" height="247" /></a></p>
<p>As it turns out, the System Events scripting dictionary includes an XML suite, pictured above. Some experiments based on the examples given in <a href="http://macscripter.net/viewtopic.php?id=26458">this discussion at MacScripter</a> confirm that it can be used to parse data returned by the Pinboard API. So, all the pieces necessary to implement a more sophisticated AppleScript bookmark syncing system are available.</p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2010/02/xml-parsing-in-applescript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Safari, NetNewsWire, Yojimbo, and Pinboard</title>
		<link>http://anoved.net/2010/02/safari-netnewswire-yojimbo-and-pinboard/</link>
		<comments>http://anoved.net/2010/02/safari-netnewswire-yojimbo-and-pinboard/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 22:59:23 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[netnewswire]]></category>
		<category><![CDATA[pinboard]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[yojimbo]]></category>

		<guid isPermaLink="false">http://anoved.net/?p=1576</guid>
		<description><![CDATA[Bookmark Page in Yojimbo This is a script for Safari. It&#8217;s a variation on my Bookmark in Yojimbo script. The original &#8220;Bookmark &#38; Edit&#8221; option has been replaced with &#8220;Bookmark &#38; Post to Pinboard&#8221;. I rarely want to edit a bookmark or its properties, but soon I might start sharing some links on Pinboard. Bookmark News [...]]]></description>
			<content:encoded><![CDATA[<h3><a name="bookmark-page-in-yojimbo"></a>Bookmark Page in Yojimbo</h3>
<p>This is a script for <a href="http://www.apple.com/safari/">Safari</a>. It&#8217;s a variation on my <a href="http://anoved.net/software/bookmark-in-yojimbo/">Bookmark in Yojimbo</a> script. The original &#8220;Bookmark &amp; Edit&#8221; option has been replaced with &#8220;Bookmark &amp; Post to Pinboard&#8221;. I rarely want to edit a bookmark or its properties, but soon I might start <a href="http://pinboard.in/u:anoved">sharing some links</a> on <a href="http://pinboard.in/">Pinboard</a>.</p>
<p><a href="http://anoved.net/media/2010/02/Bookmark-Page-in-Yojimbo.png"><img class="alignnone size-medium wp-image-1577" title="Bookmark Page in Yojimbo" src="http://anoved.net/media/2010/02/Bookmark-Page-in-Yojimbo-300x141.png" alt="" width="300" height="141" /></a></p>
<h3><a name="bookmark-news-in-yojimbo"></a>Bookmark News in Yojimbo</h3>
<p>This is a script for <a href="http://www.newsgator.com/INDIVIDUALS/NETNEWSWIRE/">NetNewsWire</a>, a free <a href="http://anoved.net/2008/01/introduction-to-news-feeds/">feed reader</a> for Mac OS X. It works just like the above script for Safari. It saves a bookmark to the current news item, and provides an option to spread the news by posting the bookmark to Pinboard. This is what I&#8217;m going to do instead of <a href="http://googlereader.blogspot.com/2006/03/reader-learns-to-share.html">sharing items in Google Reader</a>.</p>
<p><a href="http://anoved.net/media/2010/02/Bookmark-News-in-Yojimbo.png"><img class="alignnone size-medium wp-image-1578" title="Bookmark News in Yojimbo" src="http://anoved.net/media/2010/02/Bookmark-News-in-Yojimbo-300x141.png" alt="" width="300" height="141" /></a></p>
<h3><a name="post-bookmark-to-yojimbo"></a>Post Bookmark to Pinboard</h3>
<p>This is a script for <a href="http://barebones.com/products/yojimbo/">Yojimbo</a>, the program I use to save bookmarks and other bits of information. It posts the selected bookmark items to <a href="http://pinboard.in/">Pinboard</a>. This script is invoked [and thus required] by the &#8220;Bookmark &amp; Post to Pinboard&#8221; option in both scripts listed above.</p>
<p><a href="http://anoved.net/media/2010/02/Post-Bookmark-to-Pinboard.png"><img class="size-medium wp-image-1579 alignnone" title="Post Bookmark to Pinboard" src="http://anoved.net/media/2010/02/Post-Bookmark-to-Pinboard-300x185.png" alt="" width="300" height="185" /></a></p>
<p>Before posting a bookmark, the script prompts you to enter a description. The initial value of the description is based on the Yojimbo item comments. If you click &#8220;Post&#8221;, the bookmark will be posted with the given description but the Yojimbo item comments will not be changed; &#8220;Post &amp; Update Comments&#8221; will change the item comments to match the entered description.</p>
<p>To help you keep track of what you&#8217;ve shared, items posted to Pinboard are added to a &#8220;Pinboard&#8221; <a href="http://www.barebones.com/products/yojimbo/tour-collections.html">collection</a>, which will be created if it doesn&#8217;t already exist. As an example, here&#8217;s what my collection looks like at the moment:</p>
<p><a href="http://anoved.net/media/2010/02/Yojimbo-Pinboard-List.png"><img class="alignnone size-medium wp-image-1580" title="Yojimbo Pinboard List" src="http://anoved.net/media/2010/02/Yojimbo-Pinboard-List-300x134.png" alt="" width="300" height="134" /></a></p>
<p>And here&#8217;s how it looks on Pinboard:</p>
<p><a href="http://pinboard.in/u:anoved"><img class="alignnone size-medium wp-image-1581" title="Pinboard-list" src="http://anoved.net/media/2010/02/Pinboard-list-300x243.png" alt="" width="300" height="243" /></a></p>
<h3>Limitations</h3>
<p>These scripts don&#8217;t deal with tags, labels, stars, or other features offered by Yojimbo or Pinboard. These scripts aren&#8217;t likely to be very useful if you&#8217;re not me. I don&#8217;t know exactly what happens if you post the same bookmark to Pinboard twice; I think it&#8217;s updated automatically.</p>
<p>There are bugs.</p>
<h3>Download</h3>
<p><a href="http://anoved.net/files/Pinboard-Scripts.zip">Download all three scripts here</a> (24 KB)</p>
<h3>Configuration</h3>
<p>Some assembly is required. I recommend installing the scripts in the following locations (create the directories if they don&#8217;t already exist). <a href="http://anoved.net/2007/09/script-runners/">Run</a> them with <a href="http://www.red-sweater.com/fastscripts/">FastScripts</a> or the regular script menu.</p>
<pre>~/Library/Scripts/Applications/Safari/Bookmark Page in Yojimbo.scpt
~/Library/Scripts/Applications/NetNewsWire/Bookmark News in Yojimbo.scpt
~/Library/Scripts/Applications/Yojimbo/Post Bookmark to Pinboard.scpt</pre>
<p>Edit the <code>_pinboard_script_path</code> property at the top of both &#8220;Bookmark in Yojimbo&#8221; scripts to identify the full path to your copy of the Pinboard script. In my case, this reads:</p>
<pre>property _pinboard_script_path : "/Users/anoved/Library/Scripts/Applications/Yojimbo/Post Bookmark to Pinboard.scpt"</pre>
<p>Lastly, edit the <code>_API_username</code> and <code>_API_password</code> properties at the top of the Pinboard script to reflect your Pinboard login information. Since the Pinboard API is <a href="http://pinboard.in/blog/38/">essentially a clone</a> of the <a href="http://delicious.com/">Delicious</a> API, it should be straightforward to modify this script to work with Delicious &#8211; but unfortunately I haven&#8217;t quite got it working. Don&#8217;t hold your breath for an update, but please do share any fixes or improvements.</p>
<h3>Acknowledgements</h3>
<p>The code to post to Pinboard is derived from <a href="http://futuremacblog.blogspot.com/2008/03/improved-netnewswire-to-delicious.html">this NetNewsWire to Delicious script</a> by Larry and Andrew. My sketchy URL encoding code is lifted from <a href="http://www.macosxautomation.com/applescript/sbrt/sbrt-08.html">this example</a> at Mac OS X Automation.</p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2010/02/safari-netnewswire-yojimbo-and-pinboard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>yjnote</title>
		<link>http://anoved.net/2009/12/yjnote/</link>
		<comments>http://anoved.net/2009/12/yjnote/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 17:59:39 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[yojimbo]]></category>

		<guid isPermaLink="false">http://anoved.net/?p=1294</guid>
		<description><![CDATA[yjnote is a Mac OS X command-line tool for creating note items in Yojimbo. You can use it to pipe the output or usage notes of other programs into Yojimbo for reference or logging purposes. Download Download yjnote.zip (1.7 KB) Tested, minimally, with Yojimbo 2.1 on Mac OS X 10.6.2. yjnote is written in Perl [...]]]></description>
			<content:encoded><![CDATA[<p>yjnote is a Mac OS X command-line tool for creating note items in <a href="http://www.barebones.com/products/Yojimbo/">Yojimbo</a>. You can use it to pipe the output or usage notes of other programs into Yojimbo for reference or logging purposes.</p>
<h3>Download</h3>
<p><a href="http://anoved.net/files/yjnote.zip">Download yjnote.zip</a> (1.7 KB)</p>
<p>Tested, minimally, with Yojimbo 2.1 on Mac OS X 10.6.2. yjnote is written in Perl with a pinch of AppleScript. Further testing, bug fixes, and improvements are welcome (and likely necessary).</p>
<h3>Usage</h3>
<p>You can display this documentation at any time with <code>yjnote -help</code>.</p>
<pre><strong>NAME</strong>
       yjnote − Create Yojimbo notes from the command line.

<strong>SYNOPSIS</strong>
         yjnote [options] [FILE...]

<strong>DESCRIPTION</strong>
       yjnote creates a Yojimbo note by concatenating the contents of the
       given files (or by reading standard input, if no files are given).

<strong>OPTIONS</strong>
       <strong>−title</strong> <span style="text-decoration: underline;">TEXT</span>
           Sets the note item title.

       <strong>−comments</strong> <span style="text-decoration: underline;">TEXT</span>
           Sets the note item comments.

       <strong>−label</strong> <span style="text-decoration: underline;">TEXT</span>
           Sets the note item label. Ignored if the label does not exist.

       <strong>−tags</strong> <span style="text-decoration: underline;">TAG[,TAG,...]</span>
           Sets the note item tags. Separate tags with commas.

       <strong>−flagged</strong>
           Flags the note item.

       <strong>−reveal</strong>
           Reveals the newly created note in Yojimbo. By default, the new note
           is not displayed.</pre>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2009/12/yjnote/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bookmark in Yojimbo compatible with Yojimbo 2.0</title>
		<link>http://anoved.net/2009/09/bookmark-in-yojimbo-compatible-with-yojimbo-2-0/</link>
		<comments>http://anoved.net/2009/09/bookmark-in-yojimbo-compatible-with-yojimbo-2-0/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 05:34:30 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[yojimbo]]></category>

		<guid isPermaLink="false">http://anoved.net/?p=1220</guid>
		<description><![CDATA[The current version of my Bookmark in Yojimbo script is compatible with the recently-released Yojimbo 2.0.]]></description>
			<content:encoded><![CDATA[<p>The current version of my <a href="http://anoved.net/software/bookmark-in-yojimbo/">Bookmark in Yojimbo</a> script is compatible with the recently-released <a href="http://www.barebones.com/products/yojimbo/whats_new_20.html">Yojimbo 2.0</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2009/09/bookmark-in-yojimbo-compatible-with-yojimbo-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FastScripts 2.4</title>
		<link>http://anoved.net/2009/06/fastscripts-2-4/</link>
		<comments>http://anoved.net/2009/06/fastscripts-2-4/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 04:26:42 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[fastscripts]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://anoved.net/?p=1003</guid>
		<description><![CDATA[Daniel Jalkut has updated FastScripts, my utility of choice for running scripts or opening favorite files with a keystroke or a trip to the menu bar. Notably, there is now just one version of FastScripts, which may be used for free or upgraded to allow more than ten keyboard shortcuts.]]></description>
			<content:encoded><![CDATA[<p>Daniel Jalkut has updated <a href="http://www.red-sweater.com/fastscripts/">FastScripts</a>, my <a href="http://anoved.net/2007/09/script-runners/">utility of choice</a> for running scripts or <a href="http://anoved.net/2008/09/fastscripts-as-apple-menu/">opening favorite files</a> with a keystroke or a trip to the menu bar.</p>
<div id="attachment_1006" class="wp-caption alignnone" style="width: 269px"><img src="http://anoved.net/media/2009/06/fastscriptsmenu.png" alt="My FastScripts menu, as it appears in the Finder." title="fastscriptsmenu" width="259" height="224" class="size-full wp-image-1006" /><p class="wp-caption-text">My FastScripts menu, as it appears in the Finder.</p></div>
<p>Notably, there is <a href="http://www.red-sweater.com/blog/823/fastscripts-2-4">now just one version</a> of FastScripts, which may be used for free or upgraded to allow more than ten keyboard shortcuts.</p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2009/06/fastscripts-2-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FastScripts as Apple Menu</title>
		<link>http://anoved.net/2008/09/fastscripts-as-apple-menu/</link>
		<comments>http://anoved.net/2008/09/fastscripts-as-apple-menu/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 02:14:00 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[fastscripts]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://anoved.net/2008/09/fastscripts-as-apple-menu/</guid>
		<description><![CDATA[Back in the day, the System Folder contained an Apple Menu Items folder, the contents of which appeared in the Apple menu. Choosing an item from the menu opened the item from the folder. It was easy to customize the Apple menu by adding folders and aliases to the Apple Menu Items folder. Here&#8217;s what [...]]]></description>
			<content:encoded><![CDATA[<p>Back in the day, the System Folder contained an Apple Menu Items folder, the contents of which appeared in the Apple menu. Choosing an item from the menu opened the item from the folder. It was easy to customize the Apple menu by adding folders and <a href="http://en.wikipedia.org/wiki/Alias_(Mac_OS)">aliases</a> to the Apple Menu Items folder.</p>
<p>Here&#8217;s what it looked like by default in Mac OS 8.5:</p>
<p><a href="http://www.flickr.com/photos/anoved/2854534612/sizes/o/" title="View 'Apple Menu Items folder' on Flickr.com"><img src="http://farm4.static.flickr.com/3218/2854534612_c8638c363c_m.jpg" alt="Apple Menu Items folder" border="0" width="240" height="180" /></a></p>
<p>In Mac OS X, of course, the Apple menu is no longer customizable. It still contains some useful items, but it&#8217;s not quite the familiar place it once was. The <a href="http://en.wikipedia.org/wiki/Dock_(Mac_OS_X)">Dock</a> has taken its place as a quick way to access favorite files and folders.</p>
<p>So, if you want to access a bunch of applications from a tidy little menu, and you don&#8217;t find it useful to throw your whole Applications folder in the Dock, you turn to the world of third party launchers. Here&#8217;s an unlikely solution.</p>
<p><a href="http://www.red-sweater.com/fastscripts/">FastScripts</a> is a program I <a href="http://anoved.net/2007/09/script-runners/">recommend</a> for running scripts with keyboard shortcuts. It&#8217;s a power user thing. However, a little-advertised fact about FastScripts is that it will open anything in your Scripts folder, not just scripts.</p>
<p>Choose Open Scripts Folder from the FastScripts menu, and put whatever you&#8217;d like&mdash;including subfolders&mdash;in the folder that appears. Now you can launch those files from the FastScripts menu:</p>
<p><a href="http://flickr.com/photos/anoved/2854803370/sizes/o/" title="View 'FastScripts menu folder' on Flickr.com"><img src="http://farm4.static.flickr.com/3006/2854803370_f62eaa9f4d_m.jpg" alt="FastScripts menu folder" border="0" width="240" height="139" /></a></p>
<p>The script items in the menu reside in a subfolder of the Scripts/Applications folder. The subfolders are named after specific applications, and appear in the menu only when that application is frontmost.</p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2008/09/fastscripts-as-apple-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bricksmith Custom Categories</title>
		<link>http://anoved.net/2008/06/bricksmith-custom-categories/</link>
		<comments>http://anoved.net/2008/06/bricksmith-custom-categories/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 15:55:00 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[bricksmith]]></category>
		<category><![CDATA[LDraw]]></category>
		<category><![CDATA[LEGO]]></category>

		<guid isPermaLink="false">http://anoved.net/2008/06/bricksmith-custom-categories/</guid>
		<description><![CDATA[Here is a hack to add new categories to the Bricksmith part browser. The part catalog is normally organized into categories based on the type of each part (such as brick, plate, or tile). However, if you&#8217;re building a model based on a real set, it&#8217;s just as useful to present the parts from that [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a hack to add new categories to the <a href="http://bricksmith.sourceforge.net/">Bricksmith</a> part browser. The part catalog is normally organized into categories based on the type of each part (such as brick, plate, or tile). However, if you&#8217;re building a model based on a real set, it&#8217;s just as useful to present the parts from that set in one category.</p>
<h3>Adding a category from a Peeron inventory</h3>
<p>To create a category consisting of the parts from set <a href="http://peeron.com/inv/sets/4891-1">4891</a>, enter <strong>4891</strong> and click <strong>Peeron Inventory</strong>:</p>
<p><a href="http://anoved.net/images/bsc/bsc-peeron.png"><img src="http://anoved.net/images/bsc/bsc-peeron-small.png" alt="Screenshot: Naming a category based on a Peeron inventory" title="" /></a></p>
<p>The script will retrieve the corresponding list of parts and populate a new category containing them:</p>
<p><a href="http://anoved.net/images/bsc/peeron-category.png"><img src="http://anoved.net/images/bsc/peeron-category-small.png" alt="Screenshot: Browsing a category retrieved from Peeron" title="" /></a></p>
<h3>Adding a category from a file</h3>
<p>To create a category based on an arbitrary group of parts, save a list of part file names, like this:</p>
<pre><code>3005.dat
3004.dat
3003.dat
3001.dat
</code></pre>
<p>Then enter a name for your category and click <strong>From File</strong>. You&#8217;ll be prompted to select the list you just created.</p>
<p><a href="http://anoved.net/images/bsc/bsc-file.png"><img src="http://anoved.net/images/bsc/bsc-file-small.png" alt="Screenshot: Naming a category to be loaded from a file" title="" /></a></p>
<p>The script will add the listed parts to the named category:</p>
<p><a href="http://anoved.net/images/bsc/file-category.png"><img src="http://anoved.net/images/bsc/file-category-small.png" alt="Screenshot: Browsing a category loaded from a file" title="" /></a></p>
<h3>Limitations</h3>
<p>The script is awfully slow. AppleScript&#8217;s property list commands are not well suited for making many changes.</p>
<p>Parts listed in the file or inventory which are not already present in your part library will not be included in the category.</p>
<p>New categories are not visible until you restart Bricksmith. (I recommend quitting Bricksmith before running the script anyway.) Custom categories are lost when you reload the part list from Bricksmith&#8217;s <strong>Parts</strong> preferences.</p>
<p>No feedback is provided while the script is running.</p>
<p>Errors are not handled particularly well.</p>
<p>Mac OS X 10.5 is required.</p>
<p>It&#8217;s really slow.</p>
<h3>Download</h3>
<p><a href="http://anoved.net/files/bsc/bsc.app.zip">Bricksmith Catalog Custom Categories</a> 26.4 KB</p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2008/06/bricksmith-custom-categories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Note Poster</title>
		<link>http://anoved.net/2008/05/note-poster/</link>
		<comments>http://anoved.net/2008/05/note-poster/#comments</comments>
		<pubDate>Sun, 11 May 2008 19:51:00 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[marsedit]]></category>
		<category><![CDATA[yojimbo]]></category>

		<guid isPermaLink="false">http://anoved.net/2008/05/note-poster/</guid>
		<description><![CDATA[Here&#8217;s a script to create a new post in MarsEdit from a note selected in Yojimbo. Why use a script when it&#8217;s already as easy as copy and paste? Well, maybe your computer is running out of paste. tell application "Yojimbo" set _items to selected items of browser window 1 if (_items is {}) or [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a script to create a new post in <a href="http://www.red-sweater.com/marsedit/">MarsEdit</a> from a note selected in <a href="http://www.barebones.com/products/yojimbo/">Yojimbo</a>. Why use a script when it&#8217;s already as easy as copy and paste? Well, maybe your computer is running out of paste.</p>
<pre><span class="keyword">tell application</span> "Yojimbo"
	<span class="keyword">set</span> <span class="variable">_items</span> <span class="keyword">to selected items of browser window</span> 1
	<span class="keyword">if</span> (<span class="variable">_items</span> <span class="keyword">is</span> {}) <span class="keyword">or</span> (<span class="variable">_items</span> <span class="keyword">is missing value</span>) <span class="keyword">then return</span>
	<span class="keyword">set</span> <span class="variable">_note</span> <span class="keyword">to item</span> 1 <span class="keyword">of</span> <span class="variable">_items</span>
	<span class="keyword">if class of</span> <span class="variable">_note</span> <span class="keyword">is not note item then return</span>
<span class="keyword">end tell</span>

<span class="keyword">tell application</span> "MarsEdit"
	<span class="keyword">set</span> <span class="variable">_post</span> <span class="keyword">to make new document</span>
	<span class="keyword">set body of</span> <span class="variable">_post</span> <span class="keyword">to contents of contents of</span> <span class="variable">_note</span>
	<span class="keyword">set title of</span> <span class="variable">_post</span> <span class="keyword">to name of</span> <span class="variable">_note</span>
	<span class="keyword">activate</span>
<span class="keyword">end tell</span></pre>
<p><a href="applescript://com.apple.scripteditor?action=new&#038;script=tell%20application%20%22Yojimbo%22%0D%09set%20_items%20to%20selected%20items%20of%20browser%20window%201%0D%09if%20%28_items%20is%20%7B%7D%29%20or%20%28_items%20is%20missing%20value%29%20then%20return%0D%09set%20_note%20to%20item%201%20of%20_items%0D%09if%20class%20of%20_note%20is%20not%20note%20item%20then%20return%0Dend%20tell%0D%0Dtell%20application%20%22MarsEdit%22%0D%09set%20_post%20to%20make%20new%20document%0D%09set%20body%20of%20_post%20to%20contents%20of%20contents%20of%20_note%0D%09set%20title%20of%20_post%20to%20name%20of%20_note%0D%09activate%0Dend%20tell">Click here to open the script directly in Script Editor.</a> Save it in <code>~/Library/Scripts/Applications/Yojimbo</code> and you&#8217;re ready to <a href="http://anoved.net/2007/09/script-runners/">run</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2008/05/note-poster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

