Thread View: news.software.readers
5 messages
5 total messages
Started by Sqwertz
Mon, 19 Nov 2012 04:46
Dialog: Assign button to "Sample [200] Headers" command
Author: Sqwertz
Date: Mon, 19 Nov 2012 04:46
Date: Mon, 19 Nov 2012 04:46
20 lines
2166 bytes
2166 bytes
My news service provided by readnews.com (VIA Blocknews and Usenet-News) has been having timing problems for the last 2-3 months and they don't seem interested in fixing it. Often times articles are getting numbered but the XOVERS are not available sometimes until several seconds to several minutes later, causing gaps and missing articles. Second chance XOVER hardly ever catches them. Rather than do a "Get New Headers In Selected Group" I rather just use "Sample headers from selected group..." and get the last 200 headers. That fills in any gaps containing the missing XOVERS. Slightly expensive - I know. But headers are free and don't take up much bandwidth that I'd be using for other things. 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? (my default is set to 200). Maybe even attach that to a event trigger. (What is the definition of the "OnXover" event, BTW?) =sw
Re: Dialog: Assign button to "Sample [200] Headers" command
Author: Bernd Rose
Date: Tue, 20 Nov 2012 19:41
Date: Tue, 20 Nov 2012 19:41
60 lines
3978 bytes
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
Re: Dialog: Assign button to "Sample [200] Headers" command
Author: Sqwertz
Date: Thu, 29 Nov 2012 01:47
Date: Thu, 29 Nov 2012 01:47
89 lines
4869 bytes
4869 bytes
On Tue, 20 Nov 2012 20:41:29 +0100, Bernd Rose wrote:
> 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.
OK, thanks. I didn't know how to stuff the keyboard, but I figured
there was a function.
Also, where are the internal procedure names documented (the arguments
for ADo())?
>
> 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).
Actually, you can do this right inside the scripting dialog. I just
compiled it, assigned it obscure icon and dragged it right up to the
toolbar using [show button config] and was able to run it all without
even closing the scripting window. Worked like a charm and only took
30 seconds in all.
> [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...
I see what you're saying. I wouldn't ever attach anything to a timer
(that I can think of).
>> (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.
I could potentially start several threads retrieving headers at the
same time.
Does OnXOVER fire one time for each group, or only on "Get new Headers
for Subscribed groups"?
Thanks again for your help. Isn't Dialog great? I just wish
scripting was documented better (such as the internal procedure
names)
Isn't Dialog great? I think it's the most configurable newsreader on
the planet (without having the source code).
Thanks again!
-sw
Re: Dialog: Assign button to "Sample [200] Headers" command
Author: Bernd Rose
Date: Thu, 29 Nov 2012 06:04
Date: Thu, 29 Nov 2012 06:04
29 lines
2223 bytes
2223 bytes
On Wed, 28 Nov 2012 19:47:54 -0600, Sqwertz wrote: > where are the internal procedure names documented (the arguments > for ADo())? Create and run a Custom Script GetAL: Program GetAL; Begin WriteLn(GetActionList()); End. The Actions will be listed inside the Debug Output pane and can be copied to a text file from there. > Thanks again for your help. Isn't Dialog great? I just wish > scripting was documented better (such as the internal procedure > names) Scripting is Object Pascal. The external reference Marcus linked to inside the help file still is up and running: www.marcocantu.com/epascal For retrieving the Action list see above. Please note that /no/ action accepts parameters; and at least one action has a typo in the name (which must /not/ be corrected!). Bernd
Re: Dialog: Assign button to "Sample [200] Headers" command
Author: Bernd Rose
Date: Thu, 29 Nov 2012 22:56
Date: Thu, 29 Nov 2012 22:56
15 lines
2024 bytes
2024 bytes
On Wed, 28 Nov 2012 19:47:54 -0600, Sqwertz wrote: Addendum (I missed this one in the morning): > Does OnXOVER fire one time for each group, or only on "Get new Headers > for Subscribed groups"? Neither the former nor the latter. You still want to get sth. from OnXover, which it cannot provide. OnXover is run on every single *message*. - Right after receiving its header overview from server. Look for TXOverData inside the help file. The first appearance on the Scripting page is inside the definition of OnXover, the second shows the data structure exposed from header overview to the event. Bernd
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads