2016年9月27日火曜日

Mac OSX FileMaker で PowerShell を使う。


PowerShellが、Mac OSX 対応と言うことで、FileMakerと連携できないか?いじってみました。

バイナリパッケージがあるので簡単にインストール出来ます。

GitHub - PowerShell/PowerShell: PowerShell for every system! : https://github.com/PowerShell/PowerShell


 OS X版のPowerShellは、パッケージ(*.pkg)の形で配布される。Finderからダブルクリックでインストールを開始できるが、「開発元が未確認のため...」と表示されたときにはコンテキストメニューを表示し「開く」を選択しよう。
引用:http://ascii.jp/elem/000/001/217/1217507/


以下をFileMakerの スクリプト:「AppleScriptを実行」で実行すると、
PowerShellの戻り値が、フィールド:Result に入ります。


スクリプト:「AppleScriptを実行」
set Result to do shell script "/usr/local/bin/Powershell -command '$PSVersionTable;'"
set cell "Result" of current record to Result

0 件のコメント:

コメントを投稿