Re[2]: MIME(?)-decoding in QT
Hello Peter, On Wed, 25 Feb 2004 16:59:56 +0100 (25.02.2004 20:59 my local time), received Wednesday, February 25, 2004 at 21:56:16 +0500, you wrote about MIME(?)-decoding in QT at least in part: PP if you do similar to solution in PP mid:[EMAIL PROTECTED] and pass it as PP %_var to the function TB! shouldl resolve the %_var but IMHO not PP try to dereference it's content to a possible macro name, shouldn't PP it? Probably, but how to use variable inside script is big question yet -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: MIME(?)-decoding in QT
Hello Januk, On Wed, 25 Feb 2004 17:02:02 -0800 (26.02.2004 06:02 my local time), received Thursday, February 26, 2004 at 19:46:03 +0500, you wrote about MIME(?)-decoding in QT at least in part: JA If you're using text from the clipboard, TB shouldn't evaluate the JA text. If the text is coming from the output of a macro, again TB JA shouldn't evaluate it. The Bat evaluate all before final state -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: MIME(?)-decoding in QT
Hello Januk, On Wed, 25 Feb 2004 09:38:19 -0800 (25.02.2004 22:38 my local time), received Thursday, February 26, 2004 at 19:45:34 +0500, you wrote about MIME(?)-decoding in QT at least in part: JA Why not just escape the %? Because it have to be done by hand, no ways do it automagically -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Alexander, On Thursday, February 26, 2004 at 20:30 GMT +0500, authorities charged Alexander Leschinsky [AL] for writing: AL The Bat evaluate all before final state Really? Can you give me an example where that happens? I didn't think you could dynamically generate templates. Isn't that something of a security risk? -- Thanks for writing, Januk Aggarwal http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Alexander, On Wednesday, February 25, 2004 at 07:04 GMT +0500, special agents were informed that Alexander Leschinsky [AL] leaked: AL As solution can be used trick with creating 128+ macros (one macro for AL each encoded char), but I'm not _so_ crazy Why not just escape the %? %% inserts the character % instead of evaluating a macro. -- Thanks for writing, Januk Aggarwal http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Januk, on Wed, 25. Feb 2004 at 09:38:19 -0800 you wrote: AL As solution can be used trick with creating 128+ macros (one macro for AL each encoded char), but I'm not _so_ crazy Why not just escape the %? %% inserts the character % instead of evaluating a macro. You then would have to use sth like PHP's addslashes(), like %addescapes() which would escape all %s in the string you want to decode - but passing that string to the %addescapes()-function would not work either. TB itself would have to provide a special macro for that. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342). http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello dAniel, Chemists convened on Wednesday, February 25, 2004 at 22:54 GMT +0100 to watch Daniel Hahler [DH] synthesize: DH You then would have to use sth like PHP's addslashes(), like DH %addescapes() which would escape all %s in the string you want to DH decode - but passing that string to the %addescapes()-function would DH not work either. Wait, how is this macro supposedly running? If you're using text from the clipboard, TB shouldn't evaluate the text. If the text is coming from the output of a macro, again TB shouldn't evaluate it. So unless you're hard coding the % symbol in your QT, this should be a non-issue... -- Thanks for writing, Januk Aggarwal http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Alexander, on Wed, 25. Feb 2004 at 07:04:01 +0500 you wrote: dh So this is a problem of the plugin API? Is it not API bug, it's back side of power - any parameter will be interpreted before passing to internal function, and % is prefix for TB macroses, thus - in case of paramater value (for example) [...] Peter%20Palmreuther [...] As solution can be used trick with creating 128+ macros (one macro for each encoded char), but I'm not _so_ crazy And it wouldn't help, AFAICS, as TB tries to express the macro %20Palmreuther in the above case, not just %20. Glad we have Python.. *g -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.7 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342). http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: MIME(?)-decoding in QT
Hello Peter, On Sun, 22 Feb 2004 16:19:50 +0100 (22.02.2004 20:19 my local time), received Tuesday, February 24, 2004 at 04:25:27 +0500, you wrote about MIME(?)-decoding in QT at least in part: PP OK, I thought you maybe meant a more serious solution, not only PP directed to replace '%20' :-) I can't (after some more deep tests) implement DECODEURL - % char broke whole parameter of function - thus, usage original form of URL-encoding string is impossible -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Alexander, On Friday, February 20, 2004 at 7:16:29 PM you [AL] wrote (at least in part): dh do you mean %StrReplace? AL Yes OK, I thought you maybe meant a more serious solution, not only directed to replace '%20' :-) dh That would probably be bad to setup.. AL Not in case of one replacement, full URL-encode will _be_ big headache without a regexp engine capable of executing code in replacement code plus 'hex()' and 'chr()' functions: definitely yes. ,- [ ] | $name = '[EMAIL PROTECTED]'; | $name =~ s/%([0-9a-fA-F]{2})/chr(hex($1))/ge; `- Does the trick quite good ... sadly yet only in Perl :-/ -- Regards Peter Palmreuther (The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1) Reliable software must kill people reliably. -- Andy Mickel http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello dAniel, on Fri, 20. Feb 2004 at 23:52:31 +0100 I wrote: d Installed Python now, but having a last issue.. the %Py macro seems to d make up a new line. It's print, as I just read in the tutorial. Adding a trailing comma should avoid a newline.. says the tutorial.. JFI. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342). http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello dAniel, On Fri, 20 Feb 2004 01:08:13 +0100 (20.02.2004 05:08 my local time) you wrote about MIME(?)-decoding in QT at least in part: dh Any suggestions please? :) Macro from MyMacros -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Alexander, On Friday, February 20, 2004 at 2:24:04 PM you [AL] wrote (at least in part): dh Any suggestions please? :) AL Macro from MyMacros But which one? I've not seen a 'URLDecode' macro there ... Which one would be a replacement then? -- Regards Peter Palmreuther (The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1) Ummm U Ug... I rule and you don't. http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
* dAniel hAhler [EMAIL PROTECTED] writes: The problem is, that the Name is MIME(?) encoded, like this: Peter%20Palmreuther Is it possible to convert %20 back to space or any other special chars to its real value? Python. --8---cut here---start-8--- %_tbvar=Peter%%20Palmreuther %Py( import urllib quoted_string = tb.macro(r'%%_tbvar') print urllib.unquote(quoted_string) ) --8---cut here---end---8--- Carsten -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Carsten Carsten Python. Python!!!??? I've clearly not been paying attention. When did TB! become scriptable in Python??. Its its an extension - where do I get it. Can other languages be used too? Regards Graham -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
* Foster, Graham [EMAIL PROTECTED] writes: Python!!!??? I've clearly not been paying attention. When did TB! become scriptable in Python??. Its its an extension - where do I get it. See http://kaishaku.org/software/tbpyxie/ and take a look at the thread around , | From: [EMAIL PROTECTED] | Subject: Re: TBPyxie (was: SmartBat's Evaluate Function and Order of Operations) | To: [EMAIL PROTECTED] | Date: Thu Feb 05 19:47:14 2004 +0100 | Message-ID: [EMAIL PROTECTED] ` Can other languages be used too? Not with that plug-in. Any why should they? Python is a wonderful language. Carsten -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello Carsten Can other languages be used too? Carsten Not with that plug-in. Any why should they? Python is a wonderful Carsten language. So is Ruby ;) Regards Graham -- Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote: Is it possible to convert %20 back to space or any other special chars to its real value? C Python. I was sure you would come up with that.. :) Now I'm just installing Python. I hope it works with the cygwin version?! We'll see.. C --8---cut here---start-8--- C %_tbvar=Peter%%20Palmreuther C %Py( C import urllib C quoted_string = tb.macro(r'%%_tbvar') what's the 'r' for? C print urllib.unquote(quoted_string) simple.. :) -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 18:24:04 +0500 Alexander Leschinsky wrote: dh Any suggestions please? :) A Macro from MyMacros do you mean %StrReplace? That would probably be bad to setup.. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: MIME(?)-decoding in QT
Hello Peter, On Fri, 20 Feb 2004 15:08:05 +0100 (20.02.2004 19:08 my local time) you wrote about MIME(?)-decoding in QT at least in part: PP But which one? Namely: %StrReplace(text, find, replace) find - %20 replace - Well, anyway - URLDECODE (and URLENCODE) added into TODO for AnotherMacros :-), because replace a set of char in current state will require a lot of nested calls STRREPLACE -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: MIME(?)-decoding in QT
Hello Carsten, On Fri, 20 Feb 2004 16:37:44 +0100 (20.02.2004 20:37 my local time) you wrote about MIME(?)-decoding in QT at least in part: CT Python. And plugin for executing Python scripts (mentioned in KB) -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
* dAniel hAhler [EMAIL PROTECTED] writes: on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote: Is it possible to convert %20 back to space or any other special chars to its real value? Python. I was sure you would come up with that.. :) Now I'm just installing Python. I hope it works with the cygwin version?! We'll see.. I bet it won't work. But the native Windows version is OK. You should also look for a good editor as the provided editor »Idle« is not very good (SPE, Boa Constructor, Emacs, ...) quoted_string = tb.macro(r'%%_tbvar') what's the 'r' for? It declares the string as a »raw string« (you don't need it, it's rather superfluous in this case). Carsten -- http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 18:16:07 +0100 I wrote: d Now I'm just installing Python. I hope it works with the cygwin d version?! We'll see.. It does not.. the plugin requires python23.dll and shuts TB down if it's not found. So I will have to install windows binaries, but that can wait. Thanks anyway. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 22:17:00 +0500 Alexander Leschinsky wrote: CT Python. A And plugin for executing Python scripts (mentioned in KB) What's KB? Knowledge Base? which? -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: MIME(?)-decoding in QT
Hello Carsten, On Fri, 20 Feb 2004 17:16:55 +0100 (20.02.2004 21:16 my local time) you wrote about MIME(?)-decoding in QT at least in part: CT Not with that plug-in. But I'll add Pascal, Basic, C and JavaScript into AnotherMacros (separate interpretators will _not_ needed and Scripting Host _not_ used). Probably I'll add Python, if I'll be able to write language definition. -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: MIME(?)-decoding in QT
Hello dAniel, On Fri, 20 Feb 2004 18:04:55 +0100 (20.02.2004 22:04 my local time) you wrote about MIME(?)-decoding in QT at least in part: dh do you mean %StrReplace? Yes dh That would probably be bad to setup.. Not in case of one replacement, full URL-encode will _be_ big headache -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 18:55:01 +0100 Carsten Thönges wrote: Now I'm just installing Python. I hope it works with the cygwin version?! We'll see.. C I bet it won't work. You won.. :) C But the native Windows version is OK. You should also look for a C good editor as the provided editor »Idle« is not very good (SPE, C Boa Constructor, Emacs, ...) I'll use my beloved JEdit for that.. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: MIME(?)-decoding in QT
Hello dAniel, On Fri, 20 Feb 2004 18:16:07 +0100 (20.02.2004 22:16 my local time) you wrote about MIME(?)-decoding in QT at least in part: dh I hope it works with the cygwin version?! You can use pure-Windows build -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
Re: MIME(?)-decoding in QT
Hello bats, on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote: Is it possible to convert %20 back to space or any other special chars to its real value? C Python. C --8---cut here---start-8--- C %_tbvar=Peter%%20Palmreuther C %Py( C import urllib C quoted_string = tb.macro(r'%%_tbvar') C print urllib.unquote(quoted_string) C ) C --8---cut here---end---8--- Installed Python now, but having a last issue.. the %Py macro seems to make up a new line. I have this: -8 %SETPATTREGEXP=(?:msgid:|Message-ID:\s+)?(?:?)([EMAIL PROTECTED])(?:(?:\?\w)||$)(?:.*from=(.*?))?%- %REGEXPBLINDMATCH=%ClipBoard%- %IF:%SUBPATT=2'':#%- %Py(%- import urllib quoted_string = tb.macro(r'%%SUBPATT=2') print urllib.unquote(quoted_string) )%- %__%IF:'%_lang'='deutsch': schrieb in:%- %__ wrote in# %- mid:%SUBPATT=1; -8 and btw: how would I give a TB macro the result of urllib.unquote? As Python should be straight forward I tried tb.macro(r'%%_author') = urllib.unquote(quoted_string) but no luck.. -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html
Re[2]: MIME(?)-decoding in QT
Hello dAniel, On Fri, 20 Feb 2004 19:04:15 +0100 (20.02.2004 23:04 my local time) you wrote about MIME(?)-decoding in QT at least in part: dh What's KB? Knowledge Base? Yes dh which? http://www.ritlabs.com/kb/ -- Best regards, Alexander http://www.silverstones.com/thebat/TBUDLInfo.html
MIME(?)-decoding in QT
Hello bats, From Peter Palmreuther comes this message-id QT (in mid:[EMAIL PROTECTED]): -8 %SETPATTREGEXP=(?:msgid:|Message-ID:\s+)?(?:?)([EMAIL PROTECTED])(?:(?:\?\w)||$)%- %REGEXPBLINDMATCH=%ClipBoard%- mid:%SUBPATT=1; -8 It supports three ways of inserting msgid from clipboard data and I extended it to put the emails author in there, too: -8 %SETPATTREGEXP=(?:msgid:|Message-ID:\s+)?(?:?)([EMAIL PROTECTED])(?:(?:\?\w)||$)(?:.*from=(.*?))?%- %REGEXPBLINDMATCH=%ClipBoard%- %IF:%SUBPATT=2'':#%- %__%IF:'%_lang'='deutsch':%SUBPATT='2' schrieb in:%- %__%SUBPATT='2' wrote in# %- mid:%SUBPATT=1; -8 The problem is, that the Name is MIME(?) encoded, like this: Peter%20Palmreuther Is it possible to convert %20 back to space or any other special chars to its real value? Any suggestions please? :) -- shinE! http://www.thequod.de ICQ#152282665 GnuPG/PGP key: http://thequod.de/danielhahler.asc Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1 with POPFile 0.20.1 and avast Jan2004 (4.1.342) http://www.silverstones.com/thebat/TBUDLInfo.html