[quote user="Neil Fraser"]SKIP command
In place of the SkipNext "" command, I would like to suggest a Skip "N" command where N is the number of lines to skip. This will allow a condition to be tested and multiple lines skipped without the need for a Label. <...> In a particular script of mine where a lot of tests are done, it would make the code much more elegant[/quote]
Pegasus provides powerful filtering tools, inviting users to build large and complex scripts. There is definitely a need for the scripting language to match those capabilities, but... I believe there are a couple of real drawbacks to the suggested solution:
- Less readable code
- Major maintenance headaches, for example when later adding or deleting rules inside the skipped range
These were lessons learned by many, many using a multitude of computer languages over 40+ years. Because of this, I vote no to the suggestion. I would much prefer a solution along the following lines:
- A structured IF ... END construct that encapsulates and hides the underlying GOTOs
- The possibility to combine multiple matching rules with AND and OR operators
[quote user="Neil Fraser"]HIGHLIGHT / COLOUR commands
It appears that applying a highlight does not affect the email until the script is complete. I tried setting a colour to an email in my script then testing for this colour later in script, using colour as a marker. Is this modus operandi intentional, or could the highlight command be made to take effect at the point in the script where it is used?[/quote]
AFAIK this applies to all modifications made by the filtering script. Similarly, running an external task against the message is done using a copy, so the external task can not modify the contents of the actual email.
I would welcome a change to the script semantics, making changes visible immediately. This probably has to be discussed further due to possible side effects. Migration of old scripts? When should a MOVE MESSAGE take place and what does that mean for the rest of the script?