<?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; scripting</title> <atom:link href="http://hubionmac.com/wordpress/category/nice2know/scripting-nice2know/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: Alternative zu ImageEvents</title><link>http://hubionmac.com/wordpress/2010/03/applescript-alternative-zu-imageevents/</link> <comments>http://hubionmac.com/wordpress/2010/03/applescript-alternative-zu-imageevents/#comments</comments> <pubDate>Thu, 11 Mar 2010 23:16:11 +0000</pubDate> <dc:creator>hubi</dc:creator> <category><![CDATA[scripting]]></category> <category><![CDATA[AppleScript]]></category> <category><![CDATA[convert]]></category> <category><![CDATA[image]]></category> <category><![CDATA[imageevents]]></category> <category><![CDATA[pdf]]></category> <category><![CDATA[sips]]></category><guid isPermaLink="false">http://hubionmac.com/wordpress/?p=1989</guid> <description><![CDATA[Anstatt die ImageEvents via AppleScript anzusteuern, kann man auch über ein Shell Script (das dürfte vielleicht schneller sein) auch sips (scriptable image processing system) aufrufen. Damit kann man sogar die Auflösung von Grafiken in PDFs verändern: sips -s format pdf -s dpiHeight 72 -s dpiWidth 72 -s formatOptions low /path/to/pdf.pdf --out /path/to/converted/pdf.pdf So ist z.B. [...]]]></description> <content:encoded><![CDATA[<p>Anstatt die ImageEvents via AppleScript anzusteuern, kann man auch über ein Shell Script (das dürfte vielleicht schneller sein) auch sips (scriptable image processing system) aufrufen. Damit kann man sogar die Auflösung von Grafiken in PDFs verändern:<br /> <code>sips -s format pdf -s dpiHeight 72 -s dpiWidth 72 -s formatOptions low /path/to/pdf.pdf --out /path/to/converted/pdf.pdf</code></p><p>So ist z.B. auch eine deutlich schlankere Version von <a href="http://hubionmac.com/wordpress/2008/11/bilder-klein-rechnen-mit-applescript/" target="_blank">diesem Skripte (Bilder klein rechnen mit AppleScript)</a> möglich:</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: #2d9600"><span style="color: #000000"><b>on</b> </span><span style="color: #3300ff"><b>open</b></span><span style="color: #000000"> </span>some_items</p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana"><span class="Apple-tab-span" style="white-space:pre"> </span><b>tell</b> <b>me</b> <b>to</b> <span style="color: #3300ff"><b>activate</b></span></p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana; color: #2000c0"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span><b>display dialog</b><span style="color: #000000"> &#8220;Längste Seite&#8221; </span>default answer<span style="color: #000000"> &#8220;1024&#8243;</span></p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana"><span class="Apple-tab-span" style="white-space:pre"> </span><b>set</b> <span style="color: #2d9600">mh</span> <b>to</b> (<span style="color: #6400c0">text returned</span> <b>of</b> <b>the</b> <span style="color: #9200de">result</span>) <b>as</b> <span style="color: #3300ff"><i>integer</i></span></p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre"> </span></p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana; color: #2d9600"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span><b>repeat</b> <b>with</b> </span>this_item<span style="color: #000000"> <b>in</b> </span>some_items</p><p style="margin: 0.0px 0.0px 0.0px 124.8px; text-indent: -124.9px; font: 12.0px Verdana; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span></p><p style="margin: 0.0px 0.0px 0.0px 124.8px; text-indent: -124.9px; font: 12.0px Verdana; color: #2d9600"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span></span>rescale_and_save<span style="color: #000000">(</span>this_item<span style="color: #000000">, </span>mh<span style="color: #000000">)</span></p><p style="margin: 0.0px 0.0px 0.0px 124.8px; text-indent: -124.9px; font: 12.0px Verdana; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span></p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana"><span class="Apple-tab-span" style="white-space:pre"> </span><b>end</b> <b>repeat</b></p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana"><b>end</b> <span style="color: #3300ff"><b>open</b></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>to</b> </span>rescale_and_save<span style="color: #000000">(</span>this_item<span style="color: #000000">, </span>max_length<span style="color: #000000">)</span></p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana; color: #9200de"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span><b>set</b> </span><span style="color: #2d9600">this_item</span><span style="color: #000000"> <b>to</b> </span>quoted form<span style="color: #000000"> <b>of</b> (</span>POSIX path<span style="color: #000000"> <b>of</b> </span><span style="color: #2d9600">this_item</span><span style="color: #000000">)</span></p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana"><span class="Apple-tab-span" style="white-space:pre"> </span><b>set</b> <span style="color: #2d9600">scaled_dir_path</span> <b>to</b> (<span style="color: #2000c0"><b>do shell script</b></span> &#8220;dirname &#8221; &amp; <span style="color: #2d9600">this_item</span>) &amp; &#8220;/_scaled/&#8221;</p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana"><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #2000c0"><b>do shell script</b></span> &#8220;mkdir -p &#8216;&#8221; &amp; <span style="color: #2d9600">scaled_dir_path</span> &amp; &#8220;&#8216;;sips -Z &#8221; &amp; <span style="color: #2d9600">max_length</span> &amp; &#8221; &#8221; &amp; <span style="color: #2d9600">this_item</span> &amp; &#8221; &#8211;out &#8216;&#8221; &amp; <span style="color: #2d9600">scaled_dir_path</span> &amp; <span style="color: #9200de">quoted form</span> <b>of</b> (<span style="color: #2000c0"><b>do shell script</b></span> &#8220;basename &#8221; &amp; <span style="color: #2d9600">this_item</span>) &amp; &#8220;&#8216;&#8221;</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>end</b> </span>rescale_and_save</p></div></div> ]]></content:encoded> <wfw:commentRss>http://hubionmac.com/wordpress/2010/03/applescript-alternative-zu-imageevents/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Script the unscriptable</title><link>http://hubionmac.com/wordpress/2010/02/script-the-unscriptable/</link> <comments>http://hubionmac.com/wordpress/2010/02/script-the-unscriptable/#comments</comments> <pubDate>Wed, 24 Feb 2010 08:42:42 +0000</pubDate> <dc:creator>hubi</dc:creator> <category><![CDATA[scripting]]></category> <category><![CDATA[alternative]]></category> <category><![CDATA[gui-scripting]]></category><guid isPermaLink="false">http://hubionmac.com/wordpress/?p=1939</guid> <description><![CDATA[Sikuli ist eine neuer Ansatz Skripte zu erstellen, so etwas wie Extreme-GUI-Scripting. Anstelle von aufrufen von GUI-Elementen via Applescript macht man einfach einen Screenshot der Stelle auf die geklickt werden soll, bzw. bei deren Erscheinen auf dem Bildschirm das Skript weiter laufen soll. Sehr schöne Idee, insbesondere bei Java Programmen, Flash Anwendungen, die so nicht [...]]]></description> <content:encoded><![CDATA[<div style="width: 45%; float: left; padding-right: 10pt; display: inline; text-align: justify;"><img src="http://hubionmac.com/wordpress/wp-content/uploads/2010/02/SikuliIde-150x150.png" alt="" title="SikuliIde" width="150" height="150" class="alignleft size-thumbnail wp-image-1940" /><a href="http://sikuli.csail.mit.edu/" target="_blank">Sikuli</a> ist eine neuer Ansatz Skripte zu erstellen, so etwas wie Extreme-GUI-Scripting. Anstelle von aufrufen von GUI-Elementen via Applescript macht man einfach einen Screenshot der Stelle auf die geklickt werden soll, bzw. bei deren Erscheinen auf dem Bildschirm das Skript weiter laufen soll.</div><div style="width: 45%; float: left; padding-right: 10pt; display: inline; text-align: justify;">Sehr schöne Idee, insbesondere bei Java Programmen, Flash Anwendungen, die so nicht ohne weiteres automatisch zu steuern wären. Zudem sooo simpel, dass es jeder nach 5 min drauf hat, ein Skript zu programmieren, das die IP-Adresse ändert.<br />Es läuft (wie alle GUI-Scripting-Ansätze) nicht immer 100%ig und auch die Geschwindigkeit ist nicht der Hit, aber im Falle eines Falles immer noch schneller, als von Hand durch irgend eine AppleSkript-Feindliche App zu steuern.</div><div style="clear: both;"></div><hr style="margin:1em" /><div>Das Programm gibt es für Windows, Mac und Linux. Es basiert auf <a href="http://de.wikipedia.org/wiki/Python_(Programmiersprache)" target="_blank">Phyton</a>.</div> ]]></content:encoded> <wfw:commentRss>http://hubionmac.com/wordpress/2010/02/script-the-unscriptable/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Ein µoment der Klarheit&#8230;</title><link>http://hubionmac.com/wordpress/2010/01/ein-%c2%b5oment-der-klarheit/</link> <comments>http://hubionmac.com/wordpress/2010/01/ein-%c2%b5oment-der-klarheit/#comments</comments> <pubDate>Mon, 25 Jan 2010 00:32:01 +0000</pubDate> <dc:creator>hubi</dc:creator> <category><![CDATA[scripting]]></category> <category><![CDATA[AppleScript]]></category> <category><![CDATA[Lebensweisheiten unter Schlafentzug]]></category> <category><![CDATA[Sex]]></category><guid isPermaLink="false">http://hubionmac.com/wordpress/?p=1861</guid> <description><![CDATA[&#8230;hatte ich heute im AppleScript-Forum Wenn es Dir auf langen und technisch aufwendigen AppleScript-Code ankommt, der länger braucht, dann macht diese kurze, unscheinbare und simple Zeile natürlich alles zu Nichte. -> Merke: Gute Lösungsansätze beim Programmieren verhalten sich also umgekehrt proportional zu gutem Sex.]]></description> <content:encoded><![CDATA[<p>&#8230;hatte ich heute im <a href="http://www.fischer-bayern.de/phpBB2/viewtopic.php?p=15303#15303" target="_blank">AppleScript-Forum</a></p><blockquote><p>Wenn es Dir auf langen und technisch aufwendigen AppleScript-Code ankommt, der länger braucht, dann macht diese kurze, unscheinbare und simple Zeile natürlich alles zu Nichte.  -><br /> Merke:<br /> Gute Lösungsansätze beim Programmieren verhalten sich also umgekehrt proportional zu gutem Sex.</p></blockquote> ]]></content:encoded> <wfw:commentRss>http://hubionmac.com/wordpress/2010/01/ein-%c2%b5oment-der-klarheit/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Website to Text</title><link>http://hubionmac.com/wordpress/2009/10/website-to-text/</link> <comments>http://hubionmac.com/wordpress/2009/10/website-to-text/#comments</comments> <pubDate>Sat, 10 Oct 2009 19:39:54 +0000</pubDate> <dc:creator>hubi</dc:creator> <category><![CDATA[scripting]]></category> <category><![CDATA[convert]]></category> <category><![CDATA[OS X]]></category> <category><![CDATA[terminal]]></category> <category><![CDATA[textutil]]></category><guid isPermaLink="false">http://hubionmac.com/wordpress/?p=1567</guid> <description><![CDATA[Schon interessant, was Mac OSX so für praktische Tools bereit hält. mit textutil lassen sich Texte konvertieren, docx zu html, rtf zu text oder wie im Beispiel der Text-Inhalt einer Webseite zu Text: Code zum markieren einmal anklicken Code im Skript-Editor öffnen set web_url to quoted form of &#8220;http://hubionmac.com/wordpress/&#8221; do shell script &#8220;curl &#8221; &#38; [...]]]></description> <content:encoded><![CDATA[<p>Schon interessant, was Mac OSX so für praktische Tools bereit hält. mit <em>textutil</em> lassen sich Texte konvertieren, docx zu html, rtf zu text oder wie im Beispiel der Text-Inhalt einer Webseite zu Text:</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"><b>set</b> <span style="color: #3b9120">web_url</span> <b>to</b> <span style="color: #8c27d6">quoted form</span> <b>of</b> &#8220;http://hubionmac.com/wordpress/&#8221;</p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana"><span style="color: #172fb9"><b>do shell script</b></span> &#8220;curl &#8221; &amp; <span style="color: #3b9120">web_url</span> &amp; &#8221; | textutil -stdin -convert txt -format html -stdout&#8221;</p></div></div> ]]></content:encoded> <wfw:commentRss>http://hubionmac.com/wordpress/2009/10/website-to-text/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Komm schon&#8230; sag mal Badaboom</title><link>http://hubionmac.com/wordpress/2009/10/komm-schon-sag-mal-badaboom/</link> <comments>http://hubionmac.com/wordpress/2009/10/komm-schon-sag-mal-badaboom/#comments</comments> <pubDate>Tue, 06 Oct 2009 17:52:25 +0000</pubDate> <dc:creator>hubi</dc:creator> <category><![CDATA[scripting]]></category><guid isPermaLink="false">http://hubionmac.com/wordpress/?p=1515</guid> <description><![CDATA[Die Sprachausgabe ist ja etwas tricky ;_) Code zum markieren einmal anklicken Code im Skript-Editor öffnen repeat with i from 1 to 3 say 4 &#8211; i delay 1 end repeat say &#8220;Badabooom&#8221; say &#8220;NO!&#8221; say &#8220;BoudaabUhmm&#8221; say &#8220;Damit!&#8221; say &#8220;Bada Booom&#8221; say &#8220;YEAH!&#8221;]]></description> <content:encoded><![CDATA[<p>Die Sprachausgabe ist ja etwas tricky ;_)</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"><b>repeat</b> <b>with</b> <span style="color: #2d9600">i</span> <b>from</b> 1 <b>to</b> 3</p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana"><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #2000c0"><b>say</b></span> 4 &#8211; <span style="color: #2d9600">i</span></p><p style="margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana; color: #2000c0"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span><b>delay</b><span style="color: #000000"> 1</span></p><p style="margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana"><b>end</b> <b>repeat</b></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>say</b></span> &#8220;Badabooom&#8221;</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>say</b></span> &#8220;NO!&#8221;</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>say</b></span> &#8220;BoudaabUhmm&#8221;</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>say</b></span> &#8220;Damit!&#8221;</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>say</b></span> &#8220;Bada Booom&#8221;</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>say</b></span> &#8220;YEAH!&#8221;</p></div></div> ]]></content:encoded> <wfw:commentRss>http://hubionmac.com/wordpress/2009/10/komm-schon-sag-mal-badaboom/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Wusste ich auch noch nicht String to AppleScript Date</title><link>http://hubionmac.com/wordpress/2009/09/wusste-ich-auch-noch-nicht-string-to-applescript-date/</link> <comments>http://hubionmac.com/wordpress/2009/09/wusste-ich-auch-noch-nicht-string-to-applescript-date/#comments</comments> <pubDate>Wed, 23 Sep 2009 06:42:12 +0000</pubDate> <dc:creator>hubi</dc:creator> <category><![CDATA[scripting]]></category> <category><![CDATA[AppleScript]]></category> <category><![CDATA[date]]></category> <category><![CDATA[date2string]]></category><guid isPermaLink="false">http://hubionmac.com/wordpress/?p=1470</guid> <description><![CDATA[date &#8220;10.10.10&#8243; date "Sonntag, 10. Oktober 2010 00:00:00" ergibt doch glatt ein AppleScript-Datum&#8230;]]></description> <content:encoded><![CDATA[<p>date &#8220;10.10.10&#8243;</p><pre>date "Sonntag, 10. Oktober 2010 00:00:00"</pre><p>ergibt doch glatt ein AppleScript-Datum&#8230;</p> ]]></content:encoded> <wfw:commentRss>http://hubionmac.com/wordpress/2009/09/wusste-ich-auch-noch-nicht-string-to-applescript-date/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 7/37 queries in 0.017 seconds using disk: basic
Object Caching 225/459 objects using disk: basic

Served from: hubionmac.com @ 2012-02-12 06:20:14 -->
