<?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>appling weblog &#187; Script</title>
	<atom:link href="http://blog.appling.jp/archives/category/script/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.appling.jp</link>
	<description>appling comes from Apple and Playing.</description>
	<lastBuildDate>Fri, 27 Aug 2010 09:58:15 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>サービスメニューを有効活用</title>
		<link>http://blog.appling.jp/archives/1956</link>
		<comments>http://blog.appling.jp/archives/1956#comments</comments>
		<pubDate>Thu, 29 Oct 2009 04:36:37 +0000</pubDate>
		<dc:creator>Pafuxu</dc:creator>
				<category><![CDATA[Script]]></category>
		<category><![CDATA[Service Menu]]></category>

		<guid isPermaLink="false">http://blog.appling.jp/?p=1956</guid>
		<description><![CDATA[
【コラム】OS X ハッキング! (341) 知られざるSnow Leopard (サービス編) &#124; パソコン &#124; マイコミジャーナル


読んでいると触発されて、よく使う国際標準日時と本日の日付を出力するAutoma [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://journal.mycom.co.jp/column/osx/341/?rt=na" title="【コラム】OS X ハッキング! (341) 知られざるSnow Leopard (サービス編) | パソコン | マイコミジャーナル">【コラム】OS X ハッキング! (341) 知られざるSnow Leopard (サービス編) | パソコン | マイコミジャーナル</a></li>
</ul>

<p>読んでいると触発されて、よく使う国際標準日時と本日の日付を出力するAutomator書類を作ってみた。アプリケーションを選ばず使えるのはいいね。</p>

<ul>
<li><a href="http://dl.getdropbox.com/u/136684/datetime.zip">国際標準日時と本日の日付 &#8211; Automator書類</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.appling.jp/archives/1956/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPADを使ってみる</title>
		<link>http://blog.appling.jp/archives/1786</link>
		<comments>http://blog.appling.jp/archives/1786#comments</comments>
		<pubDate>Wed, 15 Jul 2009 14:53:20 +0000</pubDate>
		<dc:creator>Pafuxu</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[WPAD]]></category>

		<guid isPermaLink="false">http://blog.appling.jp/?p=1786</guid>
		<description><![CDATA[

This auto-detect feature works through DNS. The browser looks for a host named &#8220;wpad&#8221; and if it  [...]]]></description>
			<content:encoded><![CDATA[<blockquote>

<p>This auto-detect feature works through DNS. The browser looks for a host named &#8220;wpad&#8221; and if it exists, loads its settings by accessing a file named &#8220;wpad.dat&#8221; via HTTP. To use DNS-based WPAD with Safari on OS X, follow these steps:</p>

<ul>
<li>In Safari, choose Safari => Preferences</li>
<li>Click on the Advanced icon</li>
<li>Click on the Proxies ? Change Settings button</li>
<li>In the Configure Proxies dropdown menu, select Using A PAC File</li>
<li>In the PAC File URL field, enter http://wpad/wpad.dat</li>
<li>Click on OK</li>
<li>Click on Apply</li>
</ul>

<p>(Via <cite><a href="http://www.macosxhints.com/article.php?story=20090711031033128#">macosxhints.com &#8211; Use web proxy auto-discovery in Safari</a></cite>)</p>

</blockquote>

<p>このWPAD (<a href="http://ja.wikipedia.org/wiki/Web_Proxy_Auto-Discovery_Protocol" title="Web Proxy Auto-Discovery Protocol - Wikipedia">Web Proxy Auto-Discovery Protocol &#8211; Wikipedia</a>)を使ってみることにした。</p>

<p><a href="http://wpad/wpad.dat">http://wpad/wpad.dat</a></p>

<p>処理が速くならずともいいので安定して動いてくれたらいい。</p>

<p>追記 (2009-07-16T09:57:54+09:00): 延滞するようになったので使用をやめました。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.appling.jp/archives/1786/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>キャッシュをまとめて削除</title>
		<link>http://blog.appling.jp/archives/1784</link>
		<comments>http://blog.appling.jp/archives/1784#comments</comments>
		<pubDate>Wed, 15 Jul 2009 14:35:31 +0000</pubDate>
		<dc:creator>Pafuxu</dc:creator>
				<category><![CDATA[Script]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[QuickTime]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://blog.appling.jp/?p=1784</guid>
		<description><![CDATA[Safari, QuickTime, Flash これらのキャッシュをまとめて削除してくれるアップルスクリプト。ログイン時にキャッシュを削除してくれるスクリプトも付属してます。

ログイン時のキャッシュ削除は、ログイン項 [...]]]></description>
			<content:encoded><![CDATA[<p>Safari, QuickTime, Flash これらのキャッシュをまとめて削除してくれるアップルスクリプト。ログイン時にキャッシュを削除してくれるスクリプトも付属してます。</p>

<p>ログイン時のキャッシュ削除は、ログイン項目にスクリプトを追加する手順が必要です。</p>

<p>システム環境設定=>アカウント=>ログイン項目</p>

<p><a href="http://www.tomx.890m.com/" title="AppleScripts by Tom X">iPurge Safari Caches &#8211; AppleScripts by Tom X</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.appling.jp/archives/1784/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaunchBarでカレントタイムを表示</title>
		<link>http://blog.appling.jp/archives/1685</link>
		<comments>http://blog.appling.jp/archives/1685#comments</comments>
		<pubDate>Fri, 19 Jun 2009 21:45:44 +0000</pubDate>
		<dc:creator>Pafuxu</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[DateTime]]></category>
		<category><![CDATA[LaunchBar]]></category>

		<guid isPermaLink="false">http://appling.sakura.ne.jp/wordpress/?p=1685</guid>
		<description><![CDATA[LaunchBarでカレントタイムを表示するスクリプト。



カレントタイムを取得したい場面って結構あるので書いてみた。

インストール:


上記ソースをコピー
スクリプトエディターを起動して新規ドキュメントへソース [...]]]></description>
			<content:encoded><![CDATA[<p>LaunchBarでカレントタイムを表示するスクリプト。</p>

<script src="http://gist.github.com/132901.js" type="text/javascript"></script>

<p>カレントタイムを取得したい場面って結構あるので書いてみた。</p>

<p>インストール:</p>

<ol>
<li>上記ソースをコピー</li>
<li>スクリプトエディターを起動して新規ドキュメントへソースをペースト</li>
<li><code>~/Library/Application Support/LaunchBar/Actions</code> へ名前をつけて保存</li>
<li>LaunchBarを再起動</li>
<li>保存したスクリプトを呼び出しリターンキーを押す</li>
</ol>

<p><a href="http://ja.wikipedia.org/wiki/HUD" title="HUD の意味">HUD</a>ディスプレイに表示されるので、コピー(cmd-C)してクリップボードへ保存。お好きなところへペースト。こんな感じの使い方を想定しています。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.appling.jp/archives/1685/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaunchBarで短縮URLを作成</title>
		<link>http://blog.appling.jp/archives/1110</link>
		<comments>http://blog.appling.jp/archives/1110#comments</comments>
		<pubDate>Wed, 11 Feb 2009 06:26:04 +0000</pubDate>
		<dc:creator>Pafuxu</dc:creator>
				<category><![CDATA[Script]]></category>
		<category><![CDATA[LaunchBar]]></category>
		<category><![CDATA[Shorten URL]]></category>

		<guid isPermaLink="false">http://appling.sakura.ne.jp/wordpress/?p=1110</guid>
		<description><![CDATA[まずは前準備として、「How to create a TinyURL with LB (incl. paste to clipboard)」を参考に２つのスクリプトファイルを作成します。

１つはPythonスクリプト: [...]]]></description>
			<content:encoded><![CDATA[<p>まずは前準備として、「<a href="http://forums.obdev.at/viewtopic.php?t=2206" title="How to create a TinyURL with LB (incl. paste to clipboard)">How to create a TinyURL with LB (incl. paste to clipboard)</a>」を参考に２つのスクリプトファイルを作成します。</p>

<p>１つはPythonスクリプト:</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python </span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">urllib</span> <span style="color: #ff7700;font-weight:bold;">import</span> quote 
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">sys</span> <span style="color: #ff7700;font-weight:bold;">import</span> argv 
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> argv<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>: 
  <span style="color: #ff7700;font-weight:bold;">print</span> quote<span style="color: black;">&#40;</span>argv<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>,<span style="color: #483d8b;">'/:'</span><span style="color: black;">&#41;</span></pre></div></div>


<p>適当なテキストエディタで、上記ソースを書き入れたドキュメントを作成します。名称を「escapeurl」とし、文字コードはUTF-8で.txt拡張子は付けないようにします。~/bin/escapeurl へ実行権限を付けて保存します。</p>

<p>２つ目はAppleScript:</p>


<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">-- based on http://www.leancrew.com/all-this/2007/11/long-and-shortened-url-scripts/ </span>
<span style="color: #808080; font-style: italic;">-- &amp; http://www.leancrew.com/all-this/2009/02/url-shortening-scripts-fixed-i-think/ </span>
<span style="color: #808080; font-style: italic;">-- by @drdrang </span>
<span style="color: #808080; font-style: italic;">-- modified by @ptujec (for LaunchBar) </span>
&nbsp;
<span style="color: #ff0033; font-weight: bold;">on</span> handle_string<span style="color: #000000;">&#40;</span>longURL<span style="color: #000000;">&#41;</span> 
&nbsp;
   <span style="color: #ff0033; font-weight: bold;">set</span> safeURL <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;~/bin/escapeurl &quot;</span> <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;'&quot;</span> <span style="color: #000000;">&amp;</span> longURL <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;'&quot;</span> 
   <span style="color: #ff0033; font-weight: bold;">set</span> cmd <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #009900;">&quot;curl 'http://is.gd/api.php?longurl=&quot;</span> <span style="color: #000000;">&amp;</span> safeURL <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;'&quot;</span> 
   <span style="color: #ff0033; font-weight: bold;">set</span> shortURL <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">do shell script</span> cmd 
   <span style="color: #0066ff;">set <span style="color: #ff0033;">the</span> clipboard to</span> shortURL <span style="color: #ff0033;">as</span> <span style="color: #0066ff;">text</span> 
&nbsp;
<span style="color: #ff0033; font-weight: bold;">end</span> handle_string</pre></div></div>


<p>上記ソースをスクリプトエディタで作成して、~/Library/Application Support/LaunchBar/Actions/tinyURL.scpt へ保存します。</p>

<p>LaunchBarのインデックスを再構築して終了です。</p>

<p>使い方は、URLをコピーしてLaunchBarでtinyURLスクリプトを呼び出しスペースバーを押し下げテキストフィールドへURLをペーストしリターンキーを押し下げます。これでクリップボードへ短縮URLが格納されます。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.appling.jp/archives/1110/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SafariとWebKit Nightlyの設定ファイルを別々に</title>
		<link>http://blog.appling.jp/archives/1075</link>
		<comments>http://blog.appling.jp/archives/1075#comments</comments>
		<pubDate>Sat, 31 Jan 2009 09:54:36 +0000</pubDate>
		<dc:creator>Pafuxu</dc:creator>
				<category><![CDATA[Script]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://appling.sakura.ne.jp/wordpress/?p=1075</guid>
		<description><![CDATA[Safari と WebKit Nightly は同一の設定ファイルを読み込んで使用しています。この設定ファイルをアプリケーション別に管理する AppleScript が紹介されていました。


Daring Fireb [...]]]></description>
			<content:encoded><![CDATA[<p>Safari と WebKit Nightly は同一の設定ファイルを読み込んで使用しています。この設定ファイルをアプリケーション別に管理する AppleScript が紹介されていました。</p>

<ul>
<li><a href="http://daringfireball.net/2009/01/applescripts_targetting_safari_or_webkit" title="Daring Fireball: Writing AppleScripts That Dynamically Target Either Safari or WebKit">Daring Fireball: Writing AppleScripts That Dynamically Target Either Safari or WebKit</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.appling.jp/archives/1075/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
