[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 - strange behavior

strange behavior

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

strange behavior

Postby ente » Mon Jun 08, 2009 10:47 pm

Hello,

:oops: for almost ten years i'm using the following script together with a post send filter which moves the message to another directory and makes a print of the message.


Code: Select all
External $userdata1 "Choose a character to quote message with:" ">"
External $userdata1 "Choose a character to quote message with:" ">"
External $userdata1 "Choose a character to quote message with:" ">"
{### Reply to Mail from ZVAB with Template
{----------
{v1.0 - 2002.02.11 - Roger Leemann / Götz Perll
{ Copy of "Reply with Template"
{----------
{ This script will reply to a message from a saved template
{ Usage: not suitable for automatic use; use only on demand.

    { Initialize user settings: }
External $userdata1 "Choose a character to quote message with:" ">"
External $userfile1 "Create body template" "Zvab_ErstbestellerVorausRechnungRpl.txt "

CreateMessage %m
ReadHeader $a Subject %message
AddStrings $subject "Bestätigung mit Vorausrechnung der "
AddStrings $subject $a
SetHeader %m Subject $subject

OpenBody $Body $userfile1
ReadHeader $From From %message
{AddTo %m $From}

    { If template file exists load it }   
FileExists &F $userfile1
if &F then UseBody

    { Otherwise, use a blank template }
Set $a "MESSAGE BODY TEMPLATE CURRENTLY NOT SET"
AppendBody $a " "
AppendBody $a " "
AppendBody $a "To use this script, please setup a default message body template:"
AppendBody $a " "
AppendBody $a "    press F9 to open Filters and Scripts window, then click on Setup Script."
AppendBody $a "    From the drop down box select script \"Reply with Template\"."
AppendBody $a "    Click on the Create Body Template button to create a template."
AppendBody $a "    When done, just click on File, Save."
goto Edit

:UseBody
set $a $Body

:Edit
ReadBody $b %message

{v1.0 delete certain lines with information that the adresseee shouldn't see

LineCount #i $b
{ Lines are numbered 0..n-1
:FindLoop
Dec #i
If #i < 0 Then ExitFindLoop
GetLine $line #i $b
StringPos #j "E-Mail: " $line
If #j < 1 Then FindLoop
StringPos #j "perll@abc-buch.ch" $line
If #j > 0 Then FindLoop
StringPos #j "info@zvab.com" $line
If #j > 0 Then FindLoop
{ At this point, the string $line contains "E-Mail: "
{ and not "perll@abc-buch.ch" or "info@zvab.com"
ChopString $line 1 8
AddTo %m $line
:ExitFindLoop

:DGP
set #ll -1
LocateLine #ll "Bestellung über ZVAB bei:" $b
if #ll > -1 then DL1
goto FL2
:DL1
DeleteLine $b #ll 12

:FL2
set #l -1
LocateLine #ll "Zum Bearbeiten" $b
if #ll > -1 then DL2
goto FL3
:DL2
 DeleteLine $b #ll 2

:FL3
set #ll -1
LocateLine #ll "Diese Bestellung wurde" $b
if #ll > -1 then DL3
goto FL4
:DL3
DeleteLine $b #ll 21

:CONT
QuoteBody $b $UserData1
AppendBody $a " "
AppendBody $a $b
AssignBody %m $a
appendsignature %m
EditMessage %m
MarkMessage %message 2


Now, when running the script and having the template file

"Zvab_ErstbestellerVorausRechnungRpl.txt"

showing on the display, th4e first line reads:

%body%

I tried all kind of things with my old script, but find nothing which gets the message rid of this body command. Can anybody help?
ente

BTW: Could it have to do with 4.8.4400, have there been any changes to the script handling
ente
Resident Poster
 
Posts: 182
Joined: Mon Sep 27, 2004 7:17 am
Location: Zurich, Switzerland

Postby gavinjb » Wed Aug 19, 2009 9:45 am

Hi,

Are you still having problems with your script?

If you are can you post a sample of your template and I will have a play and see what happens when I try it on my setup.
gavinjb
Frequent Visitor
 
Posts: 56
Joined: Mon Jan 24, 2005 11:41 pm
Location: Reading, UK


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron