RE: Add custom sdef to AppleScript applet?
RE: Add custom sdef to AppleScript applet?
- Subject: RE: Add custom sdef to AppleScript applet?
- From: Chris Paveglio <email@hidden>
- Date: Tue, 18 Oct 2011 13:17:26 +0000
- Thread-topic: Add custom sdef to AppleScript applet?
I just recently made one of my Cocoa apps be scriptable. It was sort of a
challenge. But, from what you require it's possible.
I would say it would be a Cocoa app; it could respond to Applescript
commands that other apps send. Those commands will trigger objective-C
methods. So any method that ObjC can call, you can use, including
NSApplescript ( executeAppleEvent:error:) or direct calls to an
ApplescriptOBJC class to do shell script. But I'd imagine you could do a
unix call in ObjC directly too, no need for ASOC class.
Check out Apple sample code: SimpleScripting, SimpleScriptingObjects,
SimpleScriptingPlugIn, SimpleScriptingVerbs.
Verbs was the most useful example for me.
Chris
> I was wondering if it is possible, using the new features in
> AppleScript/Objective-C and AppleScript Editor, to create an
> AppleScript-Cocoa applet that implements a custom sdef interface. My
> idea is to create a helper app that could provide the custom AppleScript
> dictionary I'm seeking for my Ruby app that could pass commands to the
> Ruby app via "do shell script."
>
> Not sure if anyone has tried this, but any advice is appreciated.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden