[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Making scripts interoperable amongst all PSI products

Making scripts interoperable amongst all PSI products

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Making scripts interoperable amongst all PSI products

Postby Michael » Wed Aug 04, 2004 2:44 am

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).
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Re: Making scripts interoperable amongst all PSI products

Postby Jose » Wed Aug 04, 2004 5:20 am

Good point, Michael... IMHO those suggestions will improve PocoScript.... :)

Michael wrote:(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).


#PocoVersion in PocoMail PE returns 1780 (using PocoMail PE 3.0.3.1780).

Regards...
Jose
 

Postby Michael » Wed Aug 04, 2004 3:51 pm

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
  • $AppName - The application name (e.g., PocoMail, Barca, etc)
  • #AppVersion - The build number of the application
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron