Article View: news.software.readers
Article #259438Re: [Dialog] Adding Plonk Filter VIA Script
From: Bernd Rose
Date: Sat, 22 Aug 2015 17:27
Date: Sat, 22 Aug 2015 17:27
55 lines
3601 bytes
3601 bytes
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.
> But the keyboard shortcut method works because I'm already holding
> down [CTRL], which I guess will have to do instead of a mouse press
> (a mouse click is preferred as that's where my hands will be when I
> need to perform this action)
Since you probably use the mouse with only one hand, the above method
(Ctrl+Left_Mouse) will probably suffice?
> The default plonk rule can be changed with:
>
> [Scoring]
> DefPlonk=!delete # Action for 'Add Plonk Rule'
Ah. I forgot about that setting!
> 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.
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.)
HTH.
Bernd
Technical Details
Message-ID:
<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-mailReferences:
<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>Show Full Headers
Complete Article Headers
Message-ID: <wgrizwrtlodi.dlg@b.rose.tmpbox.news.arcor.de> Subject: Re: [Dialog] Adding Plonk Filter VIA Script Date: Sat, 22 Aug 2015 19:27:52 +0200 From: Bernd Rose <b.rose.tmpbox@arcor.de> 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> 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: albasani.net Lines: 55 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net fylC8xXZIgoLez16I+ryFT+/QlKJnjiI7fnYv8YeN8U52W/7YgQ4K8TRe3isMeQOBdqWhP7GYwMHDo3KBT15kw== NNTP-Posting-Date: Sat, 22 Aug 2015 17:27:54 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="EDGY6rKtYZBq7exSL3ZrVWGxnhH2KgmKileYRFsoTKYsB16eM/aC6oYk9AynAtImdqbsn5bL7KJ+11Qm+YY2DLf7BRJCGrAig6iGtA5y6go0gPcRf8qMRomG2Jobt02k"; mail-complaints-to="abuse@albasani.net" User-Agent: 40tude_Dialog/2.0.15.41 (c36eefa9.227.332) Cancel-Lock: sha1:KIkq6TMh+5zWB+ux+f1GWd3RvCM= X-Received-Bytes: 3442 X-Received-Body-CRC: 3966863769