Hello MarkB,
slowly I'm recovering of having not only a new workstation with windows7 but also a new server with windows 2008RP (my old one (8 years) didn't like the weather we had lately - 35 Celsius (about 95 Fahrenheit)) Which was no good for my budget...
Many things which worked fine with the old server, dont work anymore (for my old C5450 Oki has no Printer driver for 2008RP, etc, etc). Of cause there are also good things about - one is a new fax printing facilty.... They go directly to the server, tzhe server send s me a mail a filter lets me know that a fax has arrived and with the help of an old MarkB script (the one you wrote for some bill arriving within an attachment) it shows up on my sceen and I can print it (or not if it's trash).
It works fine - almost fine: After anouncing, that a fax has arrived, I get the message that this is no TIF file, even when it is one. So there must be somewhere hidden a command, which I have not correctly adapted. Can you tell me where?
Here is how it looks:
{ ABC Fax Script
( Feedback version
( Redefine the $docname variables as needed
Set $docname_part1 "FAX"
Set $docname_part2 ".TIF"
{ Feedback Message
{ May be removed after the filter is debugged
MessageBox "Neuer Fax ist eingetroffen, wenn Dokument offen, Druckbefehl (Ctrl-P, dann ENTER) geben, Ausdruck Götz ins Fach legen und Programm (Alt-D, B)beenden"
{ From the selected or current message, extract the full path
{ and name of the attached file, assign it to the string $a,
{ and open the file.
Set &docfound False
{Lowercase $docname_part1
Lowercase $docname_part2
ReadAttached $attachmentlist %message
TrimLines $attachmentlist
LineCount #n $attachmentlist
If #n > 0 Then EndIfNattachments
MessageBox "Faxdruck PocoScript\nERROR: this message has no attachment"
Exit
:EndIfNattachments
{ Set $t "Faxdruck PocoScript\nLIST OF ATTACHMENTS\n\n"
{ AddStrings $t $attachmentlist
{ MessageBox $t
:MainLoop
Dec #n
If #n < 0 Then EndMainLoop
GetLine $a #n $attachmentlist
Lowercase $a
{Set &b1 $docname_part1 ^ $a
Set &b2 $docname_part2 ^ $a
And &b1 &b2
Not &b1
If &b1 Then MainLoop
Set &docfound True
Call OpenDoc
Goto MainLoop
:EndMainLoop
If &docfound Then EndIfDocfound
MessageBox "Faxdruck PocoScript\nERROR: Fax not in attachment list"
Exit
:EndIfDocfound
Exit
:OpenDoc
{ Feedback Messages
FileExists &flag $a
If &flag Then FileFound
Wait 4
FileExists &flag $a
If &flag Then FileFound
Set $t "Faxdruck PocoScript\nERROR: can't find the file "
AddStrings $t $a
MessageBox $t
Exit
:FileFound
If ".TIF" ^ $a Then EndIfTIF
MessageBox "Faxdruck PocoScript\nFYI: the attachment is not a TIF document"
:EndIfTIF
{If "FAX" ^ $a Then EndIfFAX
{MessageBox "Faxdruck PocoScript\nFYI: 'Fax' is not in the document's name"
{:EndIfFAX
{ Open the document
{ The next 3 lines may be removed after the script and filter
{ have been debugged
{Set $t "Faxdruck PocoScript\nNow attempting to open the document "
{AddStrings $t $a
{MessageBox $t
Execute $a
Return
Thank you,
ente
P.S. Within the next weeks I will also look at the other versions for the mail printing with additional text. For the time being, I still use that first version