<?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>脳みその中身 &#187; Howto</title>
	<atom:link href="http://bison.jp/category/howto/feed" rel="self" type="application/rss+xml" />
	<link>http://bison.jp</link>
	<description>Inside of My Brain</description>
	<lastBuildDate>Fri, 23 Mar 2012 08:46:55 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ScreenFlow で作ったそれっぽい動画 2</title>
		<link>http://bison.jp/macosx/958.html</link>
		<comments>http://bison.jp/macosx/958.html#comments</comments>
		<pubDate>Fri, 23 Mar 2012 08:43:11 +0000</pubDate>
		<dc:creator>bison</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Mac Software TIPS]]></category>
		<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://bison.jp/?p=958</guid>
		<description><![CDATA[ScreenFlow が面白いので、不必要なくらいグニグニさせた動画を作ってみました。 わからんやつなんてどこにもいないよーな、どーでもいー『Version の使い方』を説明した内容です。]]></description>
			<content:encoded><![CDATA[<p>ScreenFlow が面白いので、不必要なくらいグニグニさせた動画を作ってみました。</p>
<p>わからんやつなんてどこにもいないよーな、どーでもいー『Version の使い方』を説明した内容です。</p>
<p><object width="470" height="306"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.facebook.com/v/3517234847711" /><embed src="http://www.facebook.com/v/3517234847711" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="470" height="306"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://bison.jp/macosx/958.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ScreenFlow で作った「それっぽい動画」</title>
		<link>http://bison.jp/uncategorized/934.html</link>
		<comments>http://bison.jp/uncategorized/934.html#comments</comments>
		<pubDate>Fri, 23 Mar 2012 08:20:57 +0000</pubDate>
		<dc:creator>bison</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Mac Software TIPS]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[未分類]]></category>
		<category><![CDATA[ScreenFlow]]></category>

		<guid isPermaLink="false">http://bison.jp/?p=934</guid>
		<description><![CDATA[ScreenFlow は、今まで主に、インストラクションムービー(手順説明動画) などを作成するために使っていましたが、これって結構いろんなコトができることを再発見！ …ということで、 「ササミの筋取り」を説明した20秒 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.telestream.net/screen-flow/overview-m.htm">ScreenFlow</a> は、今まで主に、インストラクションムービー(手順説明動画) などを作成するために使っていましたが、これって結構いろんなコトができることを再発見！</p>
<p>…ということで、</p>
<blockquote><p>「ササミの筋取り」を説明した20秒ちょっとの動画を、懐かしい東芝のテレビで映しているように見える動画 (via ScreenFlow)</p></blockquote>
<p>を作ってみました。</p>
<h2>素材</h2>
<ul>
<li>自分で撮った『ササミの筋取り』の動画 (23秒程度)<br />
<object width="470" height="306"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.facebook.com/v/3517105844486" /><embed src="http://www.facebook.com/v/3517105844486" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="470" height="306"></embed></object></li>
<li>昔のテレビのスイッチ音 (ON / OFF)<br />
<a href="http://bison.jp/wp-content/uploads/2012/03/TurnOnTV.aiff"><img class="alignnone size-full wp-image-939" title="aiff" src="http://bison.jp/wp-content/uploads/2012/03/aiff.png" alt="" width="128" height="128" /></a><a href="http://bison.jp/wp-content/uploads/2012/03/TurnOffTV.aiff"><img title="aiff" src="http://bison.jp/wp-content/uploads/2012/03/aiff.png" alt="TurnOffTV.aiff" width="128" height="128" /></a></li>
<li>昔のテレビ(TOSHIBA製) の画像<br />
<img class="aligncenter size-large wp-image-935" title="OldTV_org" src="http://bison.jp/wp-content/uploads/2012/03/OldTV_org-1024x680.jpg" alt="" width="565" height="375" /></li>
</ul>
<h2>下ごしらえ</h2>
<p style="text-align: left;">昔のテレビ画像ファイルから、画面部分と画面を除いた部分にそれぞれpng形式で作成</p>
<p><a href="http://bison.jp/wp-content/uploads/2012/03/tvscreen.png"><img class="size-medium wp-image-936 aligncenter" title="tvscreen" src="http://bison.jp/wp-content/uploads/2012/03/tvscreen-300x228.png" alt="" width="300" height="228" /></a><a href="http://bison.jp/wp-content/uploads/2012/03/tvfflame.png"><img class="size-medium wp-image-937 aligncenter" title="tvfflame" src="http://bison.jp/wp-content/uploads/2012/03/tvfflame-300x199.png" alt="" width="300" height="199" /></a></p>
<p style="text-align: left;">ScreenFlow で編集</p>
<p style="text-align: left;"><a href="http://bison.jp/wp-content/uploads/2012/03/OldTV.png"><img class="aligncenter size-large wp-image-941" title="OldTV" src="http://bison.jp/wp-content/uploads/2012/03/OldTV-1024x770.png" alt="" width="565" height="424" /></a></p>
<h2 style="text-align: left;">完成動画</h2>
<p><object width="470" height="306"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.facebook.com/v/3516713554679" /><embed src="http://www.facebook.com/v/3516713554679" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="470" height="306"></embed></object></p>
<p>「ササミの筋取り」を説明した20秒ちょっとの動画を、懐かしい東芝のテレビで映しているように見える動画<br />
(via ScreenFlow)</p>
]]></content:encoded>
			<wfw:commentRss>http://bison.jp/uncategorized/934.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://bison.jp/wp-content/uploads/2012/03/TurnOffTV.aiff" length="215296" type="audio/x-aiff" />
<enclosure url="http://bison.jp/wp-content/uploads/2012/03/TurnOnTV.aiff" length="452088" type="audio/x-aiff" />
		</item>
		<item>
		<title>wkpdf &#8212; URLからPDFを作成</title>
		<link>http://bison.jp/macosx/923.html</link>
		<comments>http://bison.jp/macosx/923.html#comments</comments>
		<pubDate>Wed, 21 Mar 2012 06:56:56 +0000</pubDate>
		<dc:creator>bison</dc:creator>
				<category><![CDATA[FileMaker]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Mac Software TIPS]]></category>
		<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://bison.jp/?p=923</guid>
		<description><![CDATA[FileMakerのソリューションで、コマンドラインによって、指定のURLからPDFを作成…という機能を実装する要望があったため、wkpdfをインストールした。 wkpdf の特徴 HTMLレンダリングに WebKit  [...]]]></description>
			<content:encoded><![CDATA[<p>FileMakerのソリューションで、コマンドラインによって、指定のURLからPDFを作成…という機能を実装する要望があったため、<a href="http://plessl.github.com/wkpdf/">wkpdf</a>をインストールした。</p>
<h2>wkpdf の特徴</h2>
<ul>
<li>HTMLレンダリングに WebKit を使用</li>
<li>JavaScript も効くので、Safari の表示とほぼ近いレンダリング結果になる</li>
<li>&#8211;username &#8211;password オプションを指定することで、Basic認証などにも対応</li>
<li>当然、出力結果のPDFファイルは、画像ではないので、テキスト検索が効く</li>
<li>サムネイルとしては使いにくい<br />
<em>※ 画像ファイル形式での出力不可/サイズ指定切り出し不可</em></li>
</ul>
<h2>Install</h2>
<h3>MacRuby</h3>
<p>wkpdf は MacRuby を使用する。</p>
<ol>
<li><a href="http://www.macruby.org/downloads.html">MacRuby の公式ダウンロードページ</a>から、Latest Stable Release の standalone binary installer のパッケージをダウンロードする。<br />
<em>※  2012/03/21 現在、MacRuby 0.10</em></li>
<li>解凍してできるインストーラパッケージをダブルクリックして指示に従いインストールする。</li>
</ol>
<h3>wkpdf</h3>
<p>通常の gem を使ったインストール</p>
<blockquote><p>sudo gem update &#8211;system</p>
<p>sudo gem install wkpdf</p></blockquote>
<p>※ 当然、インストール後の Update も…</p>
<blockquote><p>gem update wkpdf</p></blockquote>
<p>で、OK。</p>
<h2>Usage</h2>
<h3>Basic Usage</h3>
<p>基本的には…</p>
<blockquote><p>wkpdf &#8211;source http://foo.com/ &#8211;output foo.pdf</p></blockquote>
<p>というように、&#8211;source オプションで、取得元URL を、&#8211;output オプションで、出力先PDF名を指定する。<br />
※ 出力先PDFパスと考えてOK</p>
<h3>Other Usage</h3>
<p>以下が、wkpdf &#8211;help の出力結果である。</p>
<blockquote><p>&#8211;output, -o &lt;s&gt;: Output PDF filename<br />
&#8211;source, -s &lt;s&gt;: URL or filename (supported protocols: http, https, ftp, file), if<br />
not present read from stdin (default: /dev/stdin)<br />
&#8211;paper, -p &lt;s&gt;: Paper size (folio | ledger | letterSmall | legal | a0 | a1 | a2 |<br />
statement | quarto | b4 | a3 | b5 | a4 | executive | letter | a5 |<br />
a4small | custom:WxH | 10&#215;14 | tabloid) (default: a4)<br />
&#8211;orientation, -r &lt;s&gt;: (landscape | portrait) (default: portrait)<br />
&#8211;hcenter, -c: Center horizontally (default: true)<br />
&#8211;vcenter, -e: Center vertically<br />
&#8211;paginate, -a: Enable pagination (default: true)<br />
&#8211;margins, -m &lt;i+&gt;: Paper margins in points (T R B L) (V H) or (M)<br />
&#8211;caching, -i: Load from cache if possible (default: true)<br />
&#8211;timeout, -t &lt;f&gt;: Set timeout to N seconds (default: 3600.0)<br />
&#8211;stylesheet-media, -y &lt;s&gt;: Set the CSS media value (default: screen)<br />
&#8211;user-stylesheet, -u &lt;s&gt;: URL or path of stylesheet to use<br />
&#8211;user-script &lt;s&gt;: URL or path of script to use<br />
&#8211;print-background, -n: Display background images<br />
&#8211;ignore-http-errors, -g: Generate PDF despite, e.g., a 404 error<br />
&#8211;username &lt;s&gt;: Authenticate with username<br />
&#8211;password, -w &lt;s&gt;: Authenticate with password<br />
&#8211;enable-plugins, -b: Enable plugins<br />
&#8211;enable-javascript, -l: Enable javascript (default: true)<br />
&#8211;save-delay &lt;f&gt;: Wait N seconds after loading to generate PDF (default: 0.0)<br />
&#8211;version, -v: Print the version and exit<br />
&#8211;help, -h: Show this message<br />
&#8211;debug, -d: Print debug output</p></blockquote>
<p>出力用紙サイズ (&#8211;paper) や用紙方向 (&#8211;orientation) 、ページネーション (&#8211;pagination) などの出力様式指定も一通り指定できるし、Basic認証の向こうのURL も対応するので、シンプルに必要最低限のことはできる。</p>
<h2>Notice</h2>
<p>URL中に、アンパサンドやクエスチョンが入る場合は、URL を シングル(or ダブル)クォーテーションで括ってやる必要がある。</p>
<p><em>※ もちろん、出力パスにスペースが入る場合なども同様。</em></p>
<p>URL中に、日本語が入っていると、その部分をUTF-8 URLエンコードしてやらないとエラーになる。</p>
<p><del><em>※ 対処策を勘案中 (2012/03/21 20:30:49)</em></del></p>
<h3>対処策 (2012/03/22 13:03:09)</h3>
<p>GetAsURLEncoded ( URL ) だと、スラッシュやコロンなどまでURLエンコードされてしまうので、「一文字ずつ改行区切りにして non-ASCII だけを…」とか<br />
あほみたいに考えていたけど、ほぼ以下の通りで解決。</p>
<p>&#8220;&#8216;&#8221; &amp; URLDecode ( GetAsURLEncoded ( URL ) ) &amp; &#8220;&#8216;&#8221;</p>
<p>カスタム関数 URLDecode は、<br />
<a href="http://www.briandunning.com/cf/528" rel="nofollow nofollow" target="_blank">http://<wbr>www.briandunning.com/cf/528</wbr></a></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Ruby 側に対処するという手法だと、</p>
<p><a href="http://d.hatena.ne.jp/haroperi/20110405/1301959688">Rubyで日本語を含むURLを扱う</a></p>
<p>な話なんだろね。<br />
これをやっちまうと、Updateされたときに上書きされちまうだろうし、変更箇所などの詳細を覚えておく自信もないし、今回は FileMaker 側で対処することに。</p>
]]></content:encoded>
			<wfw:commentRss>http://bison.jp/macosx/923.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfred Extensions (有料版のみ) の使い方</title>
		<link>http://bison.jp/macosx/891.html</link>
		<comments>http://bison.jp/macosx/891.html#comments</comments>
		<pubDate>Wed, 14 Mar 2012 07:52:25 +0000</pubDate>
		<dc:creator>bison</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Mac Software TIPS]]></category>
		<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://bison.jp/?p=891</guid>
		<description><![CDATA[アプリケーションランチャとして Alfred を使っている方は多いと思います。 そうした使い方だけなら、Free版の Alfred で充分ですが、有料の Power pack を購入することで、いくつかの機能が追加されま [...]]]></description>
			<content:encoded><![CDATA[<p>アプリケーションランチャとして Alfred を使っている方は多いと思います。</p>
<p><a href="http://www.alfredapp.com/"><img class="aligncenter size-full wp-image-892" title="Alfred" src="http://bison.jp/wp-content/uploads/2012/03/Alfred.png" alt="" width="500" height="335" /></a></p>
<p>そうした使い方だけなら、Free版の Alfred で充分ですが、有料の Power pack を購入することで、いくつかの機能が追加されます。</p>
<p><a href="http://www.alfredapp.com/powerpack/"><img class="aligncenter size-full wp-image-893" title="Powerpack" src="http://bison.jp/wp-content/uploads/2012/03/Powerpack.png" alt="" width="500" height="216" /></a></p>
<p>使い出すと手放せない Power pack の機能は、File System Navigation と</p>
<p><img class="aligncenter size-full wp-image-894" title="Powerpack_FileSystemNavigation" src="http://bison.jp/wp-content/uploads/2012/03/Powerpack_FileSystemNavigation.png" alt="" width="471" height="440" /></p>
<p>今回取り上げる Extensions and Custom Commands です。</p>
<p><img class="aligncenter size-full wp-image-895" title="Powerpack_Extensions_and_Custom_Commands" src="http://bison.jp/wp-content/uploads/2012/03/Powerpack_Extensions_and_Custom_Commands.png" alt="" width="468" height="460" /></p>
<p>今回は、例として、アプリケーションをアンインストールするアプリケーション AppCleaner に、アンインストールしたいアプリケーションを渡す方法を説明します。</p>
<h2>AppCleaner</h2>
<p>まずは、AppCleaner 。Free (無料) です。</p>
<p><a href="http://www.freemacsoft.net/appcleaner/"><img class="aligncenter size-full wp-image-896" title="AppCleaner" src="http://bison.jp/wp-content/uploads/2012/03/AppCleaner.png" alt="" width="500" height="328" /></a></p>
<p>アンインストールしたいアプリケーションを指定 (Drag &amp; Drop でも可) すると、当該アプリケーションの利用している plistファイルや、Applications Support 内ファイルなどの関連ファイルを探してきて、一緒に捨ててくれます。<br />
※ Undo機能やアーカイブ機能がないのが残念ですが、充分使えるアプリです。</p>
<h2> AppCleaner action (Download &amp; Install)</h2>
<p>サードパーティー (というかこの方は個人だと思われますが) の AiYo さんのサイトに 自作の Alfred Extensions がリストされています。</p>
<p style="text-align: center;"><a href="http://www.aiyo.dk/alfredapp/"><img class="aligncenter size-full wp-image-897" title="AiYo Alfred Extensions" src="http://bison.jp/wp-content/uploads/2012/03/2.png" alt="" width="500" height="221" /></a></p>
<p>ここにある <img class="aligncenter size-full wp-image-898" title="AppCleaner actions" src="http://bison.jp/wp-content/uploads/2012/03/3.png" alt="" width="500" height="187" /></p>
<p>をダウンロードします。</p>
<p><a href="http://bison.jp/wp-content/uploads/2012/03/AppCleaner.alfredxtension.png"><img class="alignleft size-thumbnail wp-image-901" title="AppCleaner.alfredxtension" src="http://bison.jp/wp-content/uploads/2012/03/AppCleaner.alfredxtension-150x131.png" alt="" width="150" height="131" /></a></p>
<p>ダウンロードしたファイル AppCleaner.alfredextension をダブルクリックすることで、Alfred が以下のようなウィンドウを表示します。</p>
<p>そのままで、大丈夫です。<br />
ここでは、特に修正は必要ありません。</p>
<p><img class="aligncenter size-full wp-image-902" title="Alfred Preferences" src="http://bison.jp/wp-content/uploads/2012/03/Alfred-Preferences.png" alt="" width="500" height="378" /></p>
<h2>File Search Filter (Create &amp; Setting)</h2>
<p><img class="alignleft size-full wp-image-903" title="Create File Search Filter" src="http://bison.jp/wp-content/uploads/2012/03/Create-File-Search-Filter.png" alt="" width="191" height="149" /></p>
<p>次に、左下の＋マークから、File Search Filter を作ります。</p>
<p>すると、以下のような、ダイアログが現れます。</p>
<p><img class="aligncenter size-full wp-image-904" style="color: #444444; font-family: Georgia, 'Bitstream Charter', serif; line-height: 1.5; border-style: initial; border-color: initial; display: block; margin-left: auto; margin-right: auto; border-width: 0px;" title="FilterExtension" src="http://bison.jp/wp-content/uploads/2012/03/FilterExtension.png" alt="" width="514" height="269" /></p>
<p>Extension Name に、Uninstall と入力し、<br />
あとは適当に入力してください。ｗ</p>
<p>せっかくなので、アイコンも AppCleaner のものにしてみましょうか。</p>
<p>Alfred のウィンドウを開いて ( Defaultでは、Option+スペース ) 、appcl あたりまで入力すると、一番上に AppCleaner.app が来ると思います。</p>
<p><img class="aligncenter size-full wp-image-907" title="Alfred 2" src="http://bison.jp/wp-content/uploads/2012/03/Alfred-22.png" alt="" width="500" height="128" /></p>
<p>ここで、右矢印キー (→) を押して、info と入力してください。</p>
<div>
<p><img class="aligncenter size-full wp-image-908" title="Alfred 3" src="http://bison.jp/wp-content/uploads/2012/03/Alfred-3.png" alt="" width="500" height="308" /></p>
<p>そしてそのまま、⏎キーを押します<br />
<em style="color: #444444; font-family: Georgia, 'Bitstream Charter', serif; line-height: 1.5; border-width: initial; border-color: initial; font-style: italic; border-style: none;">※ これは、Power pack の File System Navigation とResult Actions という機能です。</em></p>
<p><img class="alignleft size-full wp-image-909" title="AppCleaner Infomation" src="http://bison.jp/wp-content/uploads/2012/03/AppCleaner-Infomation.png" alt="" width="136" height="73" />AppCleaner の情報ウィンドウが表示されます。<br />
このウィンドウの左上の小さなアイコンを選択して、⌘+C でコピーします。</p>
<p>そして、先ほどの、Extension 作成のウィンドウの虫眼鏡マークをクリックし、⌘+V でペーストします。</p>
<p><img class="aligncenter size-full wp-image-910" title="Alfred 4" src="http://bison.jp/wp-content/uploads/2012/03/Alfred-4.png" alt="" width="500" height="261" /></p>
<p>Create ボタンをクリックすると、このフィルタの設定画面になりますので、上半分は、以下の図のように、入力してください。</p>
<p><img class="aligncenter size-full wp-image-911" title="Alfred Preferences 2" src="http://bison.jp/wp-content/uploads/2012/03/Alfred-Preferences-1.png" alt="" width="500" height="190" /></p>
<p>その下の <strong>File Types:</strong> では右下の＋ボタンをクリックして現れるファイル選択ダイアログを表示させます。<br />
このダイアログは、<strong>「どんなタイプのファイルが AppCleaner に渡されるべきなのか？」</strong>ということを指定するものなので、アプリケーションフォルダに移動して、任意のApplication のファイル (*.app) を選択します。</p>
<p>これで、File Types には、<strong>application/com.apple.application-bundle</strong> というエントリが入ったはずです。</p>
<p><img class="aligncenter size-full wp-image-912" title="Alfred Preferences File Type" src="http://bison.jp/wp-content/uploads/2012/03/Alfred-Preferences-2.png" alt="" width="500" height="146" /></p>
<p>その下の <strong>Scope:</strong> は、<strong>「どこを探せばいいの？」</strong>ということなので、<br />
Browseボタンを押して現れるフォルダ選択ダイアログで、アプリケーションフォルダを指定します。</p>
<p>最終的には以下のようになっているはずなので、Save ボタンで保存します。</p>
<p><a href="http://bison.jp/wp-content/uploads/2012/03/Alfred-Extensions-Filter-setting1.png"><img class="aligncenter size-full wp-image-914" title="Alfred Extensions Filter setting" src="http://bison.jp/wp-content/uploads/2012/03/Alfred-Extensions-Filter-setting1.png" alt="" width="499" height="425" /></a> 以上で設定はおしまいです。</p>
<h2>How to Use</h2>
<p>さて、使ってみましょう。</p>
<p><strong>Alfred ウィンドウを表示します。</strong>( Defaultでは、Option+スペース )</p>
<p><strong>uninstall に続けて、スペース (あるいは、⏎ ) を押してから、アンインストールしたいアプリケーションの名前を何文字か打ちます。<br />
</strong>※ インクリメントサーチされます。</p>
<p><strong>目的のアプリケーションが一番上に来たら、⏎</strong>。</p>
<p><em>※ 以下の図は、Numbers.app をアンインストールしたい場合の例です。</em></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-915" title="Numbers.app をアンインストールする場合" src="http://bison.jp/wp-content/uploads/2012/03/try1.png" alt="" width="500" height="130" /></p>
<p style="text-align: left;">自動的に、AppCleaner.app が立ち上がって、今、指定したアプリケーションが、アンインストールの対象に渡されています。</p>
<p><img class="aligncenter size-full wp-image-917" title="Numbers.app をアンインストールする場合 2" src="http://bison.jp/wp-content/uploads/2012/03/Try2-1.png" alt="" width="499" height="369" /></p>
<p>あとは、削除されるファイルをよく確認して、ほかで使われているかもしれないファイルのチェックを外して、 削除ボタンをクリックすると、リストされたファイル のうちチェックマークのあるものすべてがゴミ箱に入ります。</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://bison.jp/macosx/891.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac で様々な動画を見たいときにはこのあたりのCodec入れとけ！</title>
		<link>http://bison.jp/macosx/872.html</link>
		<comments>http://bison.jp/macosx/872.html#comments</comments>
		<pubDate>Tue, 28 Feb 2012 07:02:32 +0000</pubDate>
		<dc:creator>bison</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Mac Software TIPS]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[Codec]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[動画再生]]></category>

		<guid isPermaLink="false">http://bison.jp/?p=872</guid>
		<description><![CDATA[標準で QuickTime が対応するコーデックは、Internet上の動画の半分も対応できていません。 もちろん、「この動画プレイヤーアプリケーションでは再生できる」というケースはありますが「Codec に合わせて、再 [...]]]></description>
			<content:encoded><![CDATA[<p>標準で QuickTime が対応するコーデックは、Internet上の動画の半分も対応できていません。</p>
<p>もちろん、「この動画プレイヤーアプリケーションでは再生できる」というケースはありますが「Codec に合わせて、再生するプレイヤーを変える」というのは、あまりスマートではありませんし、できるかぎり、「これを入れておけば」Mac全体として (QuickTime Player でも、QuickTime に依存するアプリケーション上 でも…) 動画再生が可能になるように QuickTime Component の形が望まれるわけです。</p>
<p>ということで、拙ブログ『脳みその中身』でも何度か Mac で使える 動画再生用の QuickTimeコンポーネント について取り上げてきました。</p>
<p>現段階での動画再生用 無料 Codecまとめ的なものは以下の四つです。</p>
<p>それぞれ、Libraryフォルダ下QuickTimeフォルダ( /Library/QuickTime or  ~/Library/QuickTime ) に QuickTimeコンポーネントを入れたり、Applications フォルダ ( /Applications )にアプリを入れたり、Internetプラグインフォルダ (/Library/Internet Plug-Ins )をプラグインを入れたりします。</p>
<p>=====================================</p>
<p><a href="http://perian.org/">Perian</a></p>
<p>[File formats]</p>
<p>AVI<br />
DIVX<br />
FLV<br />
MKV<br />
GVI<br />
VP<br />
VFW</p>
<p>[Video types]</p>
<p>MS-MPEG4 v1 &amp; v2<br />
DivX<br />
3ivx<br />
H.264,<br />
Sorenson H.263<br />
FLV/Sorenson Spark<br />
FSV1<br />
VP6<br />
H263i<br />
VP3<br />
HuffYUV<br />
FFVHuff<br />
MPEG1 &amp; MPEG2 Video<br />
Fraps<br />
Snow<br />
NuppelVideo<br />
Techsmith Screen Capture<br />
DosBox Capture</p>
<p>[Audio types]</p>
<p>Windows Media Audio v1 &amp; v2, Flash ADPCM, Xiph Vorbis (in Matroska), and MPEG Layer I &amp; II Audio, True Audio, DTS Coherent Acoustics, Nellymoser ASAO</p>
<p>AVI support for AAC, AC3 Audio, H.264, MPEG4, VBR MP3 and more</p>
<p>Subtitle support for SSA/ASS, SRT, SAMI</p>
<p>=====================================</p>
<p><a href="http://windows.microsoft.com/en-US/windows/products/windows-media-player/wmcomponents">Flip4Mac</a><br />
※ Flip4Mac で検索して Telestream のサイトからダウンロードしようとして、有料版をクリックしてしまうケースが散見します。<br />
※ 再生するだけなら無料版 でOKですので、上記リンク(MicroSoftのサイト)からどうぞ。</p>
<p>[Supported audio codecs]</p>
<p>Windows Media Audio 9<br />
Windows Media Audio 9 Professional<br />
Windows Media Audio 9 Lossless<br />
ISO MPEG Layer 3 (MP3)<br />
Microsoft G.726<br />
Microsoft IMA ADPCM<br />
Microsoft G.711 aLaw<br />
Microsoft G.711 uLaw<br />
Microsoft ADPCM</p>
<p>[Supported video codecs]</p>
<p>Windows Media Video 9<br />
Windows Media Video 9 Advanced (VC-1)<br />
Windows Media Video 8<br />
Windows Media Video 7<br />
ISO MPEG-4, versions 1.0 and 1.1<br />
Microsoft MPEG-4, versions 2 and 3<br />
Microsoft Motion JPEG</p>
<p>[File formats]</p>
<p>Advanced Systems Format (ASF)<br />
Advanced Stream Redirector (ASX)<br />
Audio Video Interleaved (AVI)</p>
<p>[Network protocols]</p>
<p>MMS Real-Time Streaming Protocol (RTSP)<br />
MMS HTTP<br />
HTTP<br />
FTP</p>
<p>=====================================</p>
<p><a href="http://www.microsoft.com/ja-jp/silverlight/download.aspx">Silverlight</a></p>
<p>Microsoft 開発の Webブラウザプラグイン<br />
Windows 限定のサイトなどで、近年、Silverlight を採用して、Macでも動画再生可能なコンテンツに切り替えるところが出てきている。(Gyao など)<br />
※ 思うに…同じ Microsoft の WMV から Silverlight への変更は、 比較的無理なく移行できるのでは無かろうか…と勝手に思ってる。ｗ</p>
<p>=====================================</p>
<p><a href="http://www.xiph.org/quicktime/download.html">Xiph QuickTime Component</a></p>
<p>オープン且つパテントフリーなoog 系コンテナを策定している ザイフォ財団 (Xiph.Org Foundation) の QuickTime コンポーネント。<br />
音声フォーマット (Codec) Vorbis / FLAC / Speex<br />
動画フォーマット (Codec) Theora<br />
などを扱えるようになる。</p>
<p>インストール方法：当該Macのユーザ全員で使う場合 /Library/QuickTime/ に、当該ユーザのみで使う場合 ~/Library/QuickTime/ に、インストーラ dmg  を開いて表れる QuickTimeコンポーネント を入れるだけ。</p>
<p>=====================================<br />
以前に、『脳みその中身』内で、動画再生Codec の QuickTime コンポーネント 関係について書いたエントリは ↓</p>
<h1><a title="Permalink to Mac 用 Codec サマリー" href="http://bison.jp/macosx/214.html" rel="bookmark">Mac 用 Codec サマリー</a></h1>
<h1><a title="Permalink to Perian – Mac OS X 用 超便利Codec" href="http://bison.jp/macosx/185.html" rel="bookmark">Perian – Mac OS X 用 超便利Codec</a></h1>
<h1><a title="Permalink to 動画再生用 CODEC Mac OS X 向け" href="http://bison.jp/macosx/172.html" rel="bookmark">動画再生用 CODEC Mac OS X 向け</a></h1>
<h1><a title="Permalink to Windows Media Player での MPEG2 Codec" href="http://bison.jp/business/157.html" rel="bookmark">Windows Media Player での MPEG2 Codec</a></h1>
]]></content:encoded>
			<wfw:commentRss>http://bison.jp/macosx/872.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dropbox のベータ版で4.5GB分の無料スペース獲得方法 (期間限定)</title>
		<link>http://bison.jp/cloud/863.html</link>
		<comments>http://bison.jp/cloud/863.html#comments</comments>
		<pubDate>Wed, 22 Feb 2012 07:06:39 +0000</pubDate>
		<dc:creator>bison</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[クラウド]]></category>
		<category><![CDATA[Dropbox]]></category>

		<guid isPermaLink="false">http://bison.jp/?p=863</guid>
		<description><![CDATA[Dropboxに「iPhone ( or Android携帯 or デジカメ or デジカメで使用しているSDカードなどのメモリカード ) などを Mac/PC にUSBで接続したら、自動的に、カメラロール内の写真や動画 [...]]]></description>
			<content:encoded><![CDATA[<p>Dropboxに「iPhone ( or Android携帯 or デジカメ or デジカメで使用しているSDカードなどのメモリカード ) などを Mac/<wbr>PC にUSBで接続したら、自動的に、カメラロール内の写真や動画が、Drop<wbr>box/Camera Uploads フォルダに取り込まれて、Dropboxサーバに U/L されるという機能」が、ベータ版 (1.3.x) から追加されました。</wbr></wbr></p>
<p>この機能のフィードバックを得るために、現在、下記URLから取<wbr>得できる Dropbox の Forumバージョン(ベータ版) をインストールして、上記機能を使うことで、2012/02/22 現在、無料のスペースが、<del>4.5 5</del>  5 GB までを上限に獲<wbr>得できるというキャンペーンが行われています。<br />
<a href="http://forums.dropbox.com/topic.php?id=54396" rel="nofollow nofollow" target="_blank">http://forums.dropbox.com/<wbr>topic.php?id=54396</wbr></a></wbr></wbr></p>
<p>このキャンペーンで、一旦取得した領域は、permanentl<wbr>y だそうです。<br />
ただし、500MB ごとに、増加分合計 <del>4.5 5</del>  5 GB までということなので、<br />
4GBを越えるクソデカイ動画で一挙に…というわけにはいきませ<wbr>んでした。<br />
500MB 程度の動画をiPhoneで撮影しちゃー 同期するのを繰り返すことになります。</wbr></wbr></p>
<p>段取りとしては…</p>
<p>1. ベータ版をインストール (もちろん上書き)<br />
※ Dropbox &gt; 設定&#8230; のネットワークタブから、アップロード速度を無制限にしておくこ<wbr>とをお勧めします。</wbr></p>
<p>2. iPhone で、どーでもいー動画を撮る<br />
(3分程 450MB程度のものでOK)</p>
<p>3. iPhoto だの イメージキャプチャだのが自動で立ち上がる機能は切っておいた方<wbr>が楽でしょう。もちろん、そのたびに「今は忙しいんだっつーの。<wbr>お呼びでないの！」と終了させてもかまいません。</wbr></wbr></p>
<p>4. Mac/PC に繋ぐ<br />
(最初だけ、「例の自動フォトアップデート機能を使うかい？」と<wbr>聞かれるので、「おおともさ！」と了解してあげてください)</wbr></p>
<p>5. iPhone → PC/Mac → Dropboxサーバ と「どーでもいー動画」が U/L されるのをひたすら待ちます。</p>
<p><a href="http://bison.jp/wp-content/uploads/2012/02/aeca6fb87238a15a3efdc99719c563a8.png"><img class="aligncenter size-full wp-image-864" title="スクリーンショット 2012-02-22 13.29.06" src="http://bison.jp/wp-content/uploads/2012/02/aeca6fb87238a15a3efdc99719c563a8.png" alt="" width="328" height="89" /></a><a href="http://bison.jp/wp-content/uploads/2012/02/570e6e67307ae7271ebd7981dcb09b04.png"><img class="aligncenter size-full wp-image-865" title="スクリーンショット 2012-02-22 13.29.14" src="http://bison.jp/wp-content/uploads/2012/02/570e6e67307ae7271ebd7981dcb09b04.png" alt="" width="622" height="258" /></a></p>
<p>6. Dropbox フォルダ内の &#8220;Camera Uploads&#8221;フォルダに「どーでもいー動画」がコピーされた<wbr>ら、USBケーブルを外して、iPhone のカメラロールを空にして (空にしなくても、一度読み込まれた動画ファイルは、Dropb<wbr>oxがそれと認識しますけど、精神衛生上ね…)、別の「どーでも<wbr>いー動画」を3分撮影します。</wbr></wbr></wbr></p>
<p>7. Dropboxサーバへの同期 (U/<wbr>L) が終了したら(Dropbox アイコンがチェックマークになったら)、上記手順4から繰り返します。</wbr></p>
<p>数回繰り返したら、Dropbox の Webサイトへ行って、イベントタブで、ちゃんと容量が増えてい<wbr>るかを確認して悦にいりましょう。</wbr></p>
<p>「記憶容量が xx.xxGB に増加しました」<br />
というイベントが何度か追加されているはずです。</p>
<p>蛇足：まだ Dropbox を使っていないという方は、是非この機会に、使ってみましょう！<wbr>通常の無料スペースは 2GB ですが、この方法 (多分ベータがはずれるまでの期間限定) で始めれば、2GB + 5GBで、7GB 使えます！</wbr></p>
<p>蛇足２：<span style="color: #ff0000;">まだ Dropbox を使っていない方は、上記段取りの前に、</span><br />
<a href="http://db.tt/6D46GE6" rel="nofollow nofollow" target="_blank">http://db.tt/6D46GE6</a><br />
<span style="color: #ff0000;">↑から、Dropbox の無料登録を行ってください！</span><br />
<span style="color: #ff0000;">(+250MB の追加スペースが付加されます)</span><br />
僕も喜びます！(爆)</p>
]]></content:encoded>
			<wfw:commentRss>http://bison.jp/cloud/863.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FileMaker で Google Apps (Gmail) の PermanentLink を取得するカスタム関数</title>
		<link>http://bison.jp/cloud/796.html</link>
		<comments>http://bison.jp/cloud/796.html#comments</comments>
		<pubDate>Tue, 15 Feb 2011 08:20:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[FileMaker]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[クラウド]]></category>

		<guid isPermaLink="false">http://bison.jp/?p=796</guid>
		<description><![CDATA[自分用に、Google Apps の個々のメールの PermanentLink を取得する FileMaker の カスタム関数を作りました。 理屈は、別記事：Google Apps (Gmail) で Permanen [...]]]></description>
			<content:encoded><![CDATA[<p>自分用に、Google Apps の個々のメールの PermanentLink を取得する FileMaker の カスタム関数を作りました。</p>
<p>理屈は、別記事：<a href = "http://bison.jp/cloud/791.html">Google Apps (Gmail) で PermanentLink を取得する方法</a> の通りです。</p>
<pre>____________________
GetGmailURL ( webviewerObjectName ; shvaOption )
____________________

// Created: 2011/02/15
// by bison
//
// Parameter:
// 　webviewerObjectName : Webビューアのオブジェクト名
// 　shvaOption : 0 の場合 shvaパラメータを省略します。
// 　　1 もしくは 空値 ( "" ) の場合は ?shva=1 を付けます。
// Explanation:
// 　GMail (Google Apps) の個別メッセージURLの場合、
// 　個々のメッセージのパーマネントURL を返します。
// 　それ以外の場合、当該Webビューアで表示中のURLを返します。
/////////////////
Let (
[
$myurl = GetLayoutObjectAttribute ( webviewerObjectName ; "source" ) ;
$gmailJudgeText = "https://mail.google.com/mail/" ;
$startPos = Length ( $gmailJudgeText ) ;
$gmailFlag = Left ( $myurl ; $startPos ) = $gmailJudgeText ;
$spos = Position ( $myurl ; "/" ; 1 ; PatternCount ( $myurl ; "/" ) ) // Position of last slash
] ;

Case ( $gmailFlag ;
	Replace ( $myurl ; $startPos ; $spos - $startPos ;
	Case ( shvaOption = 0 or IsEmpty ( shvaOption ) ; "/#all" ;
	"/?shva=1/#all" ) )
	; $myurl ) // Case
)

____________________</pre>
<p>※ shvaOption については、<br />
<a href="http://googlesystem.blogspot.com/2010/07/gmails-shva-parameter.html">Gmail&#8217;s SHVA Parameter</a><br />
<a href = "http://my.opera.com/japanese/forums/topic.dml?id=277753">Gmailで日本語を検索した際の不具合</a><br />
あたりを参照してください。</p>
]]></content:encoded>
			<wfw:commentRss>http://bison.jp/cloud/796.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Apps (Gmail) で PermanentLink を取得する方法</title>
		<link>http://bison.jp/cloud/791.html</link>
		<comments>http://bison.jp/cloud/791.html#comments</comments>
		<pubDate>Tue, 15 Feb 2011 08:18:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[クラウド]]></category>

		<guid isPermaLink="false">http://bison.jp/?p=791</guid>
		<description><![CDATA[Google Apps や Gmail で個々のメッセージを表示しているときの URL の一部は、状況に応じて変化します。 受信箱にあるメッセージの場合 &#8212; #inbox ラベル経由の場合 &#8212; # [...]]]></description>
			<content:encoded><![CDATA[<p>Google Apps や Gmail で個々のメッセージを表示しているときの URL の一部は、状況に応じて変化します。</p>
<p>受信箱にあるメッセージの場合 &#8212; #inbox<br />
ラベル経由の場合 &#8212; #label<br />
検索の結果経由の場合 &#8212; #search<br />
など&#8230;</p>
<p>とは言え、受信箱内のメールをアーカイブした場合も、 受信箱にあったときと同じ URL で当該メールは表示されるようになっている<strong>はず</strong>です。<br />
<em>( 僕の記憶があっていれば、以前は、アーカイブされたメールは、受信箱にあったときの URL では表示できなかったと思いますが、いつからか、仕様が変わったようです ) </em></p>
<p>「なっている<strong>はず</strong>」なのですが…</p>
<p>メールによっては、<strong>状況が変わる前の URL では、表示されない場合があります</strong>。</p>
<p>そういう場合、<span style="color: #0000ff;"><strong>#inbox や #label/[labelname] や#search/[検索語] などを #all に置き換えてやれば表示されます。</strong></span></p>
<p>例）<br />
受信箱にある<br />
https://mail.google.com/mail/<span style="color: #ff0000;">#inbox</span>/12e274e35ad122f5<br />
のメールに、_Business というラベルを付加して、アーカイブすると、</p>
<p>https://mail.google.com/mail/<span style="color: #ff0000;">#label/_Business</span>/12e274e35ad122f5<br />
https://mail.google.com/mail/<span style="color: #ff0000;">#inbox</span>/12e274e35ad122f5</p>
<p>のどちらでも表示されるはずだが、後者では、表示されない場合がある。<br />
<em>( すでに inbox に存在しないわけだから、表示されない方が自然な感じを受けますが ) </em></p>
<p>これでは、ラベルを付けたり外したり、アーカイブしたりすると、リンクが切れる場合があるという話になってしまう。</p>
<p>そこで…<br />
https://mail.google.com/mail/<span style="color: #0000ff;">#all</span>/12e274e35ad122f5<br />
というように、当該部分を <strong>#all</strong> にしてしまえば、パーマネントリンクになる…ということのようです。</p>
]]></content:encoded>
			<wfw:commentRss>http://bison.jp/cloud/791.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FileMaker Dictionary 関数</title>
		<link>http://bison.jp/filemaker/715.html</link>
		<comments>http://bison.jp/filemaker/715.html#comments</comments>
		<pubDate>Tue, 21 Dec 2010 09:33:30 +0000</pubDate>
		<dc:creator>bison</dc:creator>
				<category><![CDATA[FileMaker]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://bison.jp/?p=715</guid>
		<description><![CDATA[FileMaker Dictionary Functions 以下の blockquote部分は上記出典ページの段落、直後の日本語は内容の拙訳です。 拙訳への具体的な「ちげーよバカ！」な突っ込みは大歓迎です。 ※ 万一の [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sixfriedrice.com/wp/filemaker-dictionary-functions/">FileMaker Dictionary Functions</a><br />
以下の blockquote部分は上記出典ページの段落、直後の日本語は内容の拙訳です。<br />
拙訳への具体的な「ちげーよバカ！」な突っ込みは大歓迎です。<br />
※ 万一のトラブルは、出典サイトはもちろん、(たとえそれが僕の拙訳のせいだとしても) 一切関知しませんのであしからず。</p>
<p>素晴らしいカスタム関数を発表してくれた sixfriedrice.com の Jesse Antunes / Geoff Coffey に感謝します。</p>
<hr />
<blockquote><p>Since many people were impressed with my named parameters article, I decided to write up another post about the dictionary functions. Actually in all fairness I think three people actually liked it. Vincenzo Menanno, Chris Wack and Sam Barnum this post’s for you!</p></blockquote>
<p>&#8220;named parameters (名前付きパラメータ)&#8221; 記事 への皆さんの食いつきがなかなかにすばらしいので、&#8221;the Dictionary functions&#8221; についての別の post を書くことにしました。<br />
まあ、公平にみて、3人の人たちがこれを気に入ってくれると考えています。<br />
Vincenzo Menanno, Chris Wack and Sam Barnum この post は君たち向けです！</p>
<blockquote><p>Note: This article was revised November 23, 2007. I added the handy<a style="color: #d0155a; text-decoration: underline; outline-style: none; outline-width: initial; outline-color: initial; background-color: transparent;" href="http://sixfriedrice.com/wp/filemaker-dictionary-functions/#replace"><strong><code style="overflow-x: auto; overflow-y: auto;">DictReplace</code></strong></a> function. -Geoff</p></blockquote>
<p>Note: この記事は、2007/11/23 に改訂しました。<br />
重宝な DictReplace 関数を付け足しました。 &#8211; Geoff</p>
<blockquote><p>First I must warn you, I have left the names of the custom functions the same as the functions we use internally. This means they may seem a little obtuse so feel free to change them. I’m also not getting to in-depth into how they actually work because it could take an extra 5 pages or so (yea I know Geoff… I’m lazy… deal with it). I’m sure most of you will get them pretty quickly despite my inept explanations. Oh yea, I also suggest going back and reading the named parameters post before getting into this post otherwise it probably won’t make much sense.</p>
<p>Enjoy…</p></blockquote>
<p>まず、最初の注意として…<br />
内部的に使っているカスタム関数の名前はそのまま残しました。<br />
ちょこっとダサイかも知れませんので、自由に変更してください。<br />
それに、どのように振る舞うかの詳細についてまでは触れていません。<br />
そこまでやると、簡単にもう5ページくらいかかってしまうので…はいはい面倒くさがりでごめんね。<br />
ほとんどの方は、私のダサダサな説明などいらないくらいにサクっとおわかりになるでしょうし。<br />
そうそう、 以前に post した &#8220;named parameters&#8221; の記事についても読んでいただいておいた方がよろしいでしょう。<br />
じゃないと、あんまわからない話になってしまうかも。</p>
<p>楽しんでください&#8230;</p>
<blockquote><p>Note: For the duration of this article I will refer to the custom function<strong><code style="overflow-x: auto; overflow-y: auto;">PassParameter( name ; value )</code></strong> in my previous post as #( ). This saves me 12 key strokes and won’t confuse me because that’s what I call it internally.</p></blockquote>
<p>Note; 以前 “PassParameter ( name ; value )” として紹介したカスタム関数を#( )としています。こいつのおかげで、12キーストローク楽になりましたし、関数の内部で使っているので別に自分は混乱しないです。<em>( bison 注：2011/02/12 21:09:18 修正しますた。by 今泉さんのありがたいツッコミ)</em></p>
<h2>Using a Dictionary in the Script Result</h2>
<h2>スクリプト結果で、Dictionary を使う</h2>
<blockquote><p>I actually posted this in the comments of the Named Parameters post. The idea here is that you can not only use the named parameter idea in your script parameters but in your script results as well. So just place your dictionary values in the script result dialog of the Exit Script script step and you’ve go yourself named script results. I like to create a little shortcut to access them like so:</p></blockquote>
<p>さて、これについては、&#8221;Named Parameters&#8221; の記事のコメントで post しました。<br />
このアイデアがここで意味するものは…<br />
named parameter のアイデアは、スクリプトパラメータだけでなく、スクリプト結果でも同様に使えるんだよ…ということです。<br />
ですから、スクリプト終了のスクリプトステップの スクリプト結果のダイアログに、あなたの dictionary の値を置いたものをスクリプト結果と名付けて処理を進めれるわけです。<br />
私は、以下のようなちょっとしたショートカットを作るのが好きです;</p>
<p><strong>Name: #R ( name )</strong></p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>Definition:

DictGet ( Get (ScriptResult) ; name )
</code></pre>
<h2>Checking for a Name in the Dictionary</h2>
<h2>Dictionary の中の名前をチェックする</h2>
<blockquote><p>There’s also a point where you may want to check if your dictionary contains a certain value. You could do this by simple using your DictGet() custom function on your Dict. By design, a call to the DictGet() will return empty if the name you are looking for isn’t there. That’s when I made DictContains?</p></blockquote>
<p>また、「特定の値が あなたの dictionary の中に含まれているかどうか」をチェックしたいときもあるでしょう。<br />
これは、シンプルに あなたの Dect について、DictGet ( ) カスタム関数を使うことで可能です。仕組みとして、あなたが探しているものがそこに無ければ、DictGet ( ) をコールすると、空値が返ります。<br />
それで、DictContains? を作ったのです。</p>
<p><strong>Name: DictContains? ( dict, name )</strong></p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>Definition
Let (
 pattern = "&lt;:" &amp; name &amp; ":=";  Position(dict; pattern; 1; 1) &gt; 0
)
</code></pre>
<blockquote><p>All this is doing is checking the dictionary structure for the name of the value you are looking for and returning true if it finds the value and false if it doesn’t.</p></blockquote>
<p>これが行うことのすべては、あなたが探している値の名前で、dictionary 構造 をチェックして、存在すれば true を返し、存在しなければ false を返すということです。</p>
<blockquote><p>Note: This will not find any nested dictionary values. So if you were to store a dictionary within a dictionary ie. #( “Account” ; #( “Name” ; “Jesse” ) &amp; #( “Job” ; “Writing confusing custom functions” ) ) you wouldn’t be able to use the <code style="overflow-x: auto; overflow-y: auto;">DictContains?</code> custom function to see if <code style="overflow-x: auto; overflow-y: auto;">Job</code> is in the dictionary because it is inside the account dictionary.</p></blockquote>
<p>Note: 入れ子になった distionary の値は見つけられません。<br />
ですから譬えば…<br />
#( “Account” ; #( “Name” ; “Jesse” ) &amp; #( “Job” ; “Writing confusing custom functions” ) )<br />
といった dictrionary において、&#8221;Job&#8221; が dictionary にあるかどうかをチェックするのに<br />
DictContains? を使うことはできません。<br />
なぜなら、&#8221;Job&#8221; は、Account dictionary の内部に存在するからです。</p>
<h2>Removing an Entry from a Dictionary</h2>
<h2>Dictionary から エントリを削除する</h2>
<blockquote><p>You never know when, but there will be a point where you think… “Man, I wish I could remove a value from my dictionary.” Well, maybe you won’t… but I wrote this thing anyway. If you happen to bump into this situation, you can use the nifty function below. DictRemove() simply removes the dictionary name/value pair specified from the dictionary passed in.</p></blockquote>
<p>いつとは言えませんが、こう考えることもあるでしょう。<br />
「なあ、オイラの dictionary の中から値を削除したいんだけど…」<br />
…まあ、ないかもしれませんが…とにかくそれについて書きました。<br />
もし、ばったり、そんな状況に出くわしたなら、下記の気の利いた関数を使うことができます。<br />
DictRemove ( ) は、特定の name/value のペアを、受け渡された dictionary からシンプルに削除します。</p>
<p><strong>Name: DictRemove ( dict , name )</strong></p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>Definition:

Let(
[
 pattern = "&lt;:" &amp; name &amp; ":=";  entry_start = Position( dict ; pattern ; 1 ; 1);  entry_end = Position( dict ; ":&gt;" ; entry_start + 1; 1);
 dict_beginning = If( entry_start &gt; 0 ; Left ( dict ; entry_start - 1 ) );
 rest_of_dict = Middle( dict ; entry_end + 2 ; 999999 );
 new_dict = dict_beginning &amp; rest_of_dict
];

If( entry_start &gt; 0 ; new_dict ; dict )
)
</code></pre>
<h2>Replacing an Entry in a Dictionary</h2>
<h2>Dictionary のエントリを置換する</h2>
<blockquote><p>This function is primarily for convenience. It combines DictRemove with a new entry to effectively replace a value in the dictionary in one shot:</p></blockquote>
<p>この関数は、やたら便利だったらありゃしません。<br />
DictRemove と新エントリを結合して、一発で dictionary 中の値を効果的に置き換えます。</p>
<p><strong>Name: DictReplace ( dict, name, value )</strong></p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>DictRemove(dict, name) &amp; #(name, value)
</code></pre>
<h2>Returning the Top Name in a Dictionary</h2>
<h2>Dictionary 中の Top Name を返す</h2>
<blockquote><p>This custom function was designed to return the name of the first name-value pair in the dictionary. Nothing too special, but I if used in conjunction with the DictRemove() function above, you can pop off the top value of the dictionary with ease.</p></blockquote>
<p>このカスタム関数は、dictionary 中の 最初の name/value のペアの name を返します。<br />
特別なことは何もしていませんが、上記の DictRemove ( ) 関数と連携させて使うと、簡単に、最初の値を消すことができます。</p>
<p><strong>Name: DictFirst( dict )</strong></p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>Definition:

Let(
   [startValue = "&lt;:";    endValue = ":=";    positionOfStartValue= Position( dict ; startValue ; 1 ; 1 );    endOfStartValue= If( positionOfStartValue &gt; 0 ; positionOfStartValue  + Length(startvalue); -1 );
   beginningOfEndValue= Position( dict; endValue; endOfStartValue; 1 );
   found = If( beginningOfEndValue &gt; -1 and endOfStartValue &gt; -1 ; True; False );
   lengthFoundValue = beginningOfEndValue - endOfStartValue;
   foundValue = Middle( dict; endOfStartValue ; lengthFoundValue )];

   If( found ; foundValue ; "" )
)
</code></pre>
<h2>Adding to a Dictionary</h2>
<h2>Dictionary に追加する</h2>
<blockquote><p>This custom function is ridiculously easy. It’s really just a shortcut that looks a little more succinct then actually performing the action manually.</p></blockquote>
<p>このカスタム関数は、バカほど簡単です。<br />
実際に手動で行うよりほんの少し簡潔にしたショートカットです。</p>
<p><strong>Name:DictAdd( dict; name; value )</strong></p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>Definition:

 dict &amp; #( name ; value )

</code></pre>
<h2>Dictionary To String</h2>
<h2>Dictionaryを文字列に</h2>
<blockquote><p>This is quite frankly my favorite custom function ever. Serioulsy, I have a ton of ridiculous functions that no one uses but me, but this is the creme de la creme. I’ll get slightly more indepth about this function because it can be a little tricky to understand. Here is the signature of the function:</p></blockquote>
<p>これは、実際率直に言って、お気に入りのカスタム関数です。<br />
マジに、自分以外だれが使うねん…な関数を山ほど使っていますが、こいつは、最高です。<br />
ただ理解するのにちょこっとトリッキーかも知れないので、やや詳細に言及します。<br />
これがこの関数の書式です。</p>
<pre>Name: DictToString
Parameters:
Dict: A dictionary of your choosing
Format: format you would like to display the data in.</pre>
<blockquote><p>The real magic of this function comes from the Format parameter. This parameter will dictate how you want the data displayed. The function goes through each and every dictionary entry and will put it into whichever format you specific. To achieve this functionality a replace is performed on the Format. $name is replaced with the name of the dictionary entry and $value is replaced with the value of the dictionary entry. Here is the function:</p></blockquote>
<p>この関数のキモは、Format parameter です。<br />
このパラメータには、「どのようにデータを表示させたいか」を記述します。<br />
この関数は、個々の dictionary エントリに対して実行され、あなたの指定したフォーマットに仕上げます。<br />
$name は、dictionary エントリの name と、$value は、value と置き換えられます。<br />
以下がその関数です。</p>
<p><strong>Name: DictToString( Dict ; Format )</strong></p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>Definition:

 Let(
  [
  firstName  = DictFirst ( dict );
  rawdata = DictGet(dict; firstName) ;
  data = If( not IsEmpty( DictFirst( rawdata ) ) ; DictToString( rawdata ; Format ); rawdata );
  rest = DictRemove( dict ; firstName )

   ];
    If( not IsEmpty(firstName) ;
   Substitute(
                format;
                ["$name"; firstName  ];
                ["$value"; data ]
               )
               &amp;
           If (
                not IsEmpty(rest);
                DictToString(rest; Format)
              )
 ; dict )
)
</code></pre>
<blockquote><p>Let’s say your Format parameter is:<br />
たとえば、あなたのフォーマットパラメータが以下のようだったとします。</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>`"$name is $value"`
</code></pre>
<blockquote><p>and your dictionary is</p></blockquote>
<p>そして、あなたの dictionary がこうだったとします。</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>`&lt;:Jesse:=nuts:&gt;`
</code></pre>
<blockquote><p>the output would be</p></blockquote>
<p>すると、出力はこうなります。</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>`Jesse is Nuts`
</code></pre>
<blockquote><p>You can now basically output your dictionaries in any format you so desire. Such as…. you guessed it…. XML.</p></blockquote>
<p>基本的に、どんなフォーマットにでも思いのままに、あなたの dictionary を出力できます。<br />
たとえば…考えてみそ…XMLとか…</p>
<h2>Dictionary To XML</h2>
<h2>Dictionary を XML に</h2>
<blockquote><p>So once you understand the DictToString() custom function, the DictToXML() function is just a shortcut that I wrote so I don’t have to write the funky format over and over. Here is is:</p></blockquote>
<p>さて、DictToString ( ) を理解したところで、DictToXML ( ) 関数は、<br />
なんども繰り返し土臭いフォーマットを書かずにすむように作った<br />
単なるショートカットです。<br />
それはこうです。</p>
<p><strong>Name: DictToXML ( dict )</strong></p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>Definition:

DictToString ( dict , "&lt;$name&gt;$value&lt;$name&gt;" )
</code></pre>
<blockquote><p>Let’s say you setup your dictionary like so #( “account” ; #( “name” ; “Jesse” ) &amp; #( “birthday” ; “Yesterday” ) ). You’ll notice that I have put a pair of dictionaries within another dictionary named account. The DictToXML function (really the DictToString() function does the bulk of the work but you get the point) will actually iterate through the outside and inside dictionary and output the following:</p></blockquote>
<p>さて、あなたの dictionary を</p>
<pre>#( “account” ; #( “name” ; “Jesse” ) &amp; #( “birthday” ; “Yesterday” ) )</pre>
<p>と設定したとします。<br />
ふたつの dictionary をアカウントという名前のもうひとつの dictionaryに入れたことがわかりますね。<br />
DictToXML 関数 (ほとんどの機能を DictToString ( ) 関数が行うわけではありますが) は、外側と内側の dictionary を行ったり来たりして、以下を出力します。</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>&lt;account&gt;
&lt;name&gt;Jesse&lt;/name&gt;
&lt;birthday&gt;Yesterday&lt;/birthday&gt;
&lt;/account&gt;
</code></pre>
<blockquote><p>This can be very useful for creating tidbits of xml to post to web actions. Sweet Huh?</p></blockquote>
<p>Webアクションに post するtidbits の XML を生成するのにピッタリだしょ？よかんべ？</p>
<hr />
<ol>
<li><a title="FileMaker – マルチプルスクリプトパラメータの受け渡し" href="http://bison.jp/filemaker/692.html">FileMaker – マルチプルスクリプトパラメータの受け渡し</a></li>
<li><a title="マルチプルパラメータのスクリプトへの受け渡し – 応用編" href="http://bison.jp/filemaker/701.html">マルチプルパラメータのスクリプトへの受け渡し – 応用編</a></li>
<li><strong><a title="FileMaker Dictionary 関数" href="http://bison.jp/filemaker/715.html">FileMaker Dictionary 関数</a> (このエントリ)</strong></li>
</ol>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://bison.jp/filemaker/715.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>マルチプルパラメータのスクリプトへの受け渡し &#8211; 応用編</title>
		<link>http://bison.jp/filemaker/701.html</link>
		<comments>http://bison.jp/filemaker/701.html#comments</comments>
		<pubDate>Tue, 21 Dec 2010 08:15:40 +0000</pubDate>
		<dc:creator>bison</dc:creator>
				<category><![CDATA[FileMaker]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://bison.jp/?p=701</guid>
		<description><![CDATA[Passing Multiple Parameters to Scripts – Advanced 以下の blockquote部分は上記出典ページの段落、直後の日本語は内容の拙訳です。 拙訳への具体的な「ちげーよバカ！ [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sixfriedrice.com/wp/passing-multiple-parameters-to-scripts-advanced/">Passing Multiple Parameters to Scripts – Advanced</a></p>
<p>以下の blockquote部分は上記出典ページの段落、直後の日本語は内容の拙訳です。<br />
拙訳への具体的な「ちげーよバカ！」な突っ込みは大歓迎です。<br />
※ 万一のトラブルは、出典サイトはもちろん、(たとえそれが僕の拙訳のせいだとしても) 一切関知しませんのであしからず。</p>
<p>素晴らしいカスタム関数を発表してくれた sixfriedrice.com の Jesse Antunes / Geoff Coffey に感謝します。</p>
<hr />
<blockquote><p>Wouldn’t it be nice if whenever you need a parameter you could just ask for it by name? Lets say that you have a create order script and you want to pass the script the name, street and zip code of the customer. If you were stuck with just the regular old FileMaker functions there ain’t no way that’s happening. But after you are done with this post, you will be able to get the name of your customer with the simple function: GetParameter( &#8220;customerName&#8221; ).</p></blockquote>
<p>もし、パラメータを使いたいときはいつでも名前で呼び出せるとしたら、いい感じじゃないですか？<br />
受注スクリプトがあったとしましょう。<br />
そして、そのスクリプトに対して、顧客の名前/住所/郵便番号を受け渡したいとします。<br />
もし、あなたが、FileMakerに元々ある関数で立ち往生しているばかりだとしたら、これはどうにもできません。<br />
しかし、この post の内容をやっつけた後だとしたなら、シンプルな関数で、顧客の名前をとりだすことができるでしょう:<br />
GetParameter (&#8220;customerName&#8221; )</p>
<blockquote><p>Alright, since your interest is hopefully already piqued, I’m just going to go ahead and tell you the functions right away. There are three of them. I know that sounds like a lot but if you give me a chance to explain myself, trust me your going to love it and once you get used to them you’ll never go back.</p></blockquote>
<p>さて、もう十分興味を刺激することはできたでしょうから、その関数の話の中身にさっさと移りましょう。<br />
３つあります。<br />
こう言うと大変そうでしょ？<br />
でも、まあだまされたと思って説明を聞いてくださいな。<br />
あまりに気に入ってしまって、これなしの世界に戻れなくなりますから。</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>Name:  PassParameter
Parameters:  name,  value
Formula:  "&lt;:" &amp; Substitute( name; ["="; "/="]; [":"; "/:"] ; ["&gt;"; "/&gt;"]; ["&lt;" ; "/&lt;"]   ) &amp; ":="                  &amp; Substitute( value; ["="; "/="]; [":"; "/:"] ; ["&gt;"; "/&gt;"]; ["&lt;" ; "/&lt;"]   ) &amp; ":&gt;"

Name:  DictGet
Parameters:  dict, name
Formula:  Let( [
              match="&lt;:" &amp; Substitute( name ; ["="; "/="]; [":"; "/:"] ; ["&gt;"; "/&gt;"]; ["&lt;" ; "/&lt;"]   ) &amp; ":=";               pstart = Position(dict; match; 1; 1);               start = pstart + Length(match);               end = Position(dict ; ":&gt;"; start; 1);
              len = If(end = 0; 999999999; end - start)];

              If (pstart = 0; "";
              Substitute(Middle(dict; start; len); ["/:"; ":"]; ["/="; "="] ; ["/&gt;"; "&gt;"] ; ["/&lt;" ; "&lt;" ]))
)

Name:  GetParameter
Parameter:  name
Formula:  DictGet(Get(ScriptParameter); name)
</code></pre>
<blockquote><p>These different functions are probably a little bit confusing right now so lets go through them one by one.</p></blockquote>
<p>たぶん、これらの別々の関数を見て、ちょこっと脳みそがこんがらがっちゃったでしょうから、ひとつひとつ説明していくことにしましょう。</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>PassParameter( name ; value )
</code></pre>
<blockquote><p>This custom function is your bread and butter. You use it every time you want to pass a parameter to another script. name is the name of the parameter your are passing and value is the actual text that you want to send over. So for instance if you were sending the name of your customer to a script you would use:</p></blockquote>
<p>これが基本です。<br />
別のスクリプトにパラメータを受け渡したいときには、これを使います。<br />
name というのは、受け渡したいパラメータの名前で、value は受け渡したい値そのものです。<br />
したがって、仮に、顧客の名前をスクリプトに渡したい場合はこうなります。</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>PassParameter( "customer" ;  "Joe Blow" )
</code></pre>
<blockquote><p>If you want to pass multiple parameters to our order creation script would just string this custom function together using the ampersand like so:</p></blockquote>
<p>もし、受注システムに対して、複数のパラメータを受け渡したいのなら、&amp; (アンパサンド) を使って以下のように繋げて書けばいいわけです。</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>PassParameter( "customerName" ;  "Joe Blow" ) &amp;
PassParameter( "street" ; "123 Any St." ) &amp;
PassParameter( "zip" ; 85282 )
</code></pre>
<blockquote><p>How it works: PassParameter() turns the name, value pairs that you pass in into a special format so that they are easy to manage. It basically puts two special characters in front of the name, between the name and value, and after the value. Basically if you were to say PassParameter( &#8220;customerName&#8221; ; &#8220;joe blow&#8221; ), this function turns your text into:</p></blockquote>
<p>実際の動き方：<br />
PassParameter ( ) は、name/value のペアを、処理しやすいように特殊なフォーマットに変換します。<br />
要は、name の前と、name と value の間と、value の後に、2文字の特殊な文字を追加するわけです。<br />
つまり、<br />
PassParameter( &#8220;customerName&#8221; ; &#8220;joe blow&#8221; )<br />
と書いたら、返ってくるのは…</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>&lt;:customerName:=joe blow:&gt;
</code></pre>
<blockquote><p>or in the case of multiple parameters as above it would look like this:</p></blockquote>
<p>先述の複数のパラメータ例の場合は、以下のような感じになります。</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>&lt;:customerName:=joe blow:&gt;&lt;:street:=123 Any St.:&gt;&lt;:zip:=85282:&gt;
</code></pre>
<blockquote><p>This construct of name and value pairs is what we refer to as a dictionary. This becomes important because our next function operates on a dictionary. You’ll notice in the actual definition of the function PassParameter() that I do a couple of substitutions. I use this process to escape the different characters that I use in my delimiters so that my scripts won’t break when you send in those same characters. Don’t worry though, when I get them back out I remove any extra characters that I added.</p></blockquote>
<p>この name/value のペア構造を dictionary として参照させているわけです。<br />
これは大変大切なことです。<br />
次の関数は、この dictionary を操作する関数です。<br />
PassParameter ( ) の定義式を見れば、二度ほど substitute をしていることがわかりますね。<br />
このプロセスは、デリミタ(区切り記号) として使っているのと同じ文字列をパラメータの内部で使っても、スクリプトが破綻しないように、別の文字列にエスケープするためのものです。<br />
余計な文字列は最終的には除去されますから、ご心配なく。</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>DictGet( dict, name)
</code></pre>
<blockquote><p>The dict parameter in this custom function is, yup you guessed it, short for dictionary. The second parameter, â€˜name’, is just the name of a value that you would like to get out of the dictionary. So if you were to execute the following code:</p></blockquote>
<p>このカスタム関数内の dict という引数は、(はい！もうわかりましたね！)、dictionary の略ですね。<br />
2番目の引数の name は、dictionary から取り出したい値の名前です。<br />
ですから、もし以下のコードを実行すると…</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>DictGet( "&lt;:customerName:=joe blow:&gt;&lt;:street:=123 Any St.:&gt;&lt;:zip:=85282:&gt;" ; "customerName" )
</code></pre>
<blockquote><p>It would return “Joe Blow”. On it’s own this DictGet function doesn’t seem that useful but it is the workhorse of the three functions.</p>
<p>How it Works: DictGet() actually works as a basic text parser. It takes the name that you pass in and turns it into the format you would expect in the dictionary. If the name passed in is “customerName”, then it would be turned into “&lt;:customerName:=”. The we take that weird looking text and search for it in the dictionary. If we find the weird string in the dictionary, then we return the value for it (”joe blow”, otherwise we return an empty string (”&#8221;). Pretty neat huh?</p></blockquote>
<p>“Joe Blow” が返ります。<br />
DictGet 関数は、これ自身のみではさほど役に立つとは思えないでしょう。<br />
しかし、DictGet 関数は、くだんの3つの関数の間で馬車馬のように働いてくれるのです。</p>
<p>実際の動き方：<br />
DictGet ( ) は、基本的なテキストパーサとして働きます。<br />
name を受け取ると、dictionary に対して、よき案配のフォーマットに変換します。<br />
渡された name が “customerName” だとすると、<br />
“&lt;:customerName:=”<br />
と変換されます。<br />
そしてこの妙ちくりんなテキストを、dictionary の中で探します。<br />
dictionaryの中に このへんてこテキストを見つけた場合、”joe blow” という値を返すわけです<br />
(見つからなければ、空値 &#8220;&#8221; が返されます)<br />
なかなかイケてるでしょ？</p>
<pre style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; background-color: #f7f7f7; overflow-x: auto; overflow-y: auto; clear: both; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 5px; font-size: 12px; border-color: #cccccc; border-style: solid; padding: 10px;"><code>GetParameter( name )
</code></pre>
<blockquote><p>This is the function you would use whenever you are trying to access data that was passed in using the PassParameter() function. It’s is specifically designed to operate on a script parameter that contains a dictionary. It actually just pulls the value of the name you give it, out of the script parameter using the DictGet() function. Very Simple…. not a whole lot going on here.<br />
Now that you have a pretty good understanding you are pretty much ready to enter into the world of named parameters. Once you get used to using these little gems, I am positive that you will never be able to go back to plain old vanilla script parameters ever again. There are a couple more benefits to using these functions such as using named values in your script results, nesting parameters and accessing multiple occurrences that I will probably get into a later date. For nowâ€¦ I hope these functions help make FileMaker Development a little easier for you.</p></blockquote>
<p>PassParameter ( ) 関数を使って受け渡されたデータにアクセスしたいときに使います。<br />
dictionary を内包するスクリプト引数を操作するため専用に作成しました。<br />
DictGet ( ) 関数を使って、スクリプト引数から、与えられた name にひもづく値を引き出すわけです。<br />
すごくシンプル。なんちうこたない。<br />
さて、なかなかいい感じで理解できたなら、named parameter の世界に入る準備はいい感じでOK ということです。<br />
いったん、これらのちょっとしたテクを使うのに慣れると、もう、あの古式ゆかしいペラッペラに薄っぺらな標準のスクリプト引数に二度と戻る気はさらさらなくなることでしょう。<br />
これらの関数を使うことで、他にも、二三の恩恵に浴することができます。<br />
スクリプトの結果から 名前で値を引っ張りだしたりとか、入れ子のパラメータからとか、後日言及する複数のオカレンスへのアクセスとか…ね。<br />
とりあえず、これらの関数が、あなたの FileMakerでのデータベース開発を少しでもラクチンにすることを願います。</p>
<blockquote><p>More About Dictionaries: If you would like to get a little more in-depth into these functions there is a second post that adds functionality to this idea here:<a href="http://sixfriedrice.com/wp/filemaker-dictionary-functions/">FileMaker Dictionary Functions</a>.</p>
<p>NOTE: We had a couple of good comments from some of our early release readers. Genx who blogs on <a href="http://www.filemakermagazine.com/blogs/aflgenx">FileMakerMagazine.com</a> added that he thought it would be much more visually appealing and easier to use XML style tags. I can’t remember the exact reason why I didn’t go this route… I am pretty sure it was because I wanted to have two delimiters at each break point in the name/value pair. He did convince us to change the names of the functions from our more nondescript names ( #() #P() ) we started with so that it would be easily understood what each one did. Another useful tip came from Fitch of<a href="http://www.pre1.com/">pre1.com</a>, who pointed out that another similar name/value pair implementation can be seen in <a href="http://www.seedcode.com/cp-app/ste_cat/backmagic">Back Magic from SeedCode.com</a></p></blockquote>
<p>dictionary 関連のより詳しい話：<br />
これらの関数についてもっと詳しく知りたい場合、下記の second post で、ここのアイデアの機能追加発展版な記事が読めますぜ。<br />
<a href="http://sixfriedrice.com/wp/filemaker-dictionary-functions/">FileMaker Dictionary Functions</a></p>
<p><a href="http://bison.jp/filemaker/715.html">日本語 拙訳</a></p>
<p>Note：初期版読者からの 良きコメントが、ふたつみっつありました。<br />
<a href="http://www.filemakermagazine.com/blogs/aflgenx">FileMakerMagazine.com の blog</a> をやっている Genx からは…<br />
XMLスタイルタグを使えば、もっと見た目で分かりやすくて訴求力のある感じになるんじゃね？…と。<br />
今となってはなんでそのルートに行かなかったのかを思い出せないのですが… おそらくは、たぶん name/value ペアのブレークポイント毎に、2文字のデリミタを差し込みたかったんだと思われます。<br />
また彼がそうしろというのがもっともなので、最初 #() #P() とかいう何なんだかわからない記述にしていたこれらのカスタム関数の名前を、何をするものなのか分かるような名前に変えることにしました。</p>
<p>もうひとつのナイスコメントは、<a href="http://www.pre1.com/">pre1.com</a> の Fitch でもって…<br />
似て非なる name/value ペアの実装方法を指摘してくれました。<br />
<a href="http://www.seedcode.com/cp-app/ste_cat/backmagic">Back Magic from SeedCode.com</a>で見られます。</p>
<hr />
<ol>
<li><a title="FileMaker – マルチプルスクリプトパラメータの受け渡し" href="http://bison.jp/filemaker/692.html">FileMaker – マルチプルスクリプトパラメータの受け渡し</a></li>
<li><strong><a title="マルチプルパラメータのスクリプトへの受け渡し – 応用編" href="http://bison.jp/filemaker/701.html">マルチプルパラメータのスクリプトへの受け渡し – 応用編</a> (このエントリ)</strong></li>
<li><a title="FileMaker Dictionary 関数" href="http://bison.jp/filemaker/715.html">FileMaker Dictionary 関数</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://bison.jp/filemaker/701.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

