<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>www.ritlabs.com [Topic: Complex reply macro]</title>
		<link>http://www.ritlabs.com</link>
		<description>New posts in Complex reply macro of  forum at www.ritlabs.com [www.ritlabs.com]</description>
		<language>en</language>
		<docs>http://backend.userland.com/rss2</docs>
		<lastBuildDateTag>Mon, 27 Oct 2008 00:13:38 +0200</lastBuildDateTag>		<item>
			<title>Complex reply macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic6707/message25685/">Complex reply macro</a></b> <i>Complex reply macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Check the help file:<br />Advanced use -&gt; Regular expressions <br />That contains the info you need<br /><br />BTW In order to change the first character of a string into upper case, you can use the %CapitalFirst="text" macro. &nbsp; <br />
			<i>27 October 2008 00:13:38, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic6707/message25685/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic6707/message25685/</guid>
			<pubDate>Mon, 27 Oct 2008 00:13:38 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Complex reply macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic6707/message25683/">Complex reply macro</a></b> <i>Complex reply macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			OK. Now I'm modifying myself this macro. Can you tell me what does "(?is)" means?<br /><br />In your macro:<br />%SetPattRegExp='<b>(?is)</b>Reference ID: 000000000000 - Access for (.*?) days'%-<br /><br />Beginning of line? What if I'll delete it? Can you explain? <br /><br />Thanks. <br />
			<i>26 October 2008 22:52:42, <a href="http://www.ritlabs.com/en/forums/">Rueler</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic6707/message25683/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic6707/message25683/</guid>
			<pubDate>Sun, 26 Oct 2008 22:52:42 +0200</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Complex reply macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic6707/message25643/">Complex reply macro</a></b> <i>Complex reply macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			The third point is easy. As you defined your autoreplies yourself, you simply set an outgoing filter to delete the messages with subject header that you set for your aurtoreplies and let them delete the message.<br />As oputgoing filters are processed after the message has been sent, you won't have a cluttered Sent Mail folder.<br /><br />Items one and two take a little bit more time and I haven't got that at the moment. <br />
			<i>23 October 2008 15:56:36, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic6707/message25643/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic6707/message25643/</guid>
			<pubDate>Thu, 23 Oct 2008 15:56:36 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Complex reply macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic6707/message25642/">Complex reply macro</a></b> <i>Complex reply macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Wow, I was amazed what can I do with TB! Especially with Filters <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_smile.gif" border="0" data-code=":)" data-definition="SD" alt=":)" style="width:16px;height:16px;" title="" class="bx-smile" />. But reg exp macro is one of the hardest thing to understand for me <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_sad.gif" border="0" data-code=":(" data-definition="SD" alt=":(" style="width:16px;height:16px;" title="" class="bx-smile" />. So, I've tried to modify a little your macro for extended capabilities, unfortunately, with no luck. So can you help me again?<br /><br /><span class="bx-font" style="color:gray">---------------------------------------------------------------------------------------------------------------------------------</span><br /><span class="bx-font" style="color:green"><B>First deal:</B></span><br />Need to force capitalize first letter of donors name and surname (also may be middle name/etc.) For example, I can get this:<br /><br />...that you have received a donation of (.*?) from <B>johhny van john</B>... <br /><br /><I>need to transform to this:</I><br />...that you have received a donation of (.*?) from <B>Johhny Van John</B>... <br /><br />If macro finds correct case, it leaves it untouched.<br /><span class="bx-font" style="color:gray">---------------------------------------------------------------------------------------------------------------------------------</span><br /><br /><span class="bx-font" style="color:gray">---------------------------------------------------------------------------------------------------------------------------------</span><br /><span class="bx-font" style="color:green"><B>Second deal:</B></span><br />How can I leave first name only, deleting middle name/ surname/etc.?<br /><br />This is that I can get (text in italics are comments):<br />Message from Johhny Van John:<br /><i>(or)</i><br />Message from Johhny John:<br /><i>(or)</i><br />Message from Johhny:<br /><i>(or)</i><br />Message from Johhny Zillion Van John:<br /><br /><I>Need to change to this:</I><br />Hi, Johhny,<br /><br /><I>blablabla</I><br /><span class="bx-font" style="color:gray">---------------------------------------------------------------------------------------------------------------------------------</span><br /><br /><span class="bx-font" style="color:gray">---------------------------------------------------------------------------------------------------------------------------------</span><br /><span class="bx-font" style="color:green"><B>Third deal:</B></span><br />I created a subfilters followed by your instructions which makes a messages to be autoreplied. Is it possible to delete autoreplied messages from "SENT MAIL" AUTOMATICALLY?<br /><span class="bx-font" style="color:gray">---------------------------------------------------------------------------------------------------------------------------------</span><br /><br />Thanks in advance. <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_wink.gif" border="0" data-code=";)" data-definition="SD" alt=";)" style="width:16px;height:16px;" title="" class="bx-smile" /> &nbsp; <br />
			<i>23 October 2008 15:32:15, <a href="http://www.ritlabs.com/en/forums/">Rueler</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic6707/message25642/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic6707/message25642/</guid>
			<pubDate>Thu, 23 Oct 2008 15:32:15 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Complex reply macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic6707/message25549/">Complex reply macro</a></b> <i>Complex reply macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Don't make it too difficult.<br />Create a filter that checks whether the sender is your website and the subject contains 'Reference ID: 000000000000' and let that trigger the autoreply we discussed.<br />Now for your information request you set another filter: one that checks for the sender and for 'information request' in the subject header. Create a new reply template for this second filter. <br /><br />Don't try to create one template that checks for every possibility, though it's possible to do so, your template would get way too complicated for easy maintenance.<br /><br />In order to keep your sorting office structured you could create a filter that checks whether the sender is your website and moves the message to a folder. (This is the parentfilter)<br />Next you create a subfilter that checks for the reference ID subject and have that create an autoreply and move the original message to a subfolder (you can use multiple actions in one filter)<br />Finally you create another subfilter that checks for the information request subject and have that filter create its own autoreply and move the message to its own subfolder.<br />As a final touch you could set both subfilters to mark their messages as read.<br />This will sort all messages sent by your website to a folder with two subfolders, the donations and the information requests are sorted in their own subfolder and as they've been handled they're marked as read. Other messages sent by your website are stored in the first folder, but aren't marked as read and therefore you know that you'll have to deal with those yourself.<br />Furthermore, when there will be another type of message that will need an automatic reply, you simply create another subfilter and matching subfolder and the system will be kept going. <br />
			<i>17 October 2008 20:43:49, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic6707/message25549/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic6707/message25549/</guid>
			<pubDate>Fri, 17 Oct 2008 20:43:49 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Complex reply macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic6707/message25548/">Complex reply macro</a></b> <i>Complex reply macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			<B>Roelof</B>, thank you for your exhaustive explanation. It works perfectly! but there is one problem related to this: What do I need to do if I get another than yours example email?<br /><br />For instance (this works good):<br />"SUBJECT": Reference ID: 00000000000 - Access for %_days days<br /><br />but if I get, for instance, this email:<br />"SUBJECT": Information question (or anything else)<br /><br />Then whole your macro script fails. So, if its possible to specify a condition for SUBJECT line? Let's say, if I get email containing this in SUBJECT: "Reference ID: 00000000000 - Access for %_days days", it switches to your macro, but if I get this: Special offer (or anything else), then macro switches to a second condition (default TB! reply). I think this can be done with IF function. But how? <br /><br />Thanks.<br /> <br />
			<i>17 October 2008 19:55:00, <a href="http://www.ritlabs.com/en/forums/">Rueler</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic6707/message25548/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic6707/message25548/</guid>
			<pubDate>Fri, 17 Oct 2008 19:55:00 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Complex reply macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic6707/message25543/">Complex reply macro</a></b> <i>Complex reply macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Try something like this:<br /><br />%SetPattRegExp='(?is)Reference ID: 000000000000 - Access for (.*?) days'%-<br />%RegExpBlindMatch='%OSubject'%- <br />%_Days="%SubPatt='1'"%-<br />%-<br />%SetPattRegExp='(?is)This email confirms that you have received a donation of (.*?) from (.*?) \((.*?)\)'%-<br />%RegExpBlindMatch='%Text'%- <br />%_Amount="%SubPatt='1'"%-<br />%_Name="%SubPatt='2'"%-<br />%_Address="%SubPatt='3'"%-<br />%-<br />%Subject="Thanks for your donation. You can access our website for %_Days days."%-<br />%-<br />%To=""%To="%_Address"%-<br />%-<br />You (%_Name) have donated %_Amount, so you are able to access our website for %_days days.<br />blablabla<br /><br /><br />I didn't test it, there's no fun in that. <br />
			<i>17 October 2008 01:02:17, <a href="http://www.ritlabs.com/en/forums/">Roelof Otten</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic6707/message25543/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic6707/message25543/</guid>
			<pubDate>Fri, 17 Oct 2008 01:02:17 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
		<item>
			<title>Complex reply macro</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum6/topic6707/message25542/">Complex reply macro</a></b> <i>Complex reply macro</i> in forum <a href="http://www.ritlabs.com/en/forums/forum6/">The Bat! - Templates and Macros</a>. <br />
			Hi, I have a headache <img src="http://www.ritlabs.com/bitrix/images/main/smiles/5/icon_smile.gif" border="0" data-code=":)" data-definition="SD" alt=":)" style="width:16px;height:16px;" title="" class="bx-smile" /> for creating a quite complex reply macro in TB. Can anyone help?<br /><br />I created a drawing of my problem:<br /><noindex><a href="http://i35.tinypic.com/or55qu.jpg" target="_blank" rel="nofollow">http://i35.tinypic.com/or55qu.jpg</a></noindex><br /><br />Supplement:<br />1. It can be two/three/etc. surnames.<br />2. It can be EUR and USD only.<br /><br />Thanks for help. <br />
			<i>16 October 2008 23:55:21, <a href="http://www.ritlabs.com/en/forums/">Rueler</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum6/topic6707/message25542/</link>
			<guid>http://www.ritlabs.com/en/forums/forum6/topic6707/message25542/</guid>
			<pubDate>Thu, 16 Oct 2008 23:55:21 +0300</pubDate>
			<category>The Bat! - Templates and Macros</category>
		</item>
	</channel>
</rss>
