• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to add a custom applescript command to sdef
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to add a custom applescript command to sdef


  • Subject: How to add a custom applescript command to sdef
  • From: Ron Fleckner <email@hidden>
  • Date: Tue, 19 Jun 2007 13:39:35 +1000

Hi,

I'm currently adding applescriptability to my Cocoa app. I've been able to use the skeleton sdef <http://developer.apple.com/samplecode/ ScriptingDefinitions/> to expose a couple of scriptable properties of my app delegate which is great. I can write scripts which tell my app to change those properties and it works. However, I haven't been able to work out how to add a custom command to my app's AppleScript dictionary.

I'm not sure whether I need to add a Script Command Class to my project, or whether I should be able to add an entry (of some sort!) to the sdef which will reference a void method in my app delegate which would then be accessible via a custom AppleScript command.

My goal is to be able to write this script:

tell app "MyApp"
activate
start -- want this to reference a method with this sig: - (void) startTimer
end


Thanks a lot for any direction,
Ron
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Prev by Date: Re: [OFF] NSDistributedNotification
  • Next by Date: Trouble with random activation for NSStatusItem
  • Previous by thread: Re: button text won't disable/gray out
  • Next by thread: Re: How to add a custom applescript command to sdef
  • Index(es):
    • Date
    • Thread