Re: Attachment list
Hi On Friday 10 July 2009 at 11:08:16 AM, in mid:1497270830.20090710200...@wai.com.au, Ian A. White wrote: Unfortunately it does not really do much. First the result after using the QT's from silverstones. Both versions do the same thing. Attachments: Regulation of the Engineering Profession.doc, Regulation of the Engineering Profession.pdf [...] Weird. Testing it does not work here either. The modified version I use to list original attachments to a forwarded message still works for me in a reply or forward. = Oattachments_one_per_line_1 = %REM='obtained from http://cgi.silverstones.com/library.php?category=General+Macro written by Matthias Appel in oct. 2001 revised to cover %Oattachments instead of %attachments'%- %- %IF:%Oattachments=none:none:%_COMMENT='%Oattachments'%- %QT='Oattachments_one_per_line_2'%- = Ends = Oattachments_one_per_line_2 = %IF:%SETPATTREGEXP='(?i)^.*?(,).*$'%REGEXPMATCH='%_COMMENT'=,:%- %SETPATTREGEXP='(?i)^\s*(.*?)\s*,.*$'%REGEXPMATCH='%_COMMENT' %_COMMENT='%SETPATTREGEXP=@(?i)^.*?,\s*(.*)\...@%regexpmatch=%_comment'%Qt='Oattachments_one_per_line_2':%_COMMENT%- %_COMMENT=''%- = Ends The third line of the above 4 lines will wrap. What I am looking for is something that lists each attachment on its own on a separate line as in: Attachments: - Regulation of the Engineering Profession.doc - Regulation of the Engineering Profession.pdf That's what my Oattachments_one_per_line QTs produce for me when listing the attachments to the original message being forwarded or replied to. The problem with long filenames is that you can use , in the filename, and there does not have to be an extension. As such trying to search for a , or a file extension is likely to have issues. Yep, reformatting the listing by searching for commas and dots would not help there! Maybe what is needed is for the macro to have an option such as %ATTACHMENTS(1) means one attachment per line and %ATTACHMENTS does things the way they currently are. I don't understand why anybody would _want_ them listed on one line anyway. One per line is much easier to read :-; -- Best regards, MFPA Beware the deadly donkey falling slowly from the sky Using The Bat! v4.0.38 on Windows XP 5.1 Build 2600 Current version is 4.2.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Attachment list
Dear List, RA Create a Quick Template called AttList as follows RA %If:%_FirstTime=:#%- RA %%_FirstTime=No%- RA %%If:%Attachments=none:%- RA %_:%- RA %_%-Attachments: RA %_%_Att_List='%Attachments,'%- RA %_%Qinclude(AttList)#:#%- RA %%If:%_Att_List:%- RA %_%SetPattRegexp='(?i)^(.*?),\s*(.*)$'%- RA %_%RegexpBlindMatch='%_Att_List'%- RA %_%- * %SubPatt='1' RA %_%_Att_List=%SubPatt='2'%- RA %_%Qinclude(AttList):%- RA %_%- RA %#%- Unfortunately when using the QT, it crashes The Bat!. It simply shuts down instantly and nothing gets written to the exception log. That's strange. I just copied and pasted the code from my email into a new QT and it worked perfectly. Works perfectly here too... -- Vernon Current version is 4.2.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Attachment list
Hi On Wednesday 8 July 2009 at 5:32:23 AM, in mid:1317465342.20090708143...@wai.com.au, Ian A. White wrote: G'day Robin, On Wednesday, July 8, 2009, at 1:31:30 PM, you (Robin Anson) wrote: RA Create a Quick Template called AttList as follows RA %If:%_FirstTime=:#%- %%_FirstTime=No%- RA %%If:%Attachments=none:%- %_:%- RA %_%-Attachments: RA %_%_Att_List='%Attachments,'%- RA %_%Qinclude(AttList)#:#%- RA %%If:%_Att_List:%- RA %_%SetPattRegexp='(?i)^(.*?),\s*(.*)$'%- RA %_%RegexpBlindMatch='%_Att_List'%- RA %_%- * %SubPatt='1' RA %_%_Att_List=%SubPatt='2'%- RA %_%Qinclude(AttList):%- %_%- RA %#%- Unfortunately when using the QT, it crashes The Bat!. It simply shuts down instantly and nothing gets written to the exception log. The solution at http://www.silverstones.com/thebat/Library.html is:- Attachments listing [ General Macro]Reformat the listing of attachments Added to the Library by Matthias Appel Create the following quick templates (handles are in [brackets] - see below for v2 versions): ==[ AT1 ] [TB! version 1 variant snipped] =[ End QT ]== After adding the attachments to your email you can write at1 and hit ctrl+space to get the listing. Version 2 adaptation: ==[ AT1 ] %REM='written by Matthias Appel in oct. 2001' %IF:%ATTACHMENTS=none::Attachments: %_COMMENT='%ATTACHMENTS'%- %QINCLUDE='at2'%- =[ End QT ]== ==[ AT2 ] %IF:%SETPATTREGEXP='(?i)^.*?(;).*$'%REGEXPMATCH='%_COMMENT'=;:%- %SETPATTREGEXP='(?i)^\s*(.*?)\s*;.*$'%REGEXPMATCH='%_COMMENT' %_COMMENT='%SETPATTREGEXP=_(?i)^.*?;\s*(.*)\s*$_%REGEXPMATCH=_%_COMMENT_'%- %QINCLUDE='at2':%_COMMENT%- %_COMMENT=''%- =[ End QT ]== I am using a slight adaptation in a forwarding template to list the attachments to the original message, as at some point I had an issue with attachments not always tagging along when I forwarded a message. -- Best regards, MFPA Reality is nothing but a collective hunch. Using The Bat! v4.0.38 on Windows XP 5.1 Build 2600 Current version is 4.2.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Attachment list
Hi On Wednesday 8 July 2009 at 2:14:18 AM, in mid:19210397996.20090708111...@wai.com.au, Ian A. White wrote: I use the %ATTACHMENTS macro to list the attachments I send in an e-mail to make sure that the recipient gets them all, however the attached filenames all appear on a line wrapped. With filenames allowed to have spaces, this causes issues with a filename breaking across more than one line. You could use underscore_characters_instead_of_spaces (-; Is there any way to list the attachments one per line with the %ATTACHMENTS macro? Yes. Try http://www.silverstones.com/thebat/Library.html and look for Attachments Listing Be sure to follow version 2 instructions. -- Best regards, MFPA Don't cry because it is over - smile because it happened Using The Bat! v4.0.38 on Windows XP 5.1 Build 2600 Current version is 4.2.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Attachment list
On Wed, 8 Jul 2009 at 03:28:23 +0100, MFPA wrote: On Wednesday 8 July 2009 at 2:14:18 AM, in mid:19210397996.20090708111...@wai.com.au, Ian A. White wrote: I use the %ATTACHMENTS macro to list the attachments I send in an e-mail to make sure that the recipient gets them all, however the attached filenames all appear on a line wrapped. With filenames allowed to have spaces, this causes issues with a filename breaking across more than one line. Is there any way to list the attachments one per line with the %ATTACHMENTS macro? Yes. Try http://www.silverstones.com/thebat/Library.html and look for Attachments Listing Be sure to follow version 2 instructions. It doesn't seem to be responding, but I use the following, which I think I took from the TB Library. Create a Quick Template called AttList as follows %If:%_FirstTime=:#%- %%_FirstTime=No%- %%If:%Attachments=none:%- %_:%- %_%-Attachments: %_%_Att_List='%Attachments,'%- %_%Qinclude(AttList)#:#%- %%If:%_Att_List:%- %_%SetPattRegexp='(?i)^(.*?),\s*(.*)$'%- %_%RegexpBlindMatch='%_Att_List'%- %_%- * %SubPatt='1' %_%_Att_List=%SubPatt='2'%- %_%Qinclude(AttList):%- %_%- %#%- -- Robin Using The Bat! v4.1.11 Windows Vista 6.0 Build 6002 Service Pack 2 Popfile v1.1.0 Current version is 4.2.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html
Re: Attachment list
On Wed, 8 Jul 2009 at 14:32:23 +1000, Ian wrote: G'day Robin, On Wednesday, July 8, 2009, at 1:31:30 PM, you (Robin Anson) wrote: RA Create a Quick Template called AttList as follows RA %If:%_FirstTime=:#%- RA %%_FirstTime=No%- RA %%If:%Attachments=none:%- RA %_:%- RA %_%-Attachments: RA %_%_Att_List='%Attachments,'%- RA %_%Qinclude(AttList)#:#%- RA %%If:%_Att_List:%- RA %_%SetPattRegexp='(?i)^(.*?),\s*(.*)$'%- RA %_%RegexpBlindMatch='%_Att_List'%- RA %_%- * %SubPatt='1' RA %_%_Att_List=%SubPatt='2'%- RA %_%Qinclude(AttList):%- RA %_%- RA %#%- Unfortunately when using the QT, it crashes The Bat!. It simply shuts down instantly and nothing gets written to the exception log. That's strange. I just copied and pasted the code from my email into a new QT and it worked perfectly. -- Robin Using The Bat! v4.1.11 Windows Vista 6.0 Build 6002 Service Pack 2 Popfile v1.1.0 Current version is 4.2.6 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html