Writing Plug-ins for A.E.P.

Home

What's new?

Help

Plug-ins

Plug-in Tutorial

  1. introduction
  2. talking to AEP
  3. processing
  4. making it better
  5. another removal
  6. add an extension
  7. some tips

Download

Introduction

Writing plug-ins for AEP is easy and fun! Well all right, it doesn't have to be difficult and it can be very satisfying to learn AEP new tricks. In AEP's plug-in folder there is a folder with three templates, one for plug-ins that deal with file extensions that are added to a file or folder, one for plug-ins that deal with file extensions that are removed from a file and one for plug-ins that deal with the substitution of file extensions and take care of the translation of files. The translation plug-ins require some understanding of Applescript to use, and I won't go into them in this tutorial, but the plug-ins for adding and removing extensions for files and folders can be very easily adapted for use with all kinds of drag-and-drop applications. To make a valid removal plug-in, you only need to supply two very basic pieces of information: the name of the application that you want to run and the extension that will trigger AEP to use the plug-in!

This tutorial was written for those who aren't very fluent in Applescript, so if you are, please bear with me while I explain some of the details. You should be aware that the tutorial uses inline frames to display the source code. Applescript is rather sensitive to line breaks, so you should take care to type the code exactly as it appears. (When you use Script Editor, your code will be coloured for easy reference. I decided not to do that, as my version of Internet Explorer choked on it, though other browsers worked fine. Still, as you get Internet Explorer with your Mac, I thought it better to keep the code black and visible than coloured and gone.) If your browser doesn't understand inline frames, you probably should open the relevant code sections in a seperate window, so you can view them with the text.

The tutorial revolves mainly around building two plug-ins that allow the user to remove and add the file extension gz from a file, signifying that the user wants to unzip or create a gnu zipped archive.

The first part of this tutorial will introduce you to the way a plug-in informs AEP which file extensions that are removed from files it can handle.

In the second part of the tutorial you will finish building your first plug-in. It will show you the quickest way of doing that, and there will be a brief tour of the first part of the subroutine that AEP calls to tell the plug-in to handle a file extension.

The easiest way is not always the best way and in the third part you will be shown a fairly easy way of making your plug-in more robust and portable to other people's computers.

The helper application that is used in most of the tutorial plug-ins is Peter Job's free Nutcase Gzip. Although you don't exactly need it to read through the tutorial, you will probably get more out of this if you download the application and play with it a bit. Go on, do it now. I'll promise I'll wait.

Ready? Then it is time to start with the real tutorial and talk about the way AEP and plug-ins interact.


A.E.P. The Active Extension Processor - Created by Roger Jolly - Copyright 2002 - All rights reserved.