Hallo monsell, Op donderdag 4 augustus 2005, 13:38:25, schreef [EMAIL PROTECTED]:
> could you plse help me out in programming a macro to generate numbers > from 1 to 99999999 as per my previous request? This is no default action for TB. Your desired action can be split in four sub-actions. 1) Get a number from storage. TB can do this in a template with the %Put macro 2) Add 1 to your number TB can do this with the %Calc macro 3) Insert the new result in your message TB can insert your number in the body, the subject or whatever via a template. 4) Overwrite the file with your old number by one with the new number. TB can do this in an outgoing filter, not in a template. This means that you've got to send message 1000, before you can start message 1001 or message 1001 and will have the same reference as 1000. So: No composing of multiple messages at the same time. When the composing of multiple messages at the same time is preferred, you'd need a plug-in. My suggestion would the MyMacros plug-in by Andrew Perevodchik. It can be downloaded from: http://en.barin.com.ua/soft/mymacros/ This has the added advantage that it uses the registry, so you won't need a file, but merely a key in the registry. As the latter is the most elegant, here's a macro sequence that does what you want. You have to add these lines to every new message-, reply- and forwarding template you're using. Of course yu can insert it into a Quick Template and call that QT with the QInclude macro, but then that has to be added to every template. You'll need to install the MyMacros plug-in to make it work. It uses this registry key (peviously unknown to TB): HKEY_CURRENT_USER\Software\RIT\The Bat!\MessageReferenceNumber Look into the MyMacros help file how to install the plug-in. %_RefNo='%RegRead("HKEY_CURRENT_USER\Software\RIT\The Bat!\MessageReferenceNumber", "10000000")'%- %_RefNo='%Calc("%_RefNo" + "1")%- %RegWrite("HKEY_CURRENT_USER\Software\RIT\The Bat!\MessageReferenceNumber","%_RefNo")%- Msg-Ref: %_RefNo As you'd like reference numbers of eight digits, I've taken the liberty to make the sequence start with 10000000. Look in the TB help file and the MyMacros help file for a detailed explanation how the individual macros function. I'm CC-ing this to this to TBUDL, just in case somebody might find a hole in my reasoning. -- Groetjes, Roelof ________________________________________________ Current version is 3.51.10 | 'Using TBUDL' information: http://www.silverstones.com/thebat/TBUDLInfo.html

