<?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"
	>
<channel>
	<title>Comments on: grabbing a file played in a flash applet via applescript</title>
	<atom:link href="http://www.dekay.org/blog/archives/grabbing-a-file-played-in-a-flash-applet-via-applescript/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dekay.org/blog/archives/grabbing-a-file-played-in-a-flash-applet-via-applescript</link>
	<description>snippets about dancing, photography, technology and more (v.2.6a)</description>
	<pubDate>Mon, 06 Oct 2008 23:47:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: dekay</title>
		<link>http://www.dekay.org/blog/archives/grabbing-a-file-played-in-a-flash-applet-via-applescript#comment-472</link>
		<dc:creator>dekay</dc:creator>
		<pubDate>Thu, 16 Mar 2006 09:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.dekay.org/blog/archives/grabbing-a-file-played-in-a-flash-applet-via-applescript/#comment-472</guid>
		<description>&lt;p&gt;set originalFile to do shell script "ls -1t  /Users/XXX/Library/Caches/TemporaryItems/plugtmp/ &#124; grep -i access &#124; head -n 2 &#124; tail -n 1"&lt;/p&gt;

&lt;p&gt;tell application "Camino"
    set defaultName to name of window 1
end tell&lt;/p&gt;

&lt;p&gt;if length of originalFile is greater than 0 then
    set newFile to POSIX path of (choose file name default name defaultName)
    if length of newFile is greater than 0 then
        if newFile does not end with ".mp3" then set newFile to newFile &#38; ".mp3"
        do shell script "/bin/cp -v '" &#38; "/Users/XXX/Library/Caches/TemporaryItems/plugtmp/" &#38; originalFile &#38; "' '" &#38; newFile &#38; "'"
    end if
else
    display dialog "No audio file found. Please make sure that a tune is playing in pandora." buttons {"OK"} default button "OK"
end if&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>set originalFile to do shell script &#8220;ls -1t  /Users/XXX/Library/Caches/TemporaryItems/plugtmp/ | grep -i access | head -n 2 | tail -n 1&#8243;</p>
<p>tell application &#8220;Camino&#8221;<br />
    set defaultName to name of window 1<br />
end tell</p>
<p>if length of originalFile is greater than 0 then<br />
    set newFile to POSIX path of (choose file name default name defaultName)<br />
    if length of newFile is greater than 0 then<br />
        if newFile does not end with &#8220;.mp3&#8243; then set newFile to newFile &amp; &#8220;.mp3&#8243;<br />
        do shell script &#8220;/bin/cp -v &#8216;&#8221; &amp; &#8220;/Users/XXX/Library/Caches/TemporaryItems/plugtmp/&#8221; &amp; originalFile &amp; &#8220;&#8216; &#8216;&#8221; &amp; newFile &amp; &#8220;&#8216;&#8221;<br />
    end if<br />
else<br />
    display dialog &#8220;No audio file found. Please make sure that a tune is playing in pandora.&#8221; buttons {&#8221;OK&#8221;} default button &#8220;OK&#8221;<br />
end if</p>
]]></content:encoded>
	</item>
</channel>
</rss>
