1
私はテストAppleScript辞書を持っている:スクリプティングのCocoaアプリケーション
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary title="ScriptTest Terminology">
<suite name="Standard Suite" code="????" description="Common classes and commands for all applications.">
<class name="application" code="capp" description="The application's top-level scripting object.">
<cocoa class="NSApplication"/>
</class>
</suite>
<suite name="MyApplication Suite" code="scts" description="MyApplication information.">
<class name="application" code="capp" description="The application's top-level scripting object." inherits="application">
<cocoa class="NSApplication"/>
<responds-to command="sayhello">
<cocoa method="sayHello:"/>
</responds-to>
</class>
<command name="sayhello" code="sctshell" description="Says hello.">
</command>
</suite>
</dictionary>
私AppDelegateが持つメソッド:しかし、それが呼び出されないです
- (void)sayHello:(NSScriptCommand*)scriptCommand;
を...なぜ?
appleScriptのアプリケーションクラスにコマンドを追加するにはどうすればよいですか? (例えば、tell application "Test" to sayhello
)?