How to add a custom applescript command to sdef
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