Home
What's new?
Help
Plug-ins
Plug-in Tutorial
- introduction
- talking to AEP
- processing
- making it better
- another removal
- add an extension
- some tips
Download
|
Plug-ins that translate files
I won't go into the details of how to write a translation plug-in in this tutorial, because most applications will require a bit more knowledge about Applescript. If you have a drag-and-drop handler application, you can just fill in the necessary details into the template. Just remember to put two file extensions seperated by a colon in the extensionname.
Use AEP as soon as possible
Because AEP only needs to know what a plug-in can handle to be able to activate it, you can write your plug-in interactively. As soon as you have finished the WhatDoYouHandle routine, drop it into the appropriate folder and run AEP. Now open the plug-in into Script Editor and start working out the rest of it. When you want to test the plug-in, just save it and add or remove, as the case may be, the extension. AEP will then run your plug-in and you can see how you are doing.
Using Unix in plug-ins
If you now how to do it, using Unix can give your AEP plug-ins enormous power. Just remember that people in some countries use strange mysterious characters in their names like accents. (Spaces can be disastrous, too.) If you are not carefull these can wreck havoc on your scripts, but with some tricks you can do it right. Though I claim no expertise on Unix, try to look at some of the included plug-ins to see how I did it.
Take care of long names
As you may have noticed Nutcase Gzip has trouble with long file names, other applications might, too. Some use algorithms made when Macintosh names could be at most 31 characters long, others are DOS based and only handle 8 or perhaps 11 characters. Then there are some ancient Unix binaries that choke on anything more than 14 characters etcetera, etcetera. If you use such an application, make sure you check the length of names.
Use Aqua interface elements
When you call a dialog box in Applescript, you get a plain fixed one. With a little work, you can display it using AEP's aqua interface elements. Just use tell me to before your call. If you know what you are doing, you can even get more out of it. (Remember, you can interact with AEP by calling it from Script Editor.)
You should now know enough to make your own plug-ins and if you do, and make some interesting ones, let me know. Maybe others can profit from your efforts as well! Happy coding.
|