*趣旨 [#f1c831fb] MACのautomatorは、シェルスクリプトやAppleScriptやFinderの制御などをおこなうものらしいが、 とっかかりが、難しそうなので、その辺の情報収集をめもします。 *チュートリアル [#f6ea37a1] **アプリケーションを実行する相対パスに関する注意点など [#zecb78a8] http://blog.goo.ne.jp/66cri/e/48c3cf8b85645d3ea4c35f10d6eb46a0 **フォルダ内のJPGを一カ所に集めるチュートリアル(英語) [#m3622ced] http://www.metacafe.com/watch/6791223/save_tons_of_time_using_automator_for_mac_video_tutorial/ チュートリアルをみて思ったAutomatorの特徴は、 -グラフィカルな皮をかぶった、スクリプト言語である。 -シェルは、Appleのアプリケーション、例えばFinderなどの製品とのインタフェースをもたないか、敷居が高いが、Automatoarには、ライブラリが提供されているようです。 となると、XCodeでアプリを作るときに、Automatorから制御できるためのライブラリがAppleのサイトに記載方法が乗っている可能性があるのではないでしょうか? 下記の質問ページを見つけました。 http://stackoverflow.com/questions/5971840/can-i-use-an-application-as-a-library-mac-objective-c 気になるObjectiveCのクラスがリストアップしてあります。 -NSPasteboardWriting -NSPasteboardReading 基本的な関連するObjectiveCのクラス -NSString -NSAttributedString -NSURL -NSColor -NSSound -NSImage Automator対応アプリを作るにあたって、プロジェクトは主に3種類あるみたいです。 +シェルをベースとしたプロジェクト +ActionScriptをベース +ObjectiveCをベース ん? KWDocumentクラスとKWRegistrationManagerクラスをを使った文章複製のサンプルが記載されているのかな? ***KWDuplicateObjectsToDocument.h [#w5197726] #import <Cocoa/Cocoa.h> #import <Automator/AMBundleAction.h> @interface KWDuplicateObjectsToDocument : AMBundleAction { } - (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo; @end ***KWDuplicateObjectsToDocument.m [#o42c7d9c] #import "KWDuplicateObjectsToDocument.h" #import "KWDocument.h" #import "KWRegistrationManager.h" @implementation KWDuplicateObjectsToDocument - (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo { if (![[KWRegistrationManager defaultManager] isRegistered]) { return nil; } // eventually you'll call // duplicateObjects:toDocument: return input; } @end で、これを参考にすれば、apple scriptとか、ObjectiveCで制御可能なアプリを作ることができるみたいだ。 この回答を書いたNSGodさんすごいな。 どれどれ、Macのフォント関連のシェアウェア作者さんのようですね。 http://www.markdouma.com/fontfinagler/ やっぱ、アプリ作る人すごいなー。 *Automatorを使用してTerminal.appでSSH接続を自動化する [#jbe8d17a] http://ameblo.jp/welx/entry-10994763341.html