Thread View: news.software.readers
3 messages
3 total messages
Started by Warwick
Sun, 21 Dec 2003 03:56
[Dialog] Scripting, iterating over the message tree
Author: Warwick
Date: Sun, 21 Dec 2003 03:56
Date: Sun, 21 Dec 2003 03:56
44 lines
2293 bytes
2293 bytes
Hi,
I'd like to iterate over the messages in a newsgroup (or groups) ..
Program Iter;
uses TextFile;
var aForm:TForm;
begin
lockdisplay;
try
var bool:done;
done = false;
// need an end of group marker
while(!done)
{
ADo('ExpandAllThreads');
ADo('FirstMessage');
// TNewsMessage *mess = new TNewsMessage( )
// procMess(mess);
// output Poc to text file here
//if (mess == lastMess)
// done = true;
// delete mess;
ADo('NextMessageInHistory');
} //while
finally
unlockdisplay;
end;
End.
As you can see I want access to the currently selected news message object
and its body and header fields to parse a group for statistics etc.
How do I do this? Can it be done?
pls forgive the C style code - I am familiar with CBuilder which makes a
lot of the Delphi stuff very familiar - but I can crash course myself what
I need to know in pascal fairly easily I think.
finally top marks to the author. This is powerful and flexible software.
cheers
Warwick
Re: [Dialog] Scripting, iterating over the message tree
Author: Alain GUERIN
Date: Sun, 21 Dec 2003 06:17
Date: Sun, 21 Dec 2003 06:17
25 lines
2226 bytes
2226 bytes
Hello, On Sun, 21 Dec 2003 16:56:57 +1300, Warwick wrote: > As you can see I want access to the currently selected news message object > and its body and header fields to parse a group for statistics etc. > How do I do this? Can it be done? > > pls forgive the C style code - I am familiar with CBuilder which makes a > lot of the Delphi stuff very familiar - but I can crash course myself what > I need to know in pascal fairly easily I think. Did you look at http://40tude.com/dialog/wiki/index.php/AnalyseMessages or http://40tude.com/dialog/wiki/index.php/NonAnsweredPosts? Go directly at the end of the scripts if you want to see only how the end of task marker is build. Scripts in Wiki will give you a lot of tips. -- A.G.
Re: [Dialog] Scripting, iterating over the message tree
Author: Warwick
Date: Sun, 21 Dec 2003 09:55
Date: Sun, 21 Dec 2003 09:55
46 lines
2767 bytes
2767 bytes
On Sun, 21 Dec 2003 07:17:33 +0100, Alain GUERIN wrote:
> Hello,
>
>
> On Sun, 21 Dec 2003 16:56:57 +1300, Warwick wrote:
>
>
>> As you can see I want access to the currently selected news message object
>> and its body and header fields to parse a group for statistics etc.
>> How do I do this? Can it be done?
>>
>> pls forgive the C style code - I am familiar with CBuilder which makes a
>> lot of the Delphi stuff very familiar - but I can crash course myself what
>> I need to know in pascal fairly easily I think.
>
>
> Did you look at http://40tude.com/dialog/wiki/index.php/AnalyseMessages or
> http://40tude.com/dialog/wiki/index.php/NonAnsweredPosts?
>
> Go directly at the end of the scripts if you want to see only how the end
> of task marker is build.
>
> Scripts in Wiki will give you a lot of tips.
Ooops, no I had not looked at Wiki at all - thanks very much :)
btw I cannot run the script as it is, inifile error.
Looking over the code the inifile is read into a text file and the values
read from there. I take it we cannot access the IniFile methods and
properties from TIniFile?
ie
var ini:TIniFile
ini.ReadString("SectionName", "Key", "DefaultValue");
Will read the value for Section SectionName, Key=="key" if it does not
exist use "defaultValue".
Also if you create TIniFile and when run does not exist, it is created for
you.
Write commands likewise create the section and Key name if it does not
exist.
cheers
Warwick
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