๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Les Hay Mon, 12 Jul 2004 05:55
[Dialog] How to exclude the 'inbox' or 'sent' folders within a script
#151614
Author: Les Hay
Date: Mon, 12 Jul 2004 05:55
21 lines
2019 bytes
Hi

I use the following in a script to have a one button delete function

Program SelectAllandDelete;
Begin
ADo('HeaderlistPane');
ADo('SelectAll');
ADo('DeleteMessage');
End.

This works fine, and I use it all the time. However, I only want it to
work in a newsgroup folder header pane and not in (say) the 'sent'
folder header pane.

How can I go about checking and exiting the script if the current
headerlistpane is a particular view (say) 'sent' folder contents?

-- 
regards,
Les Hay, Livingston, Scotland
Re: [Dialog] How to exclude the 'inbox' or 'sent' folders within a script
#151869
Author: Alain GUERIN
Date: Fri, 16 Jul 2004 09:20
29 lines
2575 bytes
Hello,


On Mon, 12 Jul 2004 06:55:16 +0100, Les Hay wrote:


> This works fine, and I use it all the time. However, I only want it to
> work in a newsgroup folder header pane and not in (say) the 'sent'
> folder header pane.

> How can I go about checking and exiting the script if the current
> headerlistpane is a particular view (say) 'sent' folder contents?

Imo, there are two ways : 

the first, you create a category for the groups that can be treated by
your script and you select the category before running your script (there
are even tricks to select a category by script)
the second needs to change your script and do one script that select the
groups one by one in the group window and works on each group separately,
if it is not a one you want not to treat.
To know which group is treated, you have to use routines with the
clipboard, to jump to the next group, you have to use routines simulating
a send key. You also have to detect the last group name, then go back to
the first one and then treat each group until you reach the last one.

So I think the first way is the shorter.
-- 
A.G.
Re: [Dialog] How to exclude the 'inbox' or 'sent' folders within a script
#151872
Author: Les Hay
Date: Fri, 16 Jul 2004 12:44
40 lines
3469 bytes
On Fri, 16 Jul 2004 11:20:24 +0200, Alain GUERIN wrote:

> Hello,
> 
> On Mon, 12 Jul 2004 06:55:16 +0100, Les Hay wrote:
> 
>> This works fine, and I use it all the time. However, I only want it to
>> work in a newsgroup folder header pane and not in (say) the 'sent'
>> folder header pane.
> 
>> How can I go about checking and exiting the script if the current
>> headerlistpane is a particular view (say) 'sent' folder contents?
> 
> Imo, there are two ways : 
> 
> the first, you create a category for the groups that can be treated by
> your script and you select the category before running your script (there
> are even tricks to select a category by script)
> the second needs to change your script and do one script that select the
> groups one by one in the group window and works on each group separately,
> if it is not a one you want not to treat.
> To know which group is treated, you have to use routines with the
> clipboard, to jump to the next group, you have to use routines simulating
> a send key. You also have to detect the last group name, then go back to
> the first one and then treat each group until you reach the last one.
> 
> So I think the first way is the shorter.

Thanks for your response. The main problem I have is in knowing how to
identify the currently select group or folder. If it is any of the
newsgroups there is no problem - I would let the script run. If it is
a folder (or inbox or sent etc) then I would want to exit the script
at that point without running the next part. How, within a script can
I identify which is current?

-- 
regards, Les Hay, Livingston, Scotland
Using 40tude Dialog, v 2.9.12.1 (beta 35), Softwareentwicklung
M.Mรถnnig revolutionary e-mail and news client:
http://www.40tude.com/dialog/download.htm
Re: [Dialog] How to exclude the 'inbox' or 'sent' folders within a script
#152031
Author: Alain GUERIN
Date: Sun, 18 Jul 2004 17:40
33 lines
2956 bytes
Hello,


On Fri, 16 Jul 2004 13:44:46 +0100, Les Hay wrote:

>> So I think the first way is the shorter.

> Thanks for your response. The main problem I have is in knowing how to
> identify the currently select group or folder. If it is any of the
> newsgroups there is no problem - I would let the script run. If it is
> a folder (or inbox or sent etc) then I would want to exit the script
> at that point without running the next part. How, within a script can
> I identify which is current?

When "you" are in the group window, you can copy the line in the clipboard
by using one of the clipboard routines you can find in many scripts in
Wiki (http://www.40tude.com/dialog/wiki/index.php?title=General_scripts)
like Program AnalyseMessages (that is mainly a program that test different
features of the script language), or you can analyse the headers of the
messages that are in the group, if they are newsgroup messages (header
newsgroups).

But, if I may insist, if you define a category "to be treated" for example
and if you put all the groups or folders you want to treat in this
category, and only these groups or folders, by definition you will have
only valid targets in this category. One group or folder can be in more
than one category. So it lets you organize your groups as you want and
have this particular category only for running your script.

HTH

-- 
A.G.
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