>>My application has opened documents, but script returns "can't get name of document 1". i think you should change your Applescript. tell application "MyApp" <mention the command (verb) here> end tell
<Command> is the one that you have mentioned in the .Sdef file . In your Xcode when you click on the Sdef file , check for the Verb(s) "Terminology for the SimpleScriptingVerbs Sample" you need to call the verb in the apple script. Only then your "App" would understand what it has to do. regards, ~Arjun On Fri, Jun 12, 2009 at 4:15 PM, Vitaly Ovchinnikov < vitaly.ovchinni...@gmail.com> wrote: > Hello, > > I completely stumped with allowing my application to be called from > apple-script. After reading of apple docs, I added simple sdef file > and two keys to info.plist. Sdef file contains only standard suite and > nothing added by me, but even with this I can't run the simplest > script like this one: > > tell application "MyApp" > get name of document 1 > end tell > > My application has opened documents, but script returns "can't get > name of document 1". > > Actually, my question is simple: I have document-based cocoa > application, my document class (MyDocument) has one property > (aProperty) and one method (doSomething). Please show me the simplest > sdef file that will allow me to create documents from script, access > my property and call my method. > > Thank you. > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/arjun.sm%40gmail.com > > This email sent to arjun...@gmail.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com