Belle Nuit Montage - Editing etc. - Lausanne - Suisse - e-mail: matti@belle-nuit.com
Homepage : Textfilter [ Index - API - Examples - FAQ - Maillist - Plugins - Script - Userguide - Win32 ] - Search - Sitemap
On the startup, the host application Textfilter checks the "Plugins" folder, parses each file in it and adds it to the plugin menu, if the parsing is successful.
Plugins use the same language as the Script filter and are saved as simple text files.
However, plugins can also have custom parameters, like the built-in functions.Plugins do not have to take care of saving the parameter values, this is done by the host application. The parameter settings are saved with the project. If you copy a project from one computer to another, be sure to copy also the plugin, because the project only saves the parameter settings, but not the code.
When a plugin filter is executed, it receives either the whole text or a selection of it, when the host is in textmode, or a cell of the list, if the host is in list mode and if the cell is selected. This is done with the function
The plugin can ask which raw or column the cell is in, with the functions
Be aware that the input function always returns a string.
The plugin can ask for the parameter values with the function
where myparameter stands for the name of the parameter.
The plugin returns the processed text with the function
Print can be called multiple times, and the string will be subesequently appended to the output.
To learn how to write plugins, you best look at the sample plugins in the Plugins folder.
Plugin files are simple text files and can be edited with any text editor. The filename is not of importance.
The plugin text starts with the <plugin> tag and ends with the </plugin> tag. All text must be within this tags. Comments others than in the script sections are not allowed. You can freely format the text (add spaces, add returns) between the tags, but not inside the tags, except the script section. The strings tagged with string should not use high-bit characters (ascii-value>128) nor the characters "<",">" and "\", but html-style escape sequences (kind ü).
On the second level, three tags are needed:
and two are optional
The parameter descriptions on depend on the class of the parameter. You can have 6 parameter classes
Each parameter has the tags
Then, each parameter can be set to a default value using tags in the type of the parameter:
Look at the interface test plugin source code to see actual code.
Textfilter was written with REALbasic http://www.realsoftware.com
![]()
Homepage : Textfilter [ Index - API - Examples - FAQ - Maillist - Plugins - Script - Userguide - Win32 ] - Search - Sitemap
e-mail: matti@belle-nuit.com - www.belle-nuit.com - 6.1.02