[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 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 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 - PocoScript to be improved?

PocoScript to be improved?

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

PocoScript to be improved?

Postby vamp07 » Mon Jul 26, 2004 11:37 am

I just spent the day creating a pretty fancy procscript to modify some incoming logs and send them out to the corresponding customer. I love Poco script but this sure would have been easier if poco script had some standard constructs such as

If then else endif

case statement

for each

Not having these three causes scripts to get nasty with lots of labels and difficult to debug code.
vamp07
Frequent Visitor
 
Posts: 66
Joined: Mon Jul 26, 2004 11:31 am

Postby Michael » Tue Jul 27, 2004 5:32 pm

If then else has already been requested and is in the bug tracking database.

A few months ago I suggested the For Each syntax to PSI in a private email message.

I don't recall ever seeing a request for case statements.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby vamp07 » Wed Jul 28, 2004 1:44 pm

I think all your standard contructs are needed. A while loop for example etc etc. More the anything else I would like to get away from having to place labels all over the place in order to do looping and branching. I have since done much more with my scripting. I have some scripts that take up to a minute to run given the processing they are doing. For example they are grabbing an incoming attachment, unzipping it and then processing it's text. I have another that runs based on timed events to look for missing items in icoming mail. The fact that they run flawlessly and have never caused a single hick up or crash has me more impressed then ever with poco. I got into pocomail years ago because of the scripting and I am now coming back to it in earnest because of the scripting. Truly powerful stuff if you need it.




Michael wrote:If then else has already been requested and is in the bug tracking database.

A few months ago I suggested the For Each syntax to PSI in a private email message.

I don't recall ever seeing a request for case statements.
vamp07
Frequent Visitor
 
Posts: 66
Joined: Mon Jul 26, 2004 11:31 am

Postby Michael » Wed Jul 28, 2004 3:15 pm

I agree with you as to the power of PocoScript, perhaps what is needed is an extension such that the various constructs are exposed to other languages so you can use their power and capabilities to bear. This, however, is far from a trivial task.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby vamp07 » Thu Jul 29, 2004 1:37 am

I would be happy with just having some more contructs in poco. Exporting a message to an external file and processing it with some other language is easy enough. I like the fact that pocoscript is relatively simple and specific to the task at hand. The fact is that "if then elseif .. elseif elseif .... else endif" would solve 99% of the problems.




Michael wrote:I agree with you as to the power of PocoScript, perhaps what is needed is an extension such that the various constructs are exposed to other languages so you can use their power and capabilities to bear. This, however, is far from a trivial task.
vamp07
Frequent Visitor
 
Posts: 66
Joined: Mon Jul 26, 2004 11:31 am

Postby frazmi » Mon Aug 02, 2004 2:31 am

On the subject of improvements, one area that (IMO) really needs help is the documentation, especially in the area of variable and character handling. There are just too many things that one must learn by trial and error. Examples: How to handle slashes in file names, what happens to the message in the MBX file under various processing, how to "escape" various special characters like quotes.

Also, the documentation should be "normalized" so that the sequence of arguments in the explanation always matches exactly the sequence of arguments in the syntax.

And finally, better variable names in the syntax would help (instead of $I and $a).
frazmi
Poco Enthusiast
 
Posts: 248
Joined: Tue Jul 27, 2004 1:27 am
Location: South Korea

Postby Hogyt » Tue Aug 24, 2004 7:11 pm

I've been converting the PocoScript manual to chm format for integration within the editor i use, as well as making it a bit easier to use and adding a few bits and pieces like a section on CVTs and escape characters. If PSI give permission (waiting on a reply from them) i'll upload it somewhere and link here.

Heres a screenshot:

Image
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 0 guests

cron