[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 - Passing Flag back to Filters from Script

Passing Flag back to Filters from Script

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Passing Flag back to Filters from Script

Postby SFCurley » Tue Aug 10, 2004 4:08 am

Is there a way to set somekind of a boolean flag inside of a script and then have it available in the regular filters?

If not, I can do the work inside the script, but was just curious.
SFCurley
 

Postby robin » Tue Aug 10, 2004 4:14 am

How do you see this working? I was wondering if you could set a flag by creating a file (for example) and checking for the presence or otherwise but it would be interesting to understand what you are trying to do.

Having said that, there are people around who are far more experienced in PocoScript and Filters than I am.
robin
 

Postby SFCurley » Tue Aug 10, 2004 4:33 am

I want to create separate "filter" files that will have certain keywords. If an email subject or address line matches any of those keywords, I'd move the message to a specific mailbox. I know about the %file% comparator available in the filters, but it matches partially BOTH ways, which I don't like, so I was going to create my own function that passes back a boolean value.

I had thought of the file "semaphore" approach, but it seems so kludgey.

Like I said, I can do all the moving inside the script, but was just wondering if I could have something in the filters that said:

step 1: call comparison script
step 2: if flag=true then move,
steip 3, etc: other actions

Thanks much.
SFCurley
 

Postby Hogyt » Tue Aug 10, 2004 6:16 am

Your script could add or modify a header and then the filter could react to that but it's probably easier to do it all from within the script.
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

Postby Michael » Tue Aug 10, 2004 3:42 pm

SFCurley wrote:Like I said, I can do all the moving inside the script, but was just wondering if I could have something in the filters that said:

step 1: call comparison script
step 2: if flag=true then move,
steip 3, etc: other actions

Thanks much.


I have requested this (and more) as enhancements to PocoScript. See item 407 in Bug Traction.
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