🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #259450

Re: [Dialog] Adding Plonk Filter VIA Script

#259450
From: Sqwertz
Date: Tue, 25 Aug 2015 17:12
60 lines
3859 bytes
On Sat, 22 Aug 2015 19:27:52 +0200, Bernd Rose wrote:

> On Sa, 22 Aug 2015 10:52:32 -0500, Sqwertz wrote:
> 
>> OK, so I think I understand most of this.  Basically, I'm never going 
>> to get the functionality I want with a button without holding down the 
>> [CRTL].
> 
> I didn't know you wanted a script, because you want to assign it to 
> a button. You probably know, that you can drag Message->AddPlonkRule 
> into a toolbar. If you click on that button while holding down the 
> Ctrl key, the Plonk rule will be incorporated in the General Section 
> (aka [*]) of the plonk list.

My reasons for originally wanting the script is because I thought I
could force a script to put it into the global section [*] of the
scorefile.  And I wanted it to automatically close the window.

>> So no worries there.  But I'm still at a loss for postkey().  Why 
>> doesn't...
>> 
>> Program PlonkButton;
>> Begin  
>>     PostKey(79, false, true, false, false, false, false, false, false);  
>>     ado('AddPlonkFilter');
>> End.
>> 
>> ... close the Plonk dialog window?  That's the example usage I see 
>> in other sample scripts to close message dialogs.
> 
> The above doesn't work, because Dialog does not pre-store keycodes
> for execution inside a following ADo() function call. If you alter
> the sequence of both lines, the keystroke still would not be
> recognized. The same goes for setting up a timer to insert the key
> combination from there. This, again, will only be evaluated, after
> the Scoring/Actions dialog has been closed.

I see other scripts that use this exact method to close dialog
windows.  This script shows a bunch of stuff being stuffed into the
keyboard before calling ado('addplonkfilter').  Of course I haven't
actually *tried* that script... 

http://dialog.datalist.org/scripts/ExpireRelative.html

> What you /could/ do is calling the above mentioned shortcut key to 
> AddPlonkRule via Postkey() instead of calling ADo('AddPlonkFilter').
> If you follow this up by Postkey() for <Alt+o> the Scoring/Actions 
> dialog /will/ be closed. But this way (even if the shortcut contains 
> Ctrl), the Plonk rule will end up in the section of the current 
> newsgroup. (Ctrl is omitted from evaluation in this situation.)

I'm not sure what you mean by calling AddPlonkRule VIA postkey().  But
it not being added to the global scorefile section would be a
show-stopper for me anyway.

At this point this problem and solution is more of a curiosity than a
necessity for me.  I was just trying to save a few keystrokes a few
times a week :-)

-sw
Technical Details
Message-ID: <17v73mw30vyzt$.dlg@sqwertz.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
References: <9n5luk74js3m.dlg@sqwertz.com> <5gxdor48w114.dlg@mid.crommatograph.info> <zhp6ot4xonlc.dlg@sqwertz.com> <dcemf34tmo1v$.dlg@b.rose.tmpbox.news.arcor.de> <1jhx4h5xcf8b1$.dlg@sqwertz.com> <wgrizwrtlodi.dlg@b.rose.tmpbox.news.arcor.de>

Show Full Headers
Complete Article Headers
Message-ID: <17v73mw30vyzt$.dlg@sqwertz.com>
Subject: Re: [Dialog] Adding Plonk Filter VIA Script
Date: Tue, 25 Aug 2015 12:12:58 -0500
From: Sqwertz <swertz@cluemail.compost>
References: <9n5luk74js3m.dlg@sqwertz.com> <5gxdor48w114.dlg@mid.crommatograph.info> <zhp6ot4xonlc.dlg@sqwertz.com> <dcemf34tmo1v$.dlg@b.rose.tmpbox.news.arcor.de> <1jhx4h5xcf8b1$.dlg@sqwertz.com> <wgrizwrtlodi.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!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
Newsgroups: news.software.readers
Organization: Me, Myself, and Inc.
Lines: 60
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: mx02.eternal-september.org; posting-host="25267948b74595c2af949a00d0309401";
 logging-data="23589"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+x2Qg/cUXRnZfXJpqX6hHI"
User-Agent: slrn/1.0.1 (Linux)
Cancel-Lock: sha1:ntRfJUng8EGEGj34cQaDwkn6byo=
X-no-archive: yes
X-Received-Bytes: 3760
X-Received-Body-CRC: 3254495415