<?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: RuFF-iTunes</title>
	<atom:link href="http://www.chizang.net/alex/blog/code/ruff-itunes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chizang.net/alex/blog</link>
	<description>infinite spew</description>
	<lastBuildDate>Wed, 08 Feb 2012 11:21:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: alex</title>
		<link>http://www.chizang.net/alex/blog/code/ruff-itunes/comment-page-1/#comment-7870</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Mon, 26 Mar 2007 19:16:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.chizang.net/alex/blog/code/ruff-itunes/#comment-7870</guid>
		<description>You can only use the built-in Advanced -&gt; Get CD Track Names option if you used iTunes to import the disc. Trying to do so with mp3s created via a different method results in iTunes giving you an error.

Thanks for the tip on backgrounding the process and redirecting the output. I&#039;ll incorporate that idea into the next version.

/ac</description>
		<content:encoded><![CDATA[<p>You can only use the built-in Advanced -> Get CD Track Names option if you used iTunes to import the disc. Trying to do so with mp3s created via a different method results in iTunes giving you an error.</p>
<p>Thanks for the tip on backgrounding the process and redirecting the output. I&#8217;ll incorporate that idea into the next version.</p>
<p>/ac</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: has</title>
		<link>http://www.chizang.net/alex/blog/code/ruff-itunes/comment-page-1/#comment-7869</link>
		<dc:creator>has</dc:creator>
		<pubDate>Mon, 26 Mar 2007 18:52:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.chizang.net/alex/blog/code/ruff-itunes/#comment-7869</guid>
		<description>Sounds interesting. How does it compare to using iTunes&#039; Advanced &gt; Get CD Track Names option?

&quot;&quot;&quot;&quot;getting the “Save Freedb Results” AppleScript to call the itunes_freedb ruby script (currently doesn’t work for reasons unknown)&quot;&quot;&quot;

When you run a script from iTunes&#039; script menu, iTunes can&#039;t handle Apple events sent by other processes until that script finishes. This isn&#039;t a problem for menu scripts that send events directly to iTunes (e.g. AppleScripts, PyOSA scripts), but here you&#039;re using &#039;do shell script&#039; to run an external ruby process which then tries to send events to iTunes - and so they end up blocking each other. 

However, since calling &#039;do shell script&#039; is the last thing your AppleScript does, you can get around this problem by having &#039;do shell script&#039; return immediately without waiting for the ruby script to complete first. Just redirect its stdout and stderr to /dev/null, e.g.:

do shell script &quot;your-command &gt; /dev/null 2&gt;&amp;1 &amp;&quot;

If your Ruby script needs to report errors or anything else to the user, you can use the OSAX module and Standard Additions&#039; display_dialog command to pop up a dialog in iTunes; see the OSAX manual for details.

HTH</description>
		<content:encoded><![CDATA[<p>Sounds interesting. How does it compare to using iTunes&#8217; Advanced &gt; Get CD Track Names option?</p>
<p>&#8220;&#8221;"&#8221;getting the “Save Freedb Results” AppleScript to call the itunes_freedb ruby script (currently doesn’t work for reasons unknown)&#8221;"&#8221;</p>
<p>When you run a script from iTunes&#8217; script menu, iTunes can&#8217;t handle Apple events sent by other processes until that script finishes. This isn&#8217;t a problem for menu scripts that send events directly to iTunes (e.g. AppleScripts, PyOSA scripts), but here you&#8217;re using &#8216;do shell script&#8217; to run an external ruby process which then tries to send events to iTunes &#8211; and so they end up blocking each other. </p>
<p>However, since calling &#8216;do shell script&#8217; is the last thing your AppleScript does, you can get around this problem by having &#8216;do shell script&#8217; return immediately without waiting for the ruby script to complete first. Just redirect its stdout and stderr to /dev/null, e.g.:</p>
<p>do shell script &#8220;your-command &gt; /dev/null 2&gt;&amp;1 &amp;&#8221;</p>
<p>If your Ruby script needs to report errors or anything else to the user, you can use the OSAX module and Standard Additions&#8217; display_dialog command to pop up a dialog in iTunes; see the OSAX manual for details.</p>
<p>HTH</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alex chiang: web 6.0 &#187; pointer to RuFF iTunes</title>
		<link>http://www.chizang.net/alex/blog/code/ruff-itunes/comment-page-1/#comment-7861</link>
		<dc:creator>alex chiang: web 6.0 &#187; pointer to RuFF iTunes</dc:creator>
		<pubDate>Mon, 26 Mar 2007 05:39:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.chizang.net/alex/blog/code/ruff-itunes/#comment-7861</guid>
		<description>[...] spent an hour or so writing RuFF-iTunes over the [...]</description>
		<content:encoded><![CDATA[<p>[...] spent an hour or so writing RuFF-iTunes over the [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

