NOTE: AIML files that contain no linefeeds are very difficult to edit in this environment. When the use of a real XML parser is implemented, we'll remove this restriction.
There are several levels of editing in Program N (AIMLpad).
To edit the AIML, just go to the files menu and open an AIML file. Like any text editor, the XML will display and be ready for cutting and pasting and so on.
Some authors like to have several AIML files open so they can cut and paste across them. You can do this easily in AIMLpad if you associate the .aiml extension to the AIMLpad.exe. Multiple instances of the editor shouldn't interfere with each other (too much). So Program N basically is a very boring text editor which is nothing to brag about when editing AIML. It is almost disappointing. It does correct the single linefeeds used by Unix type environments which is a small plus.
Probably the first thing you'll want to do is try the AIML in a chat. This involves loading the XML into the interpreter's database (similar to the automatic load into the Graphmaster indexing at the beginning of most other interpreters.) If you have more than one AIML file to represent your bot, you will need to make a list of those file names in a regular text file.
Say you put all your aiml files in a folder called aimlfiles. You could make a text file in that aimlfiles folder with the single line *.aiml in it followed by another line <eof>. If you listed this text file it would look like:
To load the AIML files into AIMLpad's database, choose Tools from the menu bar. In the drop down options choose AIML... and select Learn... from the pop-up sub-menu option. You now have a dialog that allows you to enter the name of your file containing the set of AIML files to learn. The best way to do this would be to press the Browse button and find your "AIML set" file displayed in the pop-up open file dialog. On the learn dialog, since the checkbox indicating "The file you picked is a list" has been checked as a default, you are ready to press the Learn button to load the database.
One more step is recommended to become more compliant with the AIML standards. You want to sort your database patterns. I left this as an option in case experimenters would like to try different arrangements of matching. Anyway, choose Tools -> AIML... -> Sort. The desktop version sorts pretty fast, so the pop-up warning is just a nag that makes you press the Ok button to proceed.
Now you have you AIML loaded and ready to test. You can see what files were actually loaded by just examining the Dump dialog. You don't actually have to create any new files from this Dump dialog; you can use it to show what is active in the interpreter. The dialog will list all the files it loaded with a checkbox in front of each. That will give you a list of the "bot's brain". One thing I like to do when I am working on raw AIML is to dump the individual files, one by one, back out again so they are formatted and brought back up to the 1.01 standard. This makes them much easier to work with in the text editor. The only drawback is you'll lose any comments or meta-tags in the AIML.
To try out your bot, you'll probably want a new text file to edit. That's menu File -> New or Ctrl-N or pressing the blank page icon on the toolbar. This blank text document will be your log of the chat. Now press the icon on the toolbar that looks like a balloon excerpt (the one on the far right) or choose Tools -> Context -> Dialog or press Ctrl-D. The cursor will flash twice as fast so you'll know you're inputting to the interpreter. Type in your input and press return. The bot will respond.
Suppose you want to know what the bot did to determine the response. Just like other engines, this is the target function. You can turn the target logging on with Ctrl-T or Tools -> Context -> Targetting. Those targets can be edited using the Target Edit dialog which is activated by Tools -> AIML -> List Targets... or Edit Targets....
Suppose you don't want to wade through all the targets. You can find the patterns that match a given input using the Search dialog. Use the menu Tools -> AIML -> Search Categories... to open the dialog. If you just type in your input and use the defaults, you'll see how the interpreter would match patterns to the input. It gives you extra patterns because it doesn't restrict the <that> filter unless an input is given for <that>. Usually the first pattern found is the one the interpreter uses to make its response (exceptions could occur if the database was not sorted.) You can double click on the text of the pattern to go to the Target Edit dialog where you can make changes to the category.
The Target Edit dialog is a central spot for updating individual categories. While the intent and main purpose of AIMLpad was to directly edit the AIML (XML) text, this dialog has become a valuable alternative to updating files or the database at specific points. The author must be careful here, because the Target Edit dialog works most often from the AIML loaded in the interpreter and not from the AIML files. If changes are made to the files, which is the best way to get results, reloading the interpreter's database routinely is recommended so things don't get too far out of sync.