[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 - script not working

script not working

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

script not working

Postby ericjacobowitz » Wed May 25, 2005 7:41 am

I have the following script to move messages from a highlighted folder to TRASH, but it is not working. When I try to run the script, the message is not being moved tothe trash folder. I highlight some messages in the SENT folder and try to run the script, but nothing happens Here is my script

Code: Select all
### Archive Old Mail
{ Script will archive any selected messages older
{ than a specified number of days to a specified folder
{ Usage: best used on Selected messages
{ To try it out, select some messages, setup this script
{ in Scripts/Setup, then run it in Scripts/Settings by
{ selecting it along the bottom and clicking on Now button
    { Initialize user settings: }
External $userdata1 "Archive messages older than: (days)" "10"
External $userdata2 "Which mailbox should I archive them to:%mailboxes%" "Trash"
    { Make sure message is appended to mailbox }
AppendToFile True
    { Get today's date }
GetDate $todaydate
    { Get message's date }
ReadHeader $messagedate "Date:" %message
    { Calculate the message age }
SubDays #diff $todaydate $messagedate
    { Compare the age to user setting }
if #diff > $userdata1 then PerformCopy
    { Exit if the difference is not greater }
Exit
    { If true, jump here and archive the message }
:PerformCopy
    { Load the mailbox filepath information }
AddStrings $UserData2 ".mbx"
SaveMessage %message $UserData2
    { Finally, deleting the original message }
DeleteMessage %message


Edit Eric: inserted code tags
Eric Jacobowitz
ericjacobowitz
Resident Poster
 
Posts: 147
Joined: Tue Apr 19, 2005 12:52 am

Postby Michael » Thu May 26, 2005 3:00 am

Hi Eric,

I am going to be away for a few days so I won't be able to assist with this. Hopefully someone will pick this up for you and try to provide a solution. (Off hand I'm not sure the ".mbx" extension is necessary but I can't be 100% certain of that).
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby Michael » Sat Sep 17, 2005 4:19 am

Following up, admitted very late, I just ran this script and it ran properly in my setup. Eric, if you are still interested in this please post back and I'll try to figure out what is different about your setup.
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 0 guests

cron