Can I make an AppleScript application AppleScriptable?

Can anyone tell me whether it is possible to make my application, written in AppleScript, AppleScriptable. If so, how can I go about doing this?

You need, most probably, cocoa knowledge. If you don’t get more info here, jump directly to Apple’s AppleScript-Implementors List, where you’ll find lots of folks whose main goal in this life is make anything applescriptable :wink:

If you built your app using AppleScript Studio, then, to some degree, it is already scriptable and it will be easier to add “creative workarounds” for full scriptability as opposed to actually adding a full AETE suite for your routines. Somewhat scriptable means that the code you use inside your app is available to anyone outside your app (e.g., tell app “yourapp” to set contents of text field 1 of window “main” to “some text”). For “creative workarounds”, assign some custom routine to a button (the button can be positioned offscreen or behind some other element). Then to run that routine from anywhere outside your app, simply tell your app to push that button (e.g., tell app “yourapp” to tell button 1 of window “main” to perform action). There are also all sorts of ways to pass parameters back and forth between your app and an external script such as by setting the contents of a hidden text field to the parameters or return values and parsing them (if necessary).

Get creative!


OK, thanks. I guess the easiest way to do it is to just use GUI scripting, and the like. Thanks for the help.