🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #261409

Re: Request help with 40tude dialog program syntax

#261409
From: Stijn De Jong
Date: Sat, 31 Dec 2016 21:08
69 lines
3928 bytes
Op Sat, 31 Dec 2016 20:43:21 +0000 (GMT), Rodney Pont schreef:

> For a start if you define it as a constant it's not a variable and
> can't(shouldn't) be redefined. I don't recognise the syntax of this
> scripting language so I'm guessing a bit(lot) :-)

I understand. 
The scripting language is foreign to me too. :)

Each of the scripts works alone, so all I was really trying to do was meld
them so that I could redefine the "thing" that is "Remove_Headers" based on
the identity which appears to be either "id1" or "id2" as shown in the log
file from my last post:
3 13411140: Sending message to alt.windows7.general,news.software.readers
(Started) [$00000F44]
3 13411140: Connecting to NNTP (SSL) news.mixmin.net:563 [$00000F44]
7 13413796:   fromIdentity = id1
7 13413796:   newsgroupIdentity = id2
7 13413796:   serverIdentity = id2
3 13413781: Connected to NNTP news.mixmin.net:563 [$00000F44]
3 13413781: Posting message to NNTP server [$00000F44]
3 13414781: Posting sent successfully: Article received
<o495ph$1t8$1@news.mixmin.net>;  (Finished) [$00000F44]

> It looks as if you define a string as
> 
> Remove_Headers : String
> in the var section.

I don't see a "section" for variables, but I think I agree with you that at
some point we simply define the variable "Remove_Headers".

I've defined it in a variety of places in the script and if I only define
it once, it seems to work. But my whole point is to define it based on the
identity (either id1 or id2) which is where I get the errors.

> If you want to use that variable outside of a function don't define it
> within a function call, you need to define it at the beginning of the
> script so that it has global context.

I can define the variable Remove_Headers almost anywhere, but I seem to
only be able to do that once. If I later redefine it inside of the
procedure that determines if it's id1 or id2 that is posting, then the
redefinition of Remove_Headers always fails with a duplicate identifier
error. 

That's really my block that is stumbling me!

> If it's defined within a function
> call it only has context within that function and the value will not be
> carried outside of it.

It works to define it in the first two lines of the script:
const
Remove_Headers='User-Agent: ,Message-ID: ';
// Remove_Headers='User-Agent: ,Content-Transfer-Encoding: ';
// Remove_Headers='User-Agent: ,Mime-Version: '; 

That works just fine.
Of course, I manually have to uncomment whichever Remove_Header variable I
want to use to post with. But that works fine.

The only thing I'm trying to add is to automatically re-define the
Remove_Header based on the id1 or id2.

I must have the definition syntax wrong because it won't work whenever I
define Remove_Headers for a second time.

That's really, I think, my syntax block of stumbling.
Technical Details
Message-ID: <o496o2$3tt$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-mail
References: <o491jh$7jr$1@gioia.aioe.org> <nfcnzpzcvasbuvgzrhx.oj2tg71.pminews@ouse.infohit.me.uk> <o493u0$u1j$1@news.mixmin.net> <nfcnzpzcvasbuvgzrhx.oj2vg93.pminews@ouse.infohit.me.uk>

Show Full Headers
Complete Article Headers
Message-ID: <o496o2$3tt$1@news.mixmin.net>
Subject: Re: Request help with 40tude dialog program syntax
Date: Sat, 31 Dec 2016 22:08:10 +0100
From: Stijn De Jong <stijndekoning@nlnet.nl>
References: <o491jh$7jr$1@gioia.aioe.org> <nfcnzpzcvasbuvgzrhx.oj2tg71.pminews@ouse.infohit.me.uk> <o493u0$u1j$1@news.mixmin.net> <nfcnzpzcvasbuvgzrhx.oj2vg93.pminews@ouse.infohit.me.uk>
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: alt.windows7.general,news.software.readers
Organization: Mixmin
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 31 Dec 2016 21:08:19 -0000 (UTC)
Injection-Info: news.mixmin.net; posting-host="9fb37b91fb7cf5fe2e9162f1c248483ef2e4eb75";
 logging-data="4029"; mail-complaints-to="abuse@mixmin.net"
X-Received-Body-CRC: 571835171
X-Received-Bytes: 3853