Making Scripting Additions

I’ve got a couple of questions concerning scripting additions.

Do you need a special program to create scripting additions? How do you make your own?

In one like Jon’s commands, how do you think he made the ‘keys pressed’ command? If you can make that command from applescript, it doesn’t seem necessary to make that a scripting addition, but maybe you have to use another programming language to get current pressed keys.

Thanks for your help.

Traditionally, you use C or C++, and now also Obj-C (usually in Xcode, though you can still use CodeWarrior, I think).

You have various source-codes here:
http://osaxen.com/cat.php?category_list=20&act=show_cat&cat_id=20

And the best place to ask for input is:
http://lists.apple.com/mailman/listinfo/applescript-implementors

The “vanilla applescript version” of a scripting addition is a “library” (usually containing vanilla AppleScript handlers, aka “user commands”).

And you can also create scriptable applications using a variety of languages, including cocoa, realbasic, python, etc. (I think this is easier for the newbie trying to bring extra functionality to AppleScript thru extra commands).

Finally, you can now use AppleScript Studio and its “call method” to invoke obj-c methods and bring to your app various useful functions (such as emulating “keys pressed”, I think).

Thanks a lot. I’ll check out those links. But one more question:
Can you create a scripting addition with XCode?
Thanks again.

Yes. Check, for instance, XMail’s source-code in the link above.