Thread View: news.software.readers
20 messages
20 total messages
Started by vince
Sat, 31 May 2008 12:05
[dialog] how to archive Sent messages?
Author: vince
Date: Sat, 31 May 2008 12:05
Date: Sat, 31 May 2008 12:05
7 lines
1323 bytes
1323 bytes
Baffled, confused and probably just plain stupid - but I can't figure out how to copy/move/export the messages I've posted to usenet out of Dialog's Sent messages folder to an external file. I want to archive the messages I've posted, so I can search them if I need to. How do I get my previously posted messages out of Dialog and into a plain text file in my home directory?
Re: [dialog] how to archive Sent messages?
Author: Rom
Date: Sat, 31 May 2008 16:26
Date: Sat, 31 May 2008 16:26
15 lines
1575 bytes
1575 bytes
On Sat, 31 May 2008 12:05:53 GMT, vince wrote: > Baffled, confused and probably just plain stupid - but I can't figure out > how to copy/move/export the messages I've posted to usenet out of Dialog's > Sent messages folder to an external file. > > I want to archive the messages I've posted, so I can search them if I need > to. How do I get my previously posted messages out of Dialog and into a > plain text file in my home directory? This script can write the currently viewed message to a file: <http://www.40tude.com/dialog/wiki/index.php/FileSubject>. -- Rom
Re: [dialog] how to archive Sent messages?
Author: Sven Svensson
Date: Sun, 01 Jun 2008 08:11
Date: Sun, 01 Jun 2008 08:11
10 lines
1672 bytes
1672 bytes
vince wrote , at 2008-05-31 14:05: > Baffled, confused and probably just plain stupid - but I can't figure out > how to copy/move/export the messages I've posted to usenet out of Dialog's > Sent messages folder to an external file. > > I want to archive the messages I've posted, so I can search them if I need > to. How do I get my previously posted messages out of Dialog and into a > plain text file in my home directory? Isn't the file already in plain text?
Re: [dialog] how to archive Sent messages?
Author: vince
Date: Sun, 01 Jun 2008 14:17
Date: Sun, 01 Jun 2008 14:17
9 lines
1450 bytes
1450 bytes
On Sun, 1 Jun 2008 02:26:56 +1000, Rom <-@-.invalid> wrote: >This script can write the currently viewed message to a file: ><http://www.40tude.com/dialog/wiki/index.php/FileSubject>. Thanks. Although I'll have to figure out how to use scripts with Dialogue and that one looks like it saves individual messages. Was hoping to save all of them at once in one file that I search for keywords.
Re: [dialog] how to archive Sent messages?
Author: vince
Date: Sun, 01 Jun 2008 14:17
Date: Sun, 01 Jun 2008 14:17
12 lines
1389 bytes
1389 bytes
On Sun, 01 Jun 2008 10:11:48 +0200, Sven Svensson <ss@i.o> wrote: >Isn't the file already in plain text? Which file? It looks like msg.dat contains all the messages of Dialog, not just the messages in the Sent folder. Was hoping for an easy way to save all the messages in the Sent folder to an external file in the mbx format.
Re: [dialog] how to archive Sent messages?
Author: Rom
Date: Sun, 01 Jun 2008 16:05
Date: Sun, 01 Jun 2008 16:05
77 lines
4378 bytes
4378 bytes
On Sun, 01 Jun 2008 14:17:51 GMT, vince wrote:
> On Sun, 1 Jun 2008 02:26:56 +1000, Rom <-@-.invalid> wrote:
>
>>This script can write the currently viewed message to a file:
>><http://www.40tude.com/dialog/wiki/index.php/FileSubject>.
>
> Thanks. Although I'll have to figure out how to use scripts with Dialogue
> and that one looks like it saves individual messages. Was hoping to save
> all of them at once in one file that I search for keywords.
Although the script doesn't do exactly what you want it is better than
nothing, and even though I have no knowledge of programming or writing
such scripts, was able to alter it a little bit to make it easier to
save about 1000 copies of sent posts last time I used it.
It would be good if there was a script to export all (selected)
messages from the Sent folder in mbox format to the one file, or even
if this script could be changed to save all to the one file.
Changing the saved files to mbox format isn't that hard, for importing
purposes, as each message needs a From_ line added before the first
line of the headers.
The messages saved with this script can either be saved as separate
files or those with the same subject appended in the same file. I
found it works better if headers are already showing as an occasional
message was saved without the headers when the headers aren't. From
the script, I excluded the line with the asterisks, added switching
focus back to the headerlist pane, added a key to move up in the
headerlist pane, and assigned a button to the script, so all I had to
do was keep clicking the button I put on a toolbar. See below.
Searching can be done in the Sent folder in Dialog, and if saved with
this script searching by keyword is easily done with Explorer in Vista
using its built-in Search, finds the file(s) and then can be opened in
whatever text editor.
If you want to try the script in Dialog go to:
-Settings > Scripting > Enable scripting
-Settings > Scripting > Scripting > Custom scripts tab.
-Select File > New Script.
-Give the script a name, e.g. FileSubject.
-Delete what's already in the RHS.
-Copy the script from the wiki and paste into the RHS.
At the top of the script change the path, and select the options for
unique files and all headers.
If don't want the line of asterisks find and delete this text:
+StringOfChar('*', 75)
To switch focus from the article pane to the headerlist pane ready for
the next message add this line near the bottom of the script:
ADo('HeaderlistPane');
end;
End.
If starting down in the headerlist pane and working up, you can add
the up arrow key to the bottom of the script too:
ADo('HeaderlistPane');
PostKey(38, false, false, false, false, false, false, false, false);
end;
End.
-On the bottom left, optionally select an icon for a toolbar button,
and give it a tooltip description (hint).
-Select Script > Compile, which "Successfully compiled" at bottom RHS.
-Select Script > Reload all compiled scripts in Dialog's main window.
-Close Scripting window.
-Setting > Configure buttons/shortcuts
-Select Scripts under Categories, and select the FileSubject command
-Give it a shortcut (unassigned) and/or drag button to the toolbar.
--
Rom
Re: [dialog] how to archive Sent messages?
Author: Frank Slootweg
Date: Sun, 01 Jun 2008 17:15
Date: Sun, 01 Jun 2008 17:15
47 lines
3622 bytes
3622 bytes
Rom <-@-.invalid> wrote: > On Sun, 01 Jun 2008 14:17:51 GMT, vince wrote: > > > On Sun, 1 Jun 2008 02:26:56 +1000, Rom <-@-.invalid> wrote: > > > >>This script can write the currently viewed message to a file: > >><http://www.40tude.com/dialog/wiki/index.php/FileSubject>. > > > > Thanks. Although I'll have to figure out how to use scripts with Dialogue > > and that one looks like it saves individual messages. Was hoping to save > > all of them at once in one file that I search for keywords. > > Although the script doesn't do exactly what you want it is better than > nothing, and even though I have no knowledge of programming or writing > such scripts, was able to alter it a little bit to make it easier to > save about 1000 copies of sent posts last time I used it. > > It would be good if there was a script to export all (selected) > messages from the Sent folder in mbox format to the one file, or even > if this script could be changed to save all to the one file. > Changing the saved files to mbox format isn't that hard, for importing > purposes, as each message needs a From_ line added before the first > line of the headers. > > The messages saved with this script can either be saved as separate > files or those with the same subject appended in the same file. I > found it works better if headers are already showing as an occasional > message was saved without the headers when the headers aren't. From > the script, I excluded the line with the asterisks, added switching > focus back to the headerlist pane, added a key to move up in the > headerlist pane, and assigned a button to the script, so all I had to > do was keep clicking the button I put on a toolbar. See below. > > Searching can be done in the Sent folder in Dialog, and if saved with > this script searching by keyword is easily done with Explorer in Vista > using its built-in Search, finds the file(s) and then can be opened in > whatever text editor. [much, much more deleted] "Ron Ford", are you paying attention!? :-) What was it again about someone needing saving, archiving and searching, saying "OE sucks" and calling someone else "daft for thinking OE has reasonable archiving", and then switching to Dialog? Who was that again? :-) And some think nsr *isn't* entertaining! It's bloody *hilarious*, but somewhat of a bummer that this cost me a perfectly fine laptop!
Re: [dialog] how to archive Sent messages?
Author: Eggs Zachtly
Date: Sun, 01 Jun 2008 20:14
Date: Sun, 01 Jun 2008 20:14
60 lines
4478 bytes
4478 bytes
Frank Slootweg said: > Rom <-@-.invalid> wrote: >> On Sun, 01 Jun 2008 14:17:51 GMT, vince wrote: >> >>> On Sun, 1 Jun 2008 02:26:56 +1000, Rom <-@-.invalid> wrote: >>> >>>>This script can write the currently viewed message to a file: >>>><http://www.40tude.com/dialog/wiki/index.php/FileSubject>. >>> >>> Thanks. Although I'll have to figure out how to use scripts with Dialogue >>> and that one looks like it saves individual messages. Was hoping to save >>> all of them at once in one file that I search for keywords. >> >> Although the script doesn't do exactly what you want it is better than >> nothing, and even though I have no knowledge of programming or writing >> such scripts, was able to alter it a little bit to make it easier to >> save about 1000 copies of sent posts last time I used it. >> >> It would be good if there was a script to export all (selected) >> messages from the Sent folder in mbox format to the one file, or even >> if this script could be changed to save all to the one file. >> Changing the saved files to mbox format isn't that hard, for importing >> purposes, as each message needs a From_ line added before the first >> line of the headers. >> >> The messages saved with this script can either be saved as separate >> files or those with the same subject appended in the same file. I >> found it works better if headers are already showing as an occasional >> message was saved without the headers when the headers aren't. From >> the script, I excluded the line with the asterisks, added switching >> focus back to the headerlist pane, added a key to move up in the >> headerlist pane, and assigned a button to the script, so all I had to >> do was keep clicking the button I put on a toolbar. See below. >> >> Searching can be done in the Sent folder in Dialog, and if saved with >> this script searching by keyword is easily done with Explorer in Vista >> using its built-in Search, finds the file(s) and then can be opened in >> whatever text editor. > > [much, much more deleted] > > "Ron Ford", are you paying attention!? :-) What was it again about > someone needing saving, archiving and searching, saying "OE sucks" and > calling someone else "daft for thinking OE has reasonable archiving", > and then switching to Dialog? Who was that again? :-) > > And some think nsr *isn't* entertaining! It's bloody *hilarious*, but > somewhat of a bummer that this cost me a perfectly fine laptop! Were it "perfectly fine", it would still be so, no? I charge that it was an archaic, abacus-like module, that can't handle the occasional spew. Time to upgrade, man. =P (Other than that, I totally agree on the entertainment value of nsr. =) -- Eggs .sig not found. (A)bort, (R)etry, (F)ail?
Re: [dialog] how to archive Sent messages?
Author: Sven Svenson
Date: Sun, 01 Jun 2008 20:33
Date: Sun, 01 Jun 2008 20:33
14 lines
1655 bytes
1655 bytes
vince skrev: > On Sun, 01 Jun 2008 10:11:48 +0200, Sven Svensson <ss@i.o> wrote: > >> Isn't the file already in plain text? > > Which file? No idea of the filename. > It looks like msg.dat contains all the messages of Dialog, not just the > messages in the Sent folder. Can't you just extract the 'sent' messages with something like grep 'your from address' filename > sent
Re: [dialog] how to archive Sent messages?
Author: vince
Date: Sun, 01 Jun 2008 21:43
Date: Sun, 01 Jun 2008 21:43
11 lines
1620 bytes
1620 bytes
On Mon, 2 Jun 2008 02:05:14 +1000, Rom <-@-.invalid> wrote: >Although the script doesn't do exactly what you want it is better than >nothing, Hacked around a bit on the script and it now saves one message to the file 'dialog.sent.messages.txt' then advances to the next message, ready for another button press. I have to single step my way through the folder, but end up with all messages in one file. Couldn't have done it without your help. Thanks for the many clues!!
Re: [dialog] how to archive Sent messages?
Author: vince
Date: Sun, 01 Jun 2008 21:53
Date: Sun, 01 Jun 2008 21:53
9 lines
1572 bytes
1572 bytes
On Sun, 01 Jun 2008 22:33:09 +0200, Sven Svenson <ss@i.o> wrote: >Can't you just extract the 'sent' messages with something like >grep 'your from address' filename > sent grep allowed me to find msg.dat (grepped for a subject from the Sent folder). But, my limited knowledge of grep only lets me get individual lines that match a given pattern, effectively letting me extract a particular header, but missing the other headers and all of the body.
Re: [dialog] how to archive Sent messages?
Author: Ron Ford
Date: Sun, 01 Jun 2008 22:02
Date: Sun, 01 Jun 2008 22:02
65 lines
4732 bytes
4732 bytes
On 01 Jun 2008 17:15:55 GMT, Frank Slootweg wrote: > Rom <-@-.invalid> wrote: >> On Sun, 01 Jun 2008 14:17:51 GMT, vince wrote: >> >>> On Sun, 1 Jun 2008 02:26:56 +1000, Rom <-@-.invalid> wrote: >>> >>>>This script can write the currently viewed message to a file: >>>><http://www.40tude.com/dialog/wiki/index.php/FileSubject>. >>> >>> Thanks. Although I'll have to figure out how to use scripts with Dialogue >>> and that one looks like it saves individual messages. Was hoping to save >>> all of them at once in one file that I search for keywords. >> >> Although the script doesn't do exactly what you want it is better than >> nothing, and even though I have no knowledge of programming or writing >> such scripts, was able to alter it a little bit to make it easier to >> save about 1000 copies of sent posts last time I used it. >> >> It would be good if there was a script to export all (selected) >> messages from the Sent folder in mbox format to the one file, or even >> if this script could be changed to save all to the one file. >> Changing the saved files to mbox format isn't that hard, for importing >> purposes, as each message needs a From_ line added before the first >> line of the headers. >> >> The messages saved with this script can either be saved as separate >> files or those with the same subject appended in the same file. I >> found it works better if headers are already showing as an occasional >> message was saved without the headers when the headers aren't. From >> the script, I excluded the line with the asterisks, added switching >> focus back to the headerlist pane, added a key to move up in the >> headerlist pane, and assigned a button to the script, so all I had to >> do was keep clicking the button I put on a toolbar. See below. >> >> Searching can be done in the Sent folder in Dialog, and if saved with >> this script searching by keyword is easily done with Explorer in Vista >> using its built-in Search, finds the file(s) and then can be opened in >> whatever text editor. > > [much, much more deleted] > > "Ron Ford", are you paying attention!? :-) What was it again about > someone needing saving, archiving and searching, saying "OE sucks" and > calling someone else "daft for thinking OE has reasonable archiving", > and then switching to Dialog? Who was that again? :-) > > And some think nsr *isn't* entertaining! It's bloody *hilarious*, but > somewhat of a bummer that this cost me a perfectly fine laptop! I'm paying attention now. You will recall that I amended "daft" to "misguided." I'm standing by "OE sucks." I haven't touched scripts with dialog yet, as they are written in Delphi, with which I have no experience. I think a person is well-advised to conquer the problems that come up naturally until you start feeling like you really know how to make an application behave. I was disappointed that there was no script for posting a bunch of files. You'd think that someone who was posting smut would have already blazed a trail there. I wish I had time to fiddle with this all day. Unfortunately, I have to pay attention to real life, that is, work.:-( -- Ron Ford De fleegend Hollander
Re: [dialog] how to archive Sent messages?
Author: Ron Ford
Date: Sun, 01 Jun 2008 22:10
Date: Sun, 01 Jun 2008 22:10
100 lines
5293 bytes
5293 bytes
On Mon, 2 Jun 2008 02:05:14 +1000, Rom wrote:
> On Sun, 01 Jun 2008 14:17:51 GMT, vince wrote:
>
>> On Sun, 1 Jun 2008 02:26:56 +1000, Rom <-@-.invalid> wrote:
>>
>>>This script can write the currently viewed message to a file:
>>><http://www.40tude.com/dialog/wiki/index.php/FileSubject>.
>>
>> Thanks. Although I'll have to figure out how to use scripts with Dialogue
>> and that one looks like it saves individual messages. Was hoping to save
>> all of them at once in one file that I search for keywords.
>
> Although the script doesn't do exactly what you want it is better than
> nothing, and even though I have no knowledge of programming or writing
> such scripts, was able to alter it a little bit to make it easier to
> save about 1000 copies of sent posts last time I used it.
>
> It would be good if there was a script to export all (selected)
> messages from the Sent folder in mbox format to the one file, or even
> if this script could be changed to save all to the one file.
> Changing the saved files to mbox format isn't that hard, for importing
> purposes, as each message needs a From_ line added before the first
> line of the headers.
>
> The messages saved with this script can either be saved as separate
> files or those with the same subject appended in the same file. I
> found it works better if headers are already showing as an occasional
> message was saved without the headers when the headers aren't. From
> the script, I excluded the line with the asterisks, added switching
> focus back to the headerlist pane, added a key to move up in the
> headerlist pane, and assigned a button to the script, so all I had to
> do was keep clicking the button I put on a toolbar. See below.
>
> Searching can be done in the Sent folder in Dialog, and if saved with
> this script searching by keyword is easily done with Explorer in Vista
> using its built-in Search, finds the file(s) and then can be opened in
> whatever text editor.
>
> If you want to try the script in Dialog go to:
> -Settings > Scripting > Enable scripting
> -Settings > Scripting > Scripting > Custom scripts tab.
> -Select File > New Script.
> -Give the script a name, e.g. FileSubject.
> -Delete what's already in the RHS.
> -Copy the script from the wiki and paste into the RHS.
>
> At the top of the script change the path, and select the options for
> unique files and all headers.
>
> If don't want the line of asterisks find and delete this text:
> +StringOfChar('*', 75)
>
> To switch focus from the article pane to the headerlist pane ready for
> the next message add this line near the bottom of the script:
>
> ADo('HeaderlistPane');
> end;
> End.
>
> If starting down in the headerlist pane and working up, you can add
> the up arrow key to the bottom of the script too:
>
> ADo('HeaderlistPane');
> PostKey(38, false, false, false, false, false, false, false, false);
> end;
> End.
>
> -On the bottom left, optionally select an icon for a toolbar button,
> and give it a tooltip description (hint).
> -Select Script > Compile, which "Successfully compiled" at bottom RHS.
> -Select Script > Reload all compiled scripts in Dialog's main window.
> -Close Scripting window.
> -Setting > Configure buttons/shortcuts
> -Select Scripts under Categories, and select the FileSubject command
> -Give it a shortcut (unassigned) and/or drag button to the toolbar.
If, instead, I wanted to use the script that comes as an example:
Program SkipToNextThread;
Begin
lockdisplay;
try
dropmarker;
ADo('CollapseThread');
ADo('NextMessage');
dropmarker;
prevmarker;
prevmarker;
nextmarker
finally
unlockdisplay;
end;
End.
, how would I do that?
Can one activate a script without creating a button?
--
Ron Ford
Re: [dialog] how to archive Sent messages?
Author: Rom
Date: Mon, 02 Jun 2008 05:31
Date: Mon, 02 Jun 2008 05:31
18 lines
1822 bytes
1822 bytes
On Sun, 01 Jun 2008 21:43:51 GMT, vince wrote: > On Mon, 2 Jun 2008 02:05:14 +1000, Rom <-@-.invalid> wrote: > >>Although the script doesn't do exactly what you want it is better than >>nothing, > > Hacked around a bit on the script and it now saves one message to the file > 'dialog.sent.messages.txt' then advances to the next message, ready for > another button press. I have to single step my way through the folder, but > end up with all messages in one file. Good to hear. Can you please post the changed script to save all in the one file, or clues to what parts in the script need to be changed? It'll save me trying to figure it out. Thanks. -- Rom
Re: [dialog] how to archive Sent messages?
Author: Rom
Date: Mon, 02 Jun 2008 05:31
Date: Mon, 02 Jun 2008 05:31
46 lines
2727 bytes
2727 bytes
On Sun, 1 Jun 2008 17:10:29 -0500, Ron Ford wrote:
> If, instead, I wanted to use the script that comes as an example:
>
> Program SkipToNextThread;
> Begin
> lockdisplay;
> try
> dropmarker;
> ADo('CollapseThread');
> ADo('NextMessage');
> dropmarker;
> prevmarker;
> prevmarker;
> nextmarker
> finally
> unlockdisplay;
> end;
> End.
>
> , how would I do that?
I believe the script above is for (and the same as) the command in
Navigate > Skip to next thread (probably added to Dialog), and can
already be used via the Navigate menu with a mouse etc. or keyboard
with access keys. To use that script/command with a keyboard shortcut:
-Setting > Configure buttons/shortcuts
-Select Navigate (as it's found in the Navigate menu) under Categories
-Locate, then select the Skip to next thread command
-Give it a shortcut (that's unassigned) and Bob's your uncle.
Suggestion: The command above Skip to next thread in the Navigate menu
is Skip to next unread newsgroup, with a keyboard shortcut of S.
Change the Skip to next unread newsgroup keyboard shortcut from S to G
(for *g*roup), then give S to Skip to next thread.
> Can one activate a script without creating a button?
Yep, usually by giving it a keyboard shortcut, as above. Some scripts
may just be for running now and again manually, say, a script to save
all the commands including commands from your scripts, which can then
be used as commands themselves in scripts, to a text file, and that
script can be run from the Scripting window by using Script > Run.
--
Rom
Re: [dialog] how to archive Sent messages?
Author: vince
Date: Mon, 02 Jun 2008 11:13
Date: Mon, 02 Jun 2008 11:13
253 lines
8137 bytes
8137 bytes
On Mon, 2 Jun 2008 15:31:56 +1000, Rom <-@-.invalid> wrote:
>Can you please post the changed script to save all in
>the one file, or clues to what parts in the script need to be changed?
Made all the changes you suggested, with one exception. I sorted the Sent
messages folder by date with the oldest at the top. I start at the top and
use the down arrow to step through the messages.
The filename is hard coded in the script. A slicker change would have been
to make it a variable - but this was a quick and dirty change - and I'm not
a programmer.
Think line length long enough but watch the word wrap, if you cut and paste
from a newsreader.
Program FileSubject; //v0.3 by MLC
uses Forms, StdCtrls, Textfile;
//---------------------------- Settings ---------------------------------//
const
path = 'C:\temp\';
// write the path of the folder where you want the file to be created
// notice that the last character must be a back slash \
fileUnique = 1; // possible values: 1 or 0
// If fileUnique = 1 every Subject will have a unique file
// and every follow-up will be added in this same file.
// if fileUnique = 0 every message will be saved in a different file
// (Subject.txt, Subject[01].txt, Subject[02].txt,...).
allHeaders = true; // all headers saved? true/false.
// If false the saved headers are only From, Subject, Newsgroups, Date, Message-ID.
//------------------------ End of Settings -----------------------------//
//(you don't need to change anything else in this script)
type
TNoChars=set of Char;
var
FileHandle: Integer;
fileName, temp: string;
areHid: boolean;
myForm: TForm;
myMemo: TMemo;
Function EmptyClipboard:boolean; external 'EmptyClipboard@user32.dll stdcall';
Function OpenClipboard(hWndNewOwner: INTEGER):boolean; external 'OpenClipboard@user32.dll stdcall';
Function CloseClipboard:boolean; external 'CloseClipboard@user32.dll stdcall';
Procedure ClearClipboard;
{to avoid side effects: if an empty selection must be copyed in the clipboard}
begin
OpenClipboard(0);
EmptyClipboard;
CloseClipboard;
end;
function GetMsgBody: string;
begin
lockdisplay;
try
myMemo.Clear;
ClearClipboard;
ADo('ArticlePane');
ADo('SelectAll');
Ado('Copy');
myMemo.PasteFromClipboard;
finally
unlockdisplay;
end;
result:=myMemo.Text;
end;
function GetMsgInfo(field: string): string;
var
i: integer;
begin
i:=0;
result:='';
while i < myMemo.Lines.count-1 do
begin
if pos(field, myMemo.Lines[i])>0 then break;
i:=i+1;
end; //while
result:=myMemo.Lines[i];
end;
function GetMsgSubject: string;
var
i: integer;
begin
i:=0;
result:='';
while i < myMemo.Lines.count-1 do
begin
if pos('Subject:', myMemo.Lines[i])>0 then break;
i:=i+1;
end; //while
result:=copy(myMemo.Lines[i],10,length(myMemo.Lines[i]));
end;
function DelSign(sSign : string; sString : string): string;
begin
result:=StringReplace(sString, sSign, '_', [rfReplaceAll]);
end;
function Adjust(s: string): string;
var
i: integer;
noChars: TNoChars;
begin
if copy(s,1,3)='Re:' then
s:=copy(s, 5, length(s)-1)
else if (copy(s,1,2)='R:') then
s:=copy(s, 4, length(s)-1);
noChars:=[':', '/', '\', '*', '|', '<', '>', '?', '"'];
i:=1;
while (i<=length(s)) do
begin
if s[i] in noChars then
begin
s:=DelSign(s[i], s);
continue;
end;
i:=i+1;
end;
result:=s;
end;
function ChangeName(var file: string): string;
var
len, digits: integer;
fn, base, digitsStr: string;
begin
fn:=ExtractFileName(file);
len:=length(fn);
base:=copy(fn, 1, len-7);
digitsStr:='';
digitsStr:=copy(fn, len-6, 2);
digits:=StrToInt(digitsStr);
digits:=digits+1;
if length(IntToStr(digits))=1 then digitsStr:='0'+IntToStr(digits)
else digitsStr:=IntToStr(digits);
file:=path+base+digitsStr+'].txt';
if FileExists(file) then result:=ChangeName(file)
else result:=file;
end;
function AreHeadHid: boolean;
var i: integer;
begin
result := true;
if myMemo.Lines.count > 10 then
begin
i:=0;
while (i < myMemo.Lines.count-1) and result do
begin
i:= i+1;
result := pos('Newsgroups: ', myMemo.Lines.strings[i])=0;
end; //while
end; //if
end;
procedure BuildMyMemo;
begin
myMemo:=tMemo.Create(myForm);
myMemo.parent:=myForm;
myMemo.width := Application.Mainform.width;
end;
procedure WriteF;
var
ps: string;
f: TextFile;
begin
temp:=Adjust(GetMsgSubject);
ps:=path;
if (ps[length(ps)]<>'\') then
begin
writeln(ps[length(ps)-1]);
Application.MessageBox('your path doesn''t end with \ ', 'Error !', 1);
exit;
end;
if DirectoryExists(path) then
//fileName:=path+temp+'.txt'
fileName:=path+'dialog.sent.messages.txt'
else
begin
Application.MessageBox('your path doesn''t exist!', 'Error !', 1);
exit;
end;
case fileUnique of
1:
begin
//myMemo.Lines.Add(#13+#10+StringOfChar('*', 75)+#13+#10+#13+#10);
myMemo.Lines.Add(#13+#10);
AssignFile(f, fileName);
if fileexists(filename) then append(f)
else rewrite(f);
TextWrite(f, myMemo.text);
CloseFile(f);
end;
0:
begin
if (FileExists(fileName)) then
begin
fileName:=path+temp+'[00].txt';
fileName:=ChangeName(fileName);
end;
FileHandle := FileCreate(fileName);
FileWrite(FileHandle, myMemo.text, length(myMemo.text));
FileClose(FileHandle);
end;
else
Application.MessageBox('fileUnique must be 0 or 1', 'Error !', 1);
end;
end;
Begin
myForm:=TForm.Create(nil);
temp:='';
lockdisplay;
try
BuildMyMemo;
GetMsgBody;
areHid:=AreHeadHid;
if areHid then ADo('ShowHeaders');
GetMsgBody;
if not allHeaders then
begin
temp:=GetMsgInfo('From:')+#13#10+GetMsgInfo('Subject:')+#13#10+GetMsgInfo('Newsgroups:');
temp:=temp+#13#10+GetMsgInfo('Date:')+#13#10+GetMsgInfo('Message-ID:')+#13#10+#13#10;
ADo('ShowHeaders');
temp:=temp+GetMsgBody;
myMemo.Text:=temp;
ADo('ShowHeaders');
end;
WriteF;
if areHid then Ado('ShowHeaders');
finally
unlockdisplay;
myForm.free;
//next 2 lines added to original script
ADo('HeaderlistPane');
PostKey(40, false, false, false, false, false, false, false, false);
end;
End.
Re: [dialog] how to archive Sent messages?
Author: Sven Svenson
Date: Mon, 02 Jun 2008 13:46
Date: Mon, 02 Jun 2008 13:46
23 lines
2292 bytes
2292 bytes
vince skrev:
> On Sun, 01 Jun 2008 22:33:09 +0200, Sven Svenson <ss@i.o> wrote:
>
>> Can't you just extract the 'sent' messages with something like
>> grep 'your from address' filename > sent
>
> grep allowed me to find msg.dat (grepped for a subject from the Sent
> folder). But, my limited knowledge of grep only lets me get individual
> lines that match a given pattern, effectively letting me extract a
> particular header, but missing the other headers and all of the body.
Use the -A and -B options.
-A NUM, --after-context=NUM
Print NUM lines of trailing context after matching lines.
Places a line containing -- between contiguous groups of
matches.
-B NUM, --before-context=NUM
Print NUM lines of leading context before matching lines.
Places a line containing -- between contiguous groups of
matches.
Re: [dialog] how to archive Sent messages?
Author: Frank Slootweg
Date: Mon, 02 Jun 2008 14:00
Date: Mon, 02 Jun 2008 14:00
66 lines
4629 bytes
4629 bytes
Ron Ford <ron@nowhere.net> wrote: > On 01 Jun 2008 17:15:55 GMT, Frank Slootweg wrote: > > > Rom <-@-.invalid> wrote: > >> On Sun, 01 Jun 2008 14:17:51 GMT, vince wrote: > >> > >>> On Sun, 1 Jun 2008 02:26:56 +1000, Rom <-@-.invalid> wrote: > >>> > >>>>This script can write the currently viewed message to a file: > >>>><http://www.40tude.com/dialog/wiki/index.php/FileSubject>. > >>> > >>> Thanks. Although I'll have to figure out how to use scripts with Dialogue > >>> and that one looks like it saves individual messages. Was hoping to save > >>> all of them at once in one file that I search for keywords. > >> > >> Although the script doesn't do exactly what you want it is better than > >> nothing, and even though I have no knowledge of programming or writing > >> such scripts, was able to alter it a little bit to make it easier to > >> save about 1000 copies of sent posts last time I used it. > >> > >> It would be good if there was a script to export all (selected) > >> messages from the Sent folder in mbox format to the one file, or even > >> if this script could be changed to save all to the one file. > >> Changing the saved files to mbox format isn't that hard, for importing > >> purposes, as each message needs a From_ line added before the first > >> line of the headers. > >> > >> The messages saved with this script can either be saved as separate > >> files or those with the same subject appended in the same file. I > >> found it works better if headers are already showing as an occasional > >> message was saved without the headers when the headers aren't. From > >> the script, I excluded the line with the asterisks, added switching > >> focus back to the headerlist pane, added a key to move up in the > >> headerlist pane, and assigned a button to the script, so all I had to > >> do was keep clicking the button I put on a toolbar. See below. > >> > >> Searching can be done in the Sent folder in Dialog, and if saved with > >> this script searching by keyword is easily done with Explorer in Vista > >> using its built-in Search, finds the file(s) and then can be opened in > >> whatever text editor. > > > > [much, much more deleted] > > > > "Ron Ford", are you paying attention!? :-) What was it again about > > someone needing saving, archiving and searching, saying "OE sucks" and > > calling someone else "daft for thinking OE has reasonable archiving", > > and then switching to Dialog? Who was that again? :-) > > > > And some think nsr *isn't* entertaining! It's bloody *hilarious*, but > > somewhat of a bummer that this cost me a perfectly fine laptop! > > I'm paying attention now. You will recall that I amended "daft" to > "misguided." I'm standing by "OE sucks." Yes, I remember your 'amendment'. It did't make things any better/ less_worse, so I basically ignored it. The *point*/fun_part however is, that *you*, a (previous) OE user, continued to deny OE's saving, archiving and searching capabilities - even in the face of overwheling evidence to the contrary - and said that "OE sucks", and then *you* switched to Dialog which - as now turns out - hardly has *any* of these/OE's capabilities! So *you* now can/should say "Dialog sucks"! :-) [...]
Re: [dialog] how to archive Sent messages?
Author: Rom
Date: Mon, 02 Jun 2008 18:13
Date: Mon, 02 Jun 2008 18:13
8 lines
1357 bytes
1357 bytes
On Mon, 02 Jun 2008 11:13:41 GMT, vince wrote: > The filename is hard coded in the script. Thanks for that, and it works fine. -- Rom
Re: [dialog] how to archive Sent messages?
Author: Rom
Date: Tue, 03 Jun 2008 03:55
Date: Tue, 03 Jun 2008 03:55
57 lines
3824 bytes
3824 bytes
On 02 Jun 2008 14:00:21 GMT, Frank Slootweg wrote: > Ron Ford <ron@nowhere.net> wrote: >> On 01 Jun 2008 17:15:55 GMT, Frank Slootweg wrote: >> >>> Rom <-@-.invalid> wrote: [...] >>>> Searching can be done in the Sent folder in Dialog, and if saved with >>>> this script searching by keyword is easily done with Explorer in Vista >>>> using its built-in Search, finds the file(s) and then can be opened in >>>> whatever text editor. >>> >>> [much, much more deleted] >>> >>> "Ron Ford", are you paying attention!? :-) What was it again about >>> someone needing saving, archiving and searching, saying "OE sucks" and >>> calling someone else "daft for thinking OE has reasonable archiving", >>> and then switching to Dialog? Who was that again? :-) >>> >>> And some think nsr *isn't* entertaining! It's bloody *hilarious*, but >>> somewhat of a bummer that this cost me a perfectly fine laptop! >> >> I'm paying attention now. You will recall that I amended "daft" to >> "misguided." I'm standing by "OE sucks." > > Yes, I remember your 'amendment'. It did't make things any better/ > less_worse, so I basically ignored it. > > The *point*/fun_part however is, that *you*, a (previous) OE user, > continued to deny OE's saving, archiving and searching capabilities - > even in the face of overwheling evidence to the contrary - and said that > "OE sucks", and then *you* switched to Dialog which - as now turns out - > hardly has *any* of these/OE's capabilities! Heh, if you're done rubbing 'is nose in it... Dialog's three default folders - Drafts, Outbox and Sent (DOS) have limited functionality and treated differently to other folders and groups. There's a way to copy (copies of) sent mail to other folders <http://www.40tude.com/dialog/wiki/index.php/Frequently_Asked_Questions#Q:_How_can_I_move_E-Mails_from_the_sent_folder.3F> but not for copies of sent Usenet posts, so it's really only saved copies of Usenet posts in the Sent folder that's the main problem. Messages in other folders and groups can be saved - to mbox file(s), and files saved to disk out of Dialog's db. While OE has reasonable saving, archiving and searching capabilities, they don't actually suck .. that bad, and OE does suck in other areas, as you previously wrote. I'd say saving, archiving and searching capabilities are probably improved in WM, and different, but think WM is/was a stopgap and WLM is intended to be its replacement. > So *you* now can/should say "Dialog sucks"! :-) D'ucks! -- Rom
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