<?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>hubionmac.com &#187; length</title> <atom:link href="http://hubionmac.com/wordpress/tag/length/feed/" rel="self" type="application/rss+xml" /><link>http://hubionmac.com/wordpress</link> <description>script the unscriptable</description> <lastBuildDate>Fri, 03 Feb 2012 22:41:10 +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>AppleScript: Länge einer Audio-Datei auslesen</title><link>http://hubionmac.com/wordpress/2010/02/applescript-lange-einer-audio-datei-auslesen/</link> <comments>http://hubionmac.com/wordpress/2010/02/applescript-lange-einer-audio-datei-auslesen/#comments</comments> <pubDate>Mon, 22 Feb 2010 21:10:56 +0000</pubDate> <dc:creator>hubi</dc:creator> <category><![CDATA[AppleScript]]></category> <category><![CDATA[audio files]]></category> <category><![CDATA[length]]></category> <category><![CDATA[spotlight]]></category><guid isPermaLink="false">http://hubionmac.com/wordpress/?p=1933</guid> <description><![CDATA[Spotlight kann so etwas wunderbar und noch dazu bei verschiedensten Audio-Formaten: Code zum markieren einmal anklicken Code im Skript-Editor öffnen set aFile to choose file tell application &#8220;Finder&#8221; to set filename to name of aFile set AppleScript&#8216;s text item delimiters to &#8221; = &#8220; set duration to text item 2 of (do shell script &#8220;mdls [...]]]></description> <content:encoded><![CDATA[<p>Spotlight kann so etwas wunderbar und noch dazu bei verschiedensten Audio-Formaten:</p><div><div style="clear: left; font-size: 0.8em;"><em>Code zum markieren einmal anklicken <a href="#" onclick="selectThis(this.parentNode.parentNode.parentNode.getElementsByTagName('div')[1]);buildAppleScriptLink();">Code im Skript-Editor öffnen</a></em></div><div class="hubionmac_codebox" onclick="selectThis(this);"><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana; color: #2000c0"><span style="color: #000000"><b>set</b> </span><span style="color: #2d9600">aFile</span><span style="color: #000000"> <b>to</b> </span><b>choose file</b></p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana"><b>tell</b> <span style="color: #3300ff"><i>application</i></span> &#8220;Finder&#8221; <b>to</b> <b>set</b> <span style="color: #2d9600">filename</span> <b>to</b> <span style="color: #9200de">name</span> <b>of</b> <span style="color: #2d9600">aFile</span></p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana; color: #9200de"><span style="color: #000000"><b>set</b> </span>AppleScript<span style="color: #000000">&#8216;s </span>text item delimiters<span style="color: #000000"> <b>to</b> &#8221; = &#8220;</span></p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana"><b>set</b> <span style="color: #2d9600">duration</span> <b>to</b> <span style="color: #3300ff"><i>text item</i></span> 2 <b>of</b> (<span style="color: #2000c0"><b>do shell script</b></span> &#8220;mdls -name kMDItemDurationSeconds &#8221; &amp; <span style="color: #9200de">quoted form</span> <b>of</b> (<span style="color: #9200de">POSIX path</span> <b>of</b> <span style="color: #2d9600">aFile</span>))</p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana; color: #9200de"><span style="color: #000000"><b>set</b> </span>AppleScript<span style="color: #000000">&#8216;s </span>text item delimiters<span style="color: #000000"> <b>to</b> &#8220;.&#8221;</span></p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana; color: #2d9600"><span style="color: #000000"><b>set</b> </span>total_seconds<span style="color: #000000"> <b>to</b> </span><span style="color: #3300ff"><i>text item</i></span><span style="color: #000000"> 1 <b>of</b> </span>duration</p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana; color: #9200de"><span style="color: #000000"><b>set</b> </span>AppleScript<span style="color: #000000">&#8216;s </span>text item delimiters<span style="color: #000000"> <b>to</b> &#8220;&#8221;</span></p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana"><b>set</b> <span style="color: #2d9600">showsec</span> <b>to</b> (<span style="color: #2d9600">total_seconds</span> <b>as</b> <span style="color: #3300ff"><i>integer</i></span>) <b>mod</b> 60</p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana"><b>set</b> <span style="color: #2d9600">showmin</span> <b>to</b> (<span style="color: #2d9600">total_seconds</span> <b>as</b> <span style="color: #3300ff"><i>integer</i></span>) <b>div</b> 60</p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana"><span style="color: #2000c0"><b>display dialog</b></span> <span style="color: #2d9600">filename</span> &amp; <span style="color: #9200de">return</span> &amp; <span style="color: #9200de">return</span> &amp; &#8220;Duration:&#8221; &amp; <span style="color: #9200de">return</span> &amp; <span style="color: #2d9600">showmin</span> &amp; &#8220;<span style="font: 12.0px Courier; color: #a30093"> </span>min &#8221; &amp; <span style="color: #2d9600">showsec</span> &amp; &#8221; sec&#8221;</p></div></div> ]]></content:encoded> <wfw:commentRss>http://hubionmac.com/wordpress/2010/02/applescript-lange-einer-audio-datei-auslesen/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/25 queries in 0.054 seconds using disk: basic
Object Caching 105/232 objects using disk: basic

Served from: hubionmac.com @ 2012-02-11 08:34:57 -->
