Apple script editor keeps rejecting my custom command as undefined parameter? What am I doing wrong?
I am trying to make an application apple scriptable. I have created a scripting definition by copying mail.sdef and modifying it to suit my needs as the documentation recommends. My app suite at this point only has one command in it. Here is the definition:
<suite name="NAZone"code="NAZN"description="Classes and commands for the Zone application">
<command name="accountLogin"code="zONeLgIn"description="Triggers account login.">
<cocoa class="LoginCommand"/>
<parameter name="loginName"code="naun"type="text"optional="no"description="Specify the username for the account that you wish to log into">
<cocoa key="LoginName"/>
</parameter>
<parameter name="passwordStr"code="napw"type="text"optional="no"description="Specify the account password you wish to log into">
<cocoa key="PasswordStr"/>
</parameter>
</command>
</suite>
I am not sure what is wrong with my definition above, but AppleScript Editor keeps complaining: "Expected end of line but found identifier." at the statement where command is invoked. Here is how my test sript looks like:
tell application "NAZone"
launch
try
accountlogin loginName "test@mail.com" passwordStr "abcdef12345"
on error errStr number errNum
display dialog errStr & errNum
end try
end tell
AppleScript Editor complains anything following the command name. I don't think my command is somehow recognized.
I new to making applications scriptable as well as apple scripting.
MacBook Pro, Mac OS X (10.7.5)