MACのautomatorは、シェルスクリプトやAppleScript?やFinderの制御などをおこなうものらしいが、
とっかかりが、難しそうなので、その辺の情報収集をめもします。
http://blog.goo.ne.jp/66cri/e/48c3cf8b85645d3ea4c35f10d6eb46a0
http://www.metacafe.com/watch/6791223/save_tons_of_time_using_automator_for_mac_video_tutorial/
チュートリアルをみて思ったAutomatorの特徴は、
となると、XCodeでアプリを作るときに、Automatorから制御できるためのライブラリがAppleのサイトに記載方法が乗っている可能性があるのではないでしょうか?
下記の質問ページを見つけました。
http://stackoverflow.com/questions/5971840/can-i-use-an-application-as-a-library-mac-objective-c
気になるObjectiveCのクラスがリストアップしてあります。
基本的な関連するObjectiveCのクラス
Automator対応アプリを作るにあたって、プロジェクトは主に3種類あるみたいです。
ん? KWDocumentクラスとKWRegistrationManager?クラスをを使った文章複製のサンプルが記載されているのかな?
#import <Cocoa/Cocoa.h> #import <Automator/AMBundleAction.h> @interface KWDuplicateObjectsToDocument : AMBundleAction { } - (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo; @end
#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/
やっぱ、アプリ作る人すごいなー。