Article View: news.software.readers
Article #261414Re: Request help with 40tude dialog program syntax
From: Stijn De Jong
Date: Sat, 31 Dec 2016 22:46
Date: Sat, 31 Dec 2016 22:46
92 lines
4513 bytes
4513 bytes
Op Sat, 31 Dec 2016 16:11:33 -0600, VanguardLH schreef: > Okay, I'll bite. Why do you have to remove Dialog's own generated > Message-ID header that you told it to add instead of just configuring > Dialog to not add the header in the first place (and have the server add > its own MID header)? Your question makes complete sense since you didn't realize that those were just simplified strings for the variable "Remove_Headers". So it's my fault for saying that the value of the Remove_Headers will change depending on the need - but the value of the Remove_Headers never was the question. So I just put arbitrary values for Remove_Header in the post because the actual value of the "Remove_Headers" variable is not in the least relevant to the stated problem. But the fact you asked the question shows you are both thinking, and you know that 40Tude allows the user to turn off dialog=-generated message ids, so I appreciate your acumen. > I do NOT have Dialog add a MID header. I let the > server add the MID header. I completely undersstand. You can have the server set the date also. These are dialog-related facts which are completely outside the problem set though, which is that I'm having trouble with the syntax of setting the Remove_Headers variable depending on the id of the outgoing sender. > If you configure > Dialog to NOT add a MID header then there isn't one to remove. Yup. But that doesn't change the problem set in the least. :) > Sorry, I've not bothered to lie about what NNTP client that I use or > keep it a secrete so I don't know how to configure Dialog to not add a > UA header. It's super easy to do that! 1. Load this script: http://dialog.datalist.org/scripts/RemoveHeaders.html 2. Set this variable: Remove_Headers='User-Agent: '; 3. Voila! No user-agent header. The problem never was removing the headers. Nor was the problem figuring out who the sending id is: The problem is the syntax for melding those two scripts together so that the script can choose which headers to remove based on the sending id. Specifically, I can't seem to set the Remove_Header to one thing in one part of the script, and then change it to another thing in the line just below the first. That's weird. We should be able to do something like this: variable = 1 echo $variable <===== this should output "1" variable = 2 echo $variable <===== this should output "2" For whatever syntax reason, I can't re-define the "Remove_Headers". > For more detailed info about how to write macros on events in Dialog, > and since you cross-posted to the news.software.readers newsgroup, you > might want to wait until Bernd Rose shows up. He knows the inner > workings of Dialog and better understands the internal structures and > variables known and used by Dialog. OK. I've had this problem for months, so I can wait for Bernd Rose to show up. > For scripting in Dialog, you use ":=" to assign/test a value to/of a > variable, not "=". You should not attempt to "redefine that variable" > in an if-statement. While it is doable, like in C, it means you are > trying to alter the value on which you intent to test its value. In a > for-statement, yes, you do want to change the variable's value on each > iteration of the for-loop but you do not change its value when testing > the current value of the variable. My main stumbling problem is why can't I just do this? Remove_Headers='whatever'; Remove_Headers='something else';
Technical Details
Message-ID:
<o49cgp$fuv$1@news.mixmin.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mailReferences:
<o491jh$7jr$1@gioia.aioe.org> <ecqoolFe6djU1@mid.individual.net>Show Full Headers
Complete Article Headers
Message-ID: <o49cgp$fuv$1@news.mixmin.net> Subject: Re: Request help with 40tude dialog program syntax Date: Sat, 31 Dec 2016 23:46:40 +0100 From: Stijn De Jong <stijndekoning@nlnet.nl> References: <o491jh$7jr$1@gioia.aioe.org> <ecqoolFe6djU1@mid.individual.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail Newsgroups: news.software.readers,alt.windows7.general Organization: Mixmin Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Injection-Date: Sat, 31 Dec 2016 22:46:50 -0000 (UTC) Injection-Info: news.mixmin.net; posting-host="9fb37b91fb7cf5fe2e9162f1c248483ef2e4eb75"; logging-data="16351"; mail-complaints-to="abuse@mixmin.net" X-Received-Body-CRC: 3896913216 X-Received-Bytes: 4440