Scripts written in PocoScript can be shared between PocoMail, PocoMail PE and Barca, however there are a few aspects that cause problems in sharing them. I would like to use this thread to discuss the problems I've encountered and to allow others to contribute their thoughts on this.

The first problem I've come across is the problem of determining which verison of the PocoScript interpretter is being used by the application. The #PocoScript variable returns the build number of the application. At the moment this is 1880 for PocoMail while it is 700 for Barca (I do not have PocoMail PE installed so I don't know what is returned by it but I assume it is once again different). I often use this variable to determine whether or not a given script can operate or to trigger slightly different processing to get around bugs or use new features. The different version numbers make it impossible to share such scripts between PSI applications.

I suggest a #ProductVersion system variable be added to PocoScript. It should contain the build number of the application while the #PocoVersion variable should return the version of the PocoScript interpretter in use (the build number of the version of PocoMail on which the product itself is built).

A second problem I have encountered is needing to know the application name itself. I use this to read the "ini" file used by the application. I use this for various purposes. I would suggest one and possibly two new system variables be introduced:

$Product - The name of the application (e.g., PocoMail)

$SysIniFile - The name of the system's ini file (including the full path).

I've done a little more thinking about the variable names and I think a slightly different naming convention might be better. My thoughts are that it would be easiest to remember if the names were kept in line with the current naming, i.e., the $AppPath variable. As such I would suggest the following new system variables be added to PocoScript:

$AppIniFile - The name of the application's ini file including the path