🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #252082

Re: Dialog: Assign button to "Sample [200] Headers" command

#252082
From: Bernd Rose
Date: Tue, 20 Nov 2012 19:41
60 lines
3978 bytes
On Sun, 18 Nov 2012 22:46:34 -0600,, Sqwertz wrote:

> Is there any way to assign to a button a command that calls "Sample
> Headers" and bypass the dialog window that pops up to confirm how many
> headers I'd like to retrieve? 

Create a custom Script named MySampling (or whatever you like) containing:

Program MySampling;
Begin
  PostKey( 13, false,false,false,false,false,false,false,false);
  ADo('SampleHeadersFromSelectedGroups');
End.

Save and compile the script. If you wish to have an icon instead of the
script name appearing on the button bar, select an icon in the lower
left part of the Scripting dialog. If you wish to use a customized
icon, put a *.bmp file with 20x20 pixel into the Scripts\Icons subfolder
of Dialog. (You need to restart Dialog to re-read icons from this
folder.) Please note, that custom icons will be last inside the icons
drop-down list; just following a couple of empty[!] icons.

After closing the Scripting Dialog click right on the button bar and 
select <Customize Toolbars>. Select "Scripts" from [Categories] and 
drag "MySampling" from [Commands] to the button bar. You can also adjust 
a shortcut and/or a mouse gesture to the script inside this dialog (if 
you wish).

[Number of headers to retrieve]
> (my default is set to 200).

Just to make sure: The number inside the "Sample Headers" dialog depends
on <General Settings>-<Connections>-<Number of headers to confirm on 1st 
load for a group>. Whichever value is set there will be default for
Sampling.

> Maybe even attach that to a event trigger.

You can try by yourself. A timer /may/ work. But I don't think this is
worth the potential problems. In above MySampling script, PostKey of 
the <Enter> key is inserted into the keyboard buffer in the "hope", 
that nothing will get in the way until the "Sampling" dialog pops up. 
If things go wrong, the <Enter> may wind up /anywhere/. Combining above
code with events will increase the probability of some misfortunate 
accidents...

> (What is the definition of the "OnXover" event, BTW?)

I would be surprised if combining OnXOver with Sampling would /not/
lead into severe problems. (If it would work one way or another, at
all...) Since you are inside an *active* header retrieving process
while OnXOver is executed, you'd create an invalid re-entry loop
when starting a sampling process from over there.

Btw.: "inside an *active* header retrieving process" is also an
indicator of the purpose of the OnXOver event: Analysis of incoming
headers, signalling when headers meet certain conditions,...

HTH.
Bernd
Technical Details
Message-ID: <ovsay7uoj9g$.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.20140922.mbox.gz!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-out.octanews.net!indigo.octanews.net!news.glorb.com!xlned.com!feeder1.xlned.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail
References: <ildw42nd76wj.dlg@sqwertz.com>

Show Full Headers
Complete Article Headers
Message-ID: <ovsay7uoj9g$.dlg@b.rose.tmpbox.news.arcor.de>
Subject: Re: Dialog: Assign button to "Sample [200] Headers" command
Date: Tue, 20 Nov 2012 20:41:29 +0100
From: Bernd Rose <b.rose.tmpbox@expires-2012-11-30.arcornews.de>
References: <ildw42nd76wj.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.20140922.mbox.gz!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-out.octanews.net!indigo.octanews.net!news.glorb.com!xlned.com!feeder1.xlned.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.41 (bb5f6a7d.227.446)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Lines: 60
Organization: Arcor
NNTP-Posting-Date: 20 Nov 2012 20:41:29 CET
NNTP-Posting-Host: eaa81e29.newsspool4.arcor-online.net
X-Trace: DXC=@[DB4cbGh7K6PJ?[X6JIXE4IUK<Cl32<A4Fo<]lROoRA8kF<OcfhCOKXaKEbIj`T2CBYf[Tl<>RjJV__gLFST`:JRdBKEC7@hmC
X-Complaints-To: usenet-abuse@arcor.de
X-Original-Bytes: 3665