🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #265137

Re: [dialog] Can I set dialog to edit in Notepad++

#265137
From: Bernd Rose
Date: Fri, 13 Aug 2021 17:26
51 lines
3998 bytes
On Fr, 13th Aug 2021 18:23:02 +0200, bill wrote:

>> http://web.archive.org/web/20120127150159/http://dialog.datalist.org/scripts/ScriptSaveOutboundMessage.html
[...]
> After changing the program below from "korrnews" to "notepad++", 
> since I already have an OnBeforeSendingMessage script, do I just 
> concatenate this after the existing OnBeforeSendingMessage script?

In theory: You mix both scripts into one and order the commands in
a logical way during that mixing.

In practice: You don't do it, at all!

Having the right commands at hands isn't even half of it. Placing
such a call to an external editor in OnBeforeSendingMessage cries
out for problems. You'd need to hit <Send> inside the 40tude Compose 
window before even beginning with editing. You sure could add a
return value of failure to this script, which would bring you back
to the editor. If you do not return, but send unconditionally, you
loose the ability to cancel a post. Of course, you can add another
inquiry ("Send or not?") to the script. But this would, again, just
increase complexity.

Sometimes, you may wish just to send a message without the detour
to Notepad++. Permitting this, requires additional code. As would
returning from Notepad++, cancelling the send, changing a bit within 
the 40tude Compose window and /then/ send.

Because 40tude assigns charsets on-the-fly, your saved intermediate
text file could have /any/ encoding. After loading the text inside
Notepad++, you may need to adjust the encoding to avoid the creation
of mixed-encoding texts. (Which will lead to wrong characters after
sending.) Reloading the text into the 40tude text buffer may again 
result in a misinterpretation of the current charset and encoding 
errors. (When loading from disk, 40tude has not the means to deduce
the charset, that it has when accepting input from keystrokes.)

And on top of all that: The current korrnews script expects the text
back from the external program after 5 seconds. You sure could tinker
with this value without problems. But do you know a time span, which
is long enough for your longest (or most researched and revised)
texts as well as not too long for your quickest responses? - Most
likely not. So you'd need to walk a /completely/ different path.

And there is more to be considered...

It wasn't by accident, that I initially recommended to /not/ pursue
the approach of calling an external editor by 40tude Dialog script.
And I /still/ strongly advise you, to leave this matter be...

Bernd
Technical Details
Message-ID: <uci12ip228kn.dlg@b.rose.tmpbox.news.arcor.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <sevelu$1qrk$1@gioia.aioe.org> <l01qbjvknuqe.dlg@v.nguard.lh> <sf0pg9$16vs$1@gioia.aioe.org> <20210811163605.abc503d2af7b32d36dd31e34@127.0.0.1> <sf12g8$1bn1$1@gioia.aioe.org> <aje23prjgwng.dlg@v.nguard.lh> <sf23af$18a9$1@gioia.aioe.org> <1qaeainv3x9gl$.dlg@b.rose.tmpbox.news.arcor.de> <sf3f6h$k0u$1@gioia.aioe.org> <86lyjunafj21$.dlg@b.rose.tmpbox.news.arcor.de> <70r516k5wr9t$.dlg@v.nguard.lh> <1lo779jiegvl3$.dlg@b.rose.tmpbox.news.arcor.de> <sf4ube$r5v$1@gioia.aioe.org> <an0k6nzbgcqh$.dlg@b.rose.tmpbox.news.arcor.de> <sf668m$408$1@gioia.aioe.org>

Show Full Headers
Complete Article Headers
Message-ID: <uci12ip228kn.dlg@b.rose.tmpbox.news.arcor.de>
Subject: Re: [dialog] Can I set dialog to edit in Notepad++
Date: Fri, 13 Aug 2021 19:26:36 +0200
From: Bernd Rose <b.rose.tmpbox@arcor.de>
References: <sevelu$1qrk$1@gioia.aioe.org> <l01qbjvknuqe.dlg@v.nguard.lh> <sf0pg9$16vs$1@gioia.aioe.org> <20210811163605.abc503d2af7b32d36dd31e34@127.0.0.1> <sf12g8$1bn1$1@gioia.aioe.org> <aje23prjgwng.dlg@v.nguard.lh> <sf23af$18a9$1@gioia.aioe.org> <1qaeainv3x9gl$.dlg@b.rose.tmpbox.news.arcor.de> <sf3f6h$k0u$1@gioia.aioe.org> <86lyjunafj21$.dlg@b.rose.tmpbox.news.arcor.de> <70r516k5wr9t$.dlg@v.nguard.lh> <1lo779jiegvl3$.dlg@b.rose.tmpbox.news.arcor.de> <sf4ube$r5v$1@gioia.aioe.org> <an0k6nzbgcqh$.dlg@b.rose.tmpbox.news.arcor.de> <sf668m$408$1@gioia.aioe.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Injection-Info: solani.org; logging-data="27413"; mail-complaints-to="abuse@news.solani.org"
Lines: 50
X-User-Id: eJwNxMkBwCAIBMCWkGMXywGV/ktI5jFhWDh0BDwmhv/mCz1QKb9nR0KzN2OrloXQVrlItnvQBFLNw2byPcxFZ99xFa0i6wOGThjU
Mime-Version: 1.0
Cancel-Lock: sha1:VRX1wX1a1Fkj8GzgkHcE7tY6nBY=
Content-Transfer-Encoding: 7bit
User-Agent: 40tude_Dialog/2.0.15.41 (8ac073d7.242.349)
Content-Type: text/plain; charset="us-ascii"
Newsgroups: news.software.readers