<?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>eFi.blog &#187; AppleScript</title>
	<atom:link href="http://fns.csokolade.hu/category/mac/applescript/feed/" rel="self" type="application/rss+xml" />
	<link>http://fns.csokolade.hu</link>
	<description>szánSájn, tibiCsoki, wörldPísz!</description>
	<lastBuildDate>Mon, 06 Sep 2010 07:05:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mac workflow: blogpic HOWTO</title>
		<link>http://fns.csokolade.hu/2010/06/23/mac-workflow-blogpic-howt/</link>
		<comments>http://fns.csokolade.hu/2010/06/23/mac-workflow-blogpic-howt/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 15:33:58 +0000</pubDate>
		<dc:creator>eFi</dc:creator>
				<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[Gastro]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://fns.csokolade.hu/?p=604</guid>
		<description><![CDATA[A mai mese arról fog szólni, hogy hogyan készítem el egy-egy postba a szép felgörbült szélű thumbnailes képeket, mint amilyen ez a kovászos uborka itt alant:

A Mac recept
Hozzávalók:

Acorn - image editor Gus Mueller billentyűzetéből. Puritán, letisztult, szeretem.
JSTalk - script bridge, szintén Gustól. Segítségével a scriptelhető OS X alkalmazásokhoz JavaScriptes vagy Objective C-s stílusban írhatsz scripteket.
TextExpander [...]]]></description>
			<content:encoded><![CDATA[<p>A mai mese arról fog szólni, hogy hogyan készítem el egy-egy postba a szép felgörbült szélű thumbnailes képeket, mint amilyen ez a kovászos uborka itt alant:</p>
<p><a href="http://fns.csokolade.hu/files/2010/06/koviubi.jpg"><img src="http://fns.csokolade.hu/files/2010/06/koviubi.png" alt="" title="koviubi" align="center"/></a></p>
<p><strong>A Mac recept</strong></p>
<p>Hozzávalók:</p>
<ul>
<li><a href="http://flyingmeat.com/acorn/">Acorn</a> - image editor <a href="http://gusmueller.com/blog/">Gus Mueller </a>billentyűzetéből. Puritán, letisztult, szeretem.</li>
<li><a href="http://jstalk.org/">JSTalk</a> - script bridge, szintén Gustól. Segítségével a scriptelhető OS X alkalmazásokhoz JavaScriptes vagy Objective C-s stílusban írhatsz scripteket.</li>
<li><a href="http://www.smileonmymac.com/TextExpander/">TextExpander</a> - (akár) scriptelhető text makrózó tool, mely számos változó használatát (dátum és idő, clipboard tartalom, kép, kurzorműveletek) engedi meg.</li>
<li>WordPress <a href="http://granades.com/wp-fancyzoom-wordpress-plugin/">FancyZoom</a> plugin - <a href="http://www.cabel.name/">Cabel Sasser</a> JavaScriptben írt remeke. Ő állítja elő az oldalba pakolt img HTML tag-ekhez a zoom effektet, amikor a thumbnailre klattyolsz.</li>
</ul>
<p>A workflow</p>
<p>A dolog onnan indul, hogy a kívánt képet 1280x1280 max méretre cropolom, majd lementem jpg formátumban. Az így előkészített képet bedobom az Acorn-ba, majd lefuttatom a Framer fedőnevű JSTalk scriptet, aki előállít egy 500 pixel széles smallDoc.png thumbnail image-et a beledobott képből.<br />
A két képet feltöltöm a WordPressbe, majd egy TextExpander makró segítségével berámolom a postba a thumbnailhez és az alatta levő image-hez szükséges HTML kódot.</p>
<p>Nézzük meg a JSTalk scriptet és a TextExpander snippetet, aztán jöhet a kovászos ubi receptje. Elsőként itt a script - ehhez túl sok közöm nincs, Gus csomagolta a JSTalk példák közé, nekem meg nagyon megtetszett az eredménye. Persze lehetne ez egyszer CSS3, de amíg nem, addig jó ez így is, hardcoded módon:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">&nbsp;
&nbsp;
var acorn <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>JSTalk application<span style="color: #002200;">:</span><span style="color: #bf1d1a;">&quot;Acorn&quot;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #11740a; font-style: italic;">// var doc = acorn.open_(&quot;/path/to/SomeImage.jpg&quot;);</span>
var doc <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>acorn orderedDocuments<span style="color: #002200;">&#93;</span> objectAtIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// scale our image down</span>
<span style="color: #002200;">&#91;</span>doc scaleImageToWidth<span style="color: #002200;">:</span><span style="color: #2400d9;">492</span><span style="color: #002200;">&#93;</span>;
&nbsp;
var image <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSImage</span> alloc<span style="color: #002200;">&#93;</span> initWithData<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>doc dataRepresentationOfType<span style="color: #002200;">:</span><span style="color: #bf1d1a;">&quot;public.png&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// close the doc, since we've already got the data we need.</span>
<span style="color: #002200;">&#91;</span>doc close<span style="color: #002200;">&#93;</span>;
&nbsp;
var bitmap <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>image bestRepresentationForDevice<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
&nbsp;
var extent <span style="color: #002200;">=</span> NSMakeRect<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">0</span>, <span style="color: #002200;">&#91;</span>bitmap pixelsWide<span style="color: #002200;">&#93;</span>, <span style="color: #002200;">&#91;</span>bitmap pixelsHigh<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;
var xOffset <span style="color: #002200;">=</span> <span style="color: #2400d9;">5</span>;
var yOffset <span style="color: #002200;">=</span> <span style="color: #2400d9;">35</span>;
var curveHeight <span style="color: #002200;">=</span> <span style="color: #2400d9;">15</span>;
var imageYOffset <span style="color: #002200;">=</span> <span style="color: #2400d9;">10</span>;
var whiteBorderWidth <span style="color: #002200;">=</span> <span style="color: #2400d9;">4</span>;
var doubleBorderWidth <span style="color: #002200;">=</span> whiteBorderWidth <span style="color: #002200;">*</span> <span style="color: #2400d9;">2</span>;
&nbsp;
var newSize <span style="color: #002200;">=</span> NSMakeSize<span style="color: #002200;">&#40;</span>extent.size.width <span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span>whiteBorderWidth <span style="color: #002200;">*</span> <span style="color: #2400d9;">2</span><span style="color: #002200;">&#41;</span>,
                         extent.size.height <span style="color: #002200;">+</span> imageYOffset <span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span>whiteBorderWidth <span style="color: #002200;">*</span> <span style="color: #2400d9;">2</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>;
&nbsp;
var newImage <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSImage</span> alloc<span style="color: #002200;">&#93;</span> initWithSize<span style="color: #002200;">:</span>newSize<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>newImage lockFocus<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSGraphicsContext</span> currentContext<span style="color: #002200;">&#93;</span> saveGraphicsState<span style="color: #002200;">&#93;</span>;
&nbsp;
var shadow <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSShadow</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>shadow setShadowColor<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSColor</span> blackColor<span style="color: #002200;">&#93;</span> colorWithAlphaComponent<span style="color: #002200;">:</span>.6<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
var shadowOffset <span style="color: #002200;">=</span> NSMakeSize<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span>yOffset <span style="color: #002200;">+</span> <span style="color: #2400d9;">5</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#91;</span>shadow setShadowOffset<span style="color: #002200;">:</span>shadowOffset<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>shadow setShadowBlurRadius<span style="color: #002200;">:</span><span style="color: #2400d9;">5</span><span style="color: #002200;">&#93;</span>;
shadow.set<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// make a curved path, at the bottom of our image.</span>
bezierPath <span style="color: #002200;">=</span> <span style="color: #400080;">NSBezierPath</span>.bezierPath<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>bezierPath moveToPoint<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>xOffset, <span style="color: #2400d9;">40</span> <span style="color: #002200;">+</span> yOffset<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>bezierPath lineToPoint<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>extent.size.width <span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>xOffset<span style="color: #002200;">&#41;</span> <span style="color: #002200;">+</span> doubleBorderWidth, <span style="color: #2400d9;">40</span> <span style="color: #002200;">+</span> yOffset<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>bezierPath lineToPoint<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>extent.size.width <span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>xOffset<span style="color: #002200;">&#41;</span> <span style="color: #002200;">+</span> doubleBorderWidth, <span style="color: #2400d9;">10</span> <span style="color: #002200;">+</span> yOffset<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>bezierPath curveToPoint<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>newSize.width <span style="color: #002200;">/</span> <span style="color: #2400d9;">2</span>, curveHeight <span style="color: #002200;">+</span> yOffset<span style="color: #002200;">&#41;</span>
           controlPoint1<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>extent.size.width <span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>xOffset<span style="color: #002200;">&#41;</span>, <span style="color: #2400d9;">10</span> <span style="color: #002200;">+</span> yOffset<span style="color: #002200;">&#41;</span>
           controlPoint2<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>newSize.width <span style="color: #002200;">*</span>.75, curveHeight <span style="color: #002200;">+</span> yOffset<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>bezierPath curveToPoint<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>xOffset, <span style="color: #2400d9;">10</span> <span style="color: #002200;">+</span> yOffset<span style="color: #002200;">&#41;</span>
           controlPoint1<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>newSize.width <span style="color: #002200;">*</span>.25, curveHeight <span style="color: #002200;">+</span> yOffset<span style="color: #002200;">&#41;</span>
           controlPoint2<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>xOffset, <span style="color: #2400d9;">10</span> <span style="color: #002200;">+</span> yOffset<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>bezierPath fill<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// get rid of our shadow</span>
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSGraphicsContext</span> currentContext<span style="color: #002200;">&#93;</span> restoreGraphicsState<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// draw a white border</span>
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSColor</span> whiteColor<span style="color: #002200;">&#93;</span> set<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSBezierPath</span> bezierPathWithRect<span style="color: #002200;">:</span>NSMakeRect<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, imageYOffset, newSize.width, extent.size.height <span style="color: #002200;">+</span> whiteBorderWidth <span style="color: #002200;">*</span> <span style="color: #2400d9;">2</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span> fill<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// draw our gray border around the white border</span>
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSColor</span> lightGrayColor<span style="color: #002200;">&#93;</span> set<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSBezierPath</span> bezierPathWithRect<span style="color: #002200;">:</span>NSMakeRect<span style="color: #002200;">&#40;</span>.5, imageYOffset <span style="color: #002200;">+</span> .5 , newSize.width <span style="color: #002200;">-</span> <span style="color: #2400d9;">1</span>, <span style="color: #002200;">&#40;</span>extent.size.height <span style="color: #002200;">-</span> <span style="color: #2400d9;">1</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span>whiteBorderWidth <span style="color: #002200;">*</span> <span style="color: #2400d9;">2</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span> stroke<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// NSImage takes into account dpi of the image.  So we force it's size, to avoid small images.</span>
<span style="color: #002200;">&#91;</span>image setSize<span style="color: #002200;">:</span> extent.size<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #11740a; font-style: italic;">// draw our image</span>
<span style="color: #002200;">&#91;</span>image drawAtPoint<span style="color: #002200;">:</span>NSMakePoint<span style="color: #002200;">&#40;</span>whiteBorderWidth, imageYOffset <span style="color: #002200;">+</span> whiteBorderWidth<span style="color: #002200;">&#41;</span>
          fromRect<span style="color: #002200;">:</span>NSMakeRect<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">0</span>, extent.size.width, extent.size.height<span style="color: #002200;">&#41;</span>
         operation<span style="color: #002200;">:</span>NSCompositeCopy
          fraction<span style="color: #002200;">:</span><span style="color: #2400d9;">1</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>newImage unlockFocus<span style="color: #002200;">&#93;</span>;
&nbsp;
&nbsp;
var smallDoc <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>acorn sharedDocumentController<span style="color: #002200;">&#93;</span> newDocumentWithImageData<span style="color: #002200;">:</span> <span style="color: #002200;">&#91;</span>newImage TIFFRepresentation<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>smallDoc dataRepresentationOfType<span style="color: #002200;">:</span><span style="color: #bf1d1a;">&quot;public.png&quot;</span><span style="color: #002200;">&#93;</span> writeToFile<span style="color: #002200;">:</span><span style="color: #bf1d1a;">&quot;/Users/fns/Desktop/smallDoc.png&quot;</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>smallDoc close<span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>Ez pedig a TextExpander snippet:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;http://fns.csokolade.hu/files/%Y/%m/%clipboard.jpg&quot;&gt;&lt;img src=&quot;http://fns.csokolade.hu/files/%Y/%m/%clipboard.png&quot; alt=&quot;&quot; title=&quot;%clipboard&quot;/&gt;&lt;/a&gt;</pre></div></div>

<p>A TextExpander snippetnél mindössze annyi dolgom van pluszban, hogy a kép nevét a clipboardba másoljam. Ez meg OS X alatt egy Enter a filenéven, majd ⌘C és Sanyi.</p>
<p><strong>A kovászos ubi recept</strong></p>
<p>Egy 5 literes befőttes üvegbe kb. 3 kiló uborka fér. Az üveget forró vízzel kimosom, majd elfektetem, hogy könnyebb legyen bele pakolni.<br />
Az uborkák két végét levágom, hosszában 4-5-6 vágást ejtek rajtuk. Nekiállok úgy bepakolni az uborkákat, hogy függőlegesen álljanak majd az üvegben, mikor érleli őket a Nap.<br />
Egy réteg uborka után egy nagy adag kaprot teszek be az üvegbe (persze csak akkor, ha épp nem <a href="http://www.pappito.com/2010/02/01/kert-repakrol-es-uborkakrol/#comment-5346">Pappitonak</a> készül a cucc :)), majd megint ubi és ez így megy addig, amíg meg nem telik a bödön.<br />
Óvatosan felállítom az üveget, majd 2 púpos evőkanál sót teszek a tetejére. Felforralok 3-4 liter vizet és egy merőkanállal rákanalazom az uborkákra, amíg tele nem lesz az üveg.<br />
A végén egy szelet kenyeret nyomok a tetejébe, letakarom az egészet egy tányérral és megy ki a Napra, 3-4 napig. Mikor a lé már zavaros, leszedem a kenyeret, de 1-2 napot adok még neki a melegen, hadd érjen össze.</p>
]]></content:encoded>
			<wfw:commentRss>http://fns.csokolade.hu/2010/06/23/mac-workflow-blogpic-howt/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Meteo script update</title>
		<link>http://fns.csokolade.hu/2010/05/16/meteo-script-update/</link>
		<comments>http://fns.csokolade.hu/2010/05/16/meteo-script-update/#comments</comments>
		<pubDate>Sun, 16 May 2010 08:12:06 +0000</pubDate>
		<dc:creator>eFi</dc:creator>
				<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://fns.csokolade.hu/?p=505</guid>
		<description><![CDATA[Tavaly írtam még ezt a pici AppleScriptet, ami leszedi a koponyeg.hu és az idokep.hu site-ok időjárás-vizualizációs képeit és feldobja a monitorodra full screenben az OS X Quick Look-ja segítségével (slight keyboard hack, de megy). A site-ok frissültek, eljött az update ideje is: mostantól nem nyakló nélkül jpg-nek ment a script mindent, hanem amire utasítod. Ennek [...]]]></description>
			<content:encoded><![CDATA[<p>Tavaly írtam még ezt a pici AppleScriptet, ami leszedi a koponyeg.hu és az idokep.hu site-ok időjárás-vizualizációs képeit és feldobja a monitorodra full screenben az OS X Quick Look-ja segítségével (slight keyboard hack, de megy). A site-ok frissültek, eljött az update ideje is: mostantól nem nyakló nélkül jpg-nek ment a script mindent, hanem amire utasítod. Ennek köszönhetően pl. az idokep.hu széltérkép animgif-je animgif marad és teljesen jól mutatja a felhőtérkép után pakolva, hogy merre visszi a szél az előző képen látható felhőket (ma pont jól is jön).</p>
<p>Lustáknak a script app-ba fordítva, zip-be csomagolva <a href="http://fns.hu/freestuff/mac/meteo.zip">itt</a>, magyar billentyűzethez <a href="http://fns.hu/freestuff/mac/meteo-hu.zip">itt</a>, a forrás meg alant <em>(a script a ~/Pictures könyváradban létre fog hozni egy <strong>delme-meteo</strong> nevű foldert, amibe a leszippantott képeket menti. Ezt a foldert törli és létrehozza minden alkalommal újra és újra.)</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">(*
	Meteo
	by Gabor PENOFF (http://fns.csokolade.hu)
&nbsp;
	release 20100516-1002
&nbsp;
	Requirements:
	- before run you need to Enable Access for Assistive Devices in SysPrefs/Universal Access
	- install Growl from http://growl.info to get non-modal notification dialogs
&nbsp;
	Usage:
	- just run the script
&nbsp;
	That's all.
*)</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">set</span> myScriptID <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;Meteo&quot;</span> <span style="color: #808080; font-style: italic;">-- ID for Growl display</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-- set date variables:</span>
<span style="color: #ff0033; font-weight: bold;">set</span> myYear <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033; font-weight: bold;">get</span> <span style="color: #0066ff;">text</span> <span style="color: #000000;">1</span> <span style="color: #ff0033;">thru</span> <span style="color: #000000;">4</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #000000;">&#40;</span>year <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #000000;">&#40;</span>current date<span style="color: #000000;">&#41;</span> <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">string</span><span style="color: #000000;">&#41;</span>
<span style="color: #ff0033; font-weight: bold;">set</span> myMonth <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">month</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #000000;">&#40;</span>current date<span style="color: #000000;">&#41;</span> <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">number</span>
<span style="color: #ff0033; font-weight: bold;">if</span> myMonth <span style="color: #000000;">&lt;</span> <span style="color: #000000;">10</span> <span style="color: #ff0033; font-weight: bold;">then</span> <span style="color: #ff0033; font-weight: bold;">set</span> myMonth <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;0&quot;</span> <span style="color: #000000;">&amp;</span> myMonth <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">string</span>
<span style="color: #ff0033; font-weight: bold;">set</span> myDay <span style="color: #ff0033; font-weight: bold;">to</span> day <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #000000;">&#40;</span>current date<span style="color: #000000;">&#41;</span>
<span style="color: #ff0033; font-weight: bold;">if</span> myDay <span style="color: #000000;">&lt;</span> <span style="color: #000000;">10</span> <span style="color: #ff0033; font-weight: bold;">then</span> <span style="color: #ff0033; font-weight: bold;">set</span> myDay <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;0&quot;</span> <span style="color: #000000;">&amp;</span> myDay <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">string</span>
<span style="color: #ff0033; font-weight: bold;">set</span> myHour <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">hours</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #000000;">&#40;</span>current date<span style="color: #000000;">&#41;</span>
<span style="color: #ff0033; font-weight: bold;">if</span> myHour <span style="color: #000000;">&lt;</span> <span style="color: #000000;">10</span> <span style="color: #ff0033; font-weight: bold;">then</span> <span style="color: #ff0033; font-weight: bold;">set</span> myHour <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;0&quot;</span> <span style="color: #000000;">&amp;</span> myHour <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">string</span>
<span style="color: #ff0033; font-weight: bold;">set</span> myMinute <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;00&quot;</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">set</span> tmpDir <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;delme-meteo&quot;</span>
<span style="color: #ff0033; font-weight: bold;">set</span> myFilePrefix <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;delme-met-&quot;</span>
<span style="color: #ff0033; font-weight: bold;">set</span> tIdokepStart <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;http://www.idokep.hu/arch_kep.php?kep=&quot;</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">set</span> myURLs <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#123;</span>¬
	<span style="color: #009900;">&quot;http://img.koponyeg.hu/img/15napos/&quot;</span> <span style="color: #000000;">&amp;</span> myYear <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;/&quot;</span> <span style="color: #000000;">&amp;</span> myMonth <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;/1_&quot;</span> <span style="color: #000000;">&amp;</span> myYear <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;-&quot;</span> <span style="color: #000000;">&amp;</span> myMonth <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;-&quot;</span> <span style="color: #000000;">&amp;</span> myDay <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;grafikon.png|png&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://terkep.idokep.hu/kep.php?kep=mix|jpg&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://terkep.idokep.hu/kep.php?kep=hoterkep2&amp;regio=hu1680|jpg&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://terkep.idokep.hu/kep.php?kep=felhokep2&amp;regio=hu1680|jpg&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://terkep.idokep.hu/kep.php?kep=szelterkep2_anim|gif&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://terkep.idokep.hu/kep.php?kep=szelterkep2&amp;regio=hu1680|jpg&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://terkep.idokep.hu/kep.php?kep=legnyomasterkep|jpg&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://feny.idokep.hu/kep.php?kep=csap24|jpg&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://feny.idokep.hu/kep.php?kep=csap1|jpg&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://feny.idokep.hu/kep.php?kep=aqua|jpg&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://terkep.idokep.hu/kep.php?kep=rh|jpg&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://terkep.idokep.hu/kep.php?kep=uv|jpg&quot;</span>, ¬
	<span style="color: #009900;">&quot;http://terkep.idokep.hu/kep.php?kep=pollen0|jpg&quot;</span><span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">set</span> rootDir <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#40;</span><span style="color: #0066ff;">path to</span> home <span style="color: #0066ff;">folder</span> <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">string</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;Pictures&quot;</span>
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Finder&quot;</span> <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #ff0033; font-weight: bold;">set</span> fullDir <span style="color: #ff0033; font-weight: bold;">to</span> rootDir <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;:&quot;</span> <span style="color: #000000;">&amp;</span> tmpDir <span style="color: #808080; font-style: italic;">-- save fullDir</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">set</span> myNotification <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;Downloading METEO images to &quot;</span> <span style="color: #000000;">&amp;</span> fullDir <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;...&quot;</span>
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">me</span> <span style="color: #ff0033; font-weight: bold;">to</span> notifyWithGrowl<span style="color: #000000;">&#40;</span>myScriptID, myNotification<span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">try</span>
	<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Finder&quot;</span> <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">delete</span> fullDir
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">try</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Finder&quot;</span> <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">make</span> <span style="color: #0066ff;">new</span> <span style="color: #0066ff;">folder</span> at <span style="color: #0066ff;">alias</span> rootDir <span style="color: #ff0033; font-weight: bold;">with</span> <span style="color: #0066ff;">properties</span> <span style="color: #000000;">&#123;</span><span style="color: #0066ff;">name</span>:tmpDir<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-- download files:</span>
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;URL Access Scripting&quot;</span>
	<span style="color: #ff0033; font-weight: bold;">set</span> i <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">1</span>
	<span style="color: #ff0033; font-weight: bold;">repeat</span> <span style="color: #ff0033; font-weight: bold;">with</span> myURL <span style="color: #ff0033; font-weight: bold;">in</span> myURLs
		<span style="color: #ff0033; font-weight: bold;">set</span> thisURL <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#40;</span><span style="color: #0066ff;">text</span> <span style="color: #000000;">1</span> <span style="color: #ff0033;">thru</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #0066ff;">offset of</span> <span style="color: #009900;">&quot;|&quot;</span> <span style="color: #ff0033; font-weight: bold;">in</span> myURL<span style="color: #000000;">&#41;</span> <span style="color: #000000;">-</span> <span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #ff0033; font-weight: bold;">of</span> myURL<span style="color: #000000;">&#41;</span>
		<span style="color: #ff0033; font-weight: bold;">set</span> thisExt <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#40;</span><span style="color: #0066ff;">text</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #0066ff;">offset of</span> <span style="color: #009900;">&quot;|&quot;</span> <span style="color: #ff0033; font-weight: bold;">in</span> myURL<span style="color: #000000;">&#41;</span> <span style="color: #000000;">+</span> <span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #ff0033;">thru</span> <span style="color: #000000;">&#40;</span>length <span style="color: #ff0033; font-weight: bold;">of</span> myURL<span style="color: #000000;">&#41;</span> <span style="color: #ff0033; font-weight: bold;">of</span> myURL<span style="color: #000000;">&#41;</span>
		<span style="color: #ff0033; font-weight: bold;">set</span> <span style="color: #ff0033;">the</span> myFile <span style="color: #ff0033; font-weight: bold;">to</span> fullDir <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;:&quot;</span> <span style="color: #000000;">&amp;</span> myFilePrefix <span style="color: #000000;">&amp;</span> i <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;.&quot;</span> <span style="color: #000000;">&amp;</span> thisExt
		download thisURL <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">file</span> myFile replacing <span style="color: #0066ff;">yes</span>
		<span style="color: #ff0033; font-weight: bold;">set</span> i <span style="color: #ff0033; font-weight: bold;">to</span> i <span style="color: #000000;">+</span> <span style="color: #000000;">1</span>
	<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">repeat</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-- display images using full-featured QuickLook window:</span>
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Finder&quot;</span>
	<span style="color: #0066ff;">activate</span>
	<span style="color: #0066ff;">open</span> <span style="color: #0066ff;">folder</span> fullDir
	<span style="color: #ff0033; font-weight: bold;">set</span> current view <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #ff0033;">front</span> Finder <span style="color: #0066ff;">window</span> <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">list</span> view
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;System Events&quot;</span>
	key code <span style="color: #000000;">0</span> using <span style="color: #000000;">&#123;</span>command down<span style="color: #000000;">&#125;</span> <span style="color: #808080; font-style: italic;">-- cmd+a</span>
	key code <span style="color: #000000;">6</span> using <span style="color: #000000;">&#123;</span>command down, option down<span style="color: #000000;">&#125;</span> <span style="color: #808080; font-style: italic;">-- cmd+opt+y; y is 16 for US, 6 for Hungarians :)</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-- that would be the callback after QuickLook:</span>
<span style="color: #808080; font-style: italic;">--tell application &quot;Finder&quot;</span>
<span style="color: #808080; font-style: italic;">--	activate</span>
<span style="color: #808080; font-style: italic;">--	set current view of front Finder window to v</span>
<span style="color: #808080; font-style: italic;">--	close front Finder window</span>
<span style="color: #808080; font-style: italic;">--end tell</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-- display images using a very limited (dumb) QuickLook window:</span>
<span style="color: #808080; font-style: italic;">--do shell script &quot;qlmanage -p  &quot; &amp; (POSIX path of fullDir) &amp; &quot;/* &gt;&amp; /dev/null&quot;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">-- GrowlCheck:</span>
<span style="color: #ff0033; font-weight: bold;">on</span> growlInstalled<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #ff0033; font-weight: bold;">try</span>
		<span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;ls /Library/PreferencePanes/Growl.prefPane/&quot;</span>
		<span style="color: #ff0033; font-weight: bold;">return</span> <span style="color: #0066ff;">true</span>
	<span style="color: #ff0033; font-weight: bold;">on</span> <span style="color: #ff0033; font-weight: bold;">error</span>
		<span style="color: #ff0033; font-weight: bold;">return</span> <span style="color: #0066ff;">false</span>
	<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">try</span>
<span style="color: #ff0033; font-weight: bold;">end</span> growlInstalled
&nbsp;
<span style="color: #808080; font-style: italic;">-- Growl notifier:</span>
<span style="color: #ff0033; font-weight: bold;">on</span> notifyWithGrowl<span style="color: #000000;">&#40;</span>myApp, myText<span style="color: #000000;">&#41;</span>
	<span style="color: #ff0033; font-weight: bold;">set</span> myIconApp <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;Preview&quot;</span>
	<span style="color: #ff0033; font-weight: bold;">set</span> notificationID <span style="color: #ff0033; font-weight: bold;">to</span> myApp <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;.default&quot;</span>
&nbsp;
	<span style="color: #ff0033; font-weight: bold;">if</span> growlInstalled<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #ff0033; font-weight: bold;">then</span>
		<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;GrowlHelperApp&quot;</span>
			<span style="color: #808080; font-style: italic;">-- list of notification types</span>
			<span style="color: #ff0033; font-weight: bold;">set</span> <span style="color: #ff0033;">the</span> ANL <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#123;</span>notificationID<span style="color: #000000;">&#125;</span>
			<span style="color: #808080; font-style: italic;">-- list of enabled notifications</span>
			<span style="color: #ff0033; font-weight: bold;">set</span> <span style="color: #ff0033;">the</span> DNL <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #000000;">&#123;</span>notificationID<span style="color: #000000;">&#125;</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">-- register script</span>
			register <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">application</span> myApp all notifications ANL default notifications DNL icon <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">application</span> myIconApp
			<span style="color: #808080; font-style: italic;">-- send notification</span>
			notify <span style="color: #ff0033; font-weight: bold;">with</span> <span style="color: #0066ff;">name</span> notificationID title myApp description myText <span style="color: #0066ff;">application</span> <span style="color: #0066ff;">name</span> myApp
		<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span>
	<span style="color: #ff0033; font-weight: bold;">else</span>
		<span style="color: #808080; font-style: italic;">-- skip alert if no Growl installed</span>
		<span style="color: #808080; font-style: italic;">--display alert &quot;Growl is not installed&quot;</span>
	<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">if</span>
<span style="color: #ff0033; font-weight: bold;">end</span> notifyWithGrowl</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://fns.csokolade.hu/2010/05/16/meteo-script-update/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Plain Text QuickLook ismeretlen file-okhoz</title>
		<link>http://fns.csokolade.hu/2010/02/10/plain-text-quicklook-ismeretlen-file-okhoz/</link>
		<comments>http://fns.csokolade.hu/2010/02/10/plain-text-quicklook-ismeretlen-file-okhoz/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 21:57:29 +0000</pubDate>
		<dc:creator>eFi</dc:creator>
				<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://fns.csokolade.hu/?p=25</guid>
		<description><![CDATA[1. Megírod ezt a scriptet a Script Editorban:

tell application &#34;Finder&#34;
	copy selection to selectedItems
	if &#40;&#40;count of selectedItems&#41; ≠ 0&#41; then
		repeat with selectedItem in selectedItems
			set file type of file &#40;selectedItem as alias&#41; to &#34;TEXT&#34;
			set p to quoted form of &#40;POSIX path of &#40;selectedItem as alias&#41;&#41; as string
			do shell script &#40;&#34;qlmanage -p &#34; &#38; p&#41;
		end repeat
	end if
end tell

2. [...]]]></description>
			<content:encoded><![CDATA[<p>1. Megírod ezt a scriptet a Script Editorban:</p>

<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;Finder&quot;</span>
	<span style="color: #ff0033; font-weight: bold;">copy</span> <span style="color: #0066ff;">selection</span> <span style="color: #ff0033; font-weight: bold;">to</span> selectedItems
	<span style="color: #ff0033; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #0066ff;">count</span> <span style="color: #ff0033; font-weight: bold;">of</span> selectedItems<span style="color: #000000;">&#41;</span> ≠ <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #ff0033; font-weight: bold;">then</span>
		<span style="color: #ff0033; font-weight: bold;">repeat</span> <span style="color: #ff0033; font-weight: bold;">with</span> selectedItem <span style="color: #ff0033; font-weight: bold;">in</span> selectedItems
			<span style="color: #ff0033; font-weight: bold;">set</span> <span style="color: #0066ff;">file</span> type <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">file</span> <span style="color: #000000;">&#40;</span>selectedItem <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">alias</span><span style="color: #000000;">&#41;</span> <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;TEXT&quot;</span>
			<span style="color: #ff0033; font-weight: bold;">set</span> p <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">quoted form</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #000000;">&#40;</span><span style="color: #0066ff;">POSIX path</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #000000;">&#40;</span>selectedItem <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">alias</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">string</span>
			<span style="color: #0066ff;">do shell script</span> <span style="color: #000000;">&#40;</span><span style="color: #009900;">&quot;qlmanage -p &quot;</span> <span style="color: #000000;">&amp;</span> p<span style="color: #000000;">&#41;</span>
		<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">repeat</span>
	<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">if</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></pre></div></div>

<p>2. Lemented valami rövid néven úgy, hogy a File Format mezőt "Application" típusúra állítod - mehet akár a /Applications folderbe, akár bárhova máshova, amit a Spotlight lát.</p>
<p>Ezek után ha szembejön a Finderben egy file, amit plain textként szeretnél megnézni, de annak a típusa még nem TEXT (.sub, .srt, .nfo file-ok mind ilyenek lesznek), akkor a Finderben a kérdéses file-on állva nyomsz egy ⌘Space kombinációt, hogy előbújjon a Spotlight, beírod neki villámgyorsan, hogy "ql" (vagy amilyen nevet kitaláltál) és az előbb elkészített script alkalmazásod mindjárt be is állítja TEXT típusúnak a kérdéses file-t, plusz szól a QuickLook-nak, hogy meg szeretnéd nézni.</p>
]]></content:encoded>
			<wfw:commentRss>http://fns.csokolade.hu/2010/02/10/plain-text-quicklook-ismeretlen-file-okhoz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
