Thread View: news.software.readers
5 messages
5 total messages
Started by Copelandia Cyanescens
Thu, 12 Aug 2004 22:21
[Dialog] Another Basic Script Question
Author: Copelandia Cyanescens
Date: Thu, 12 Aug 2004 22:21
Date: Thu, 12 Aug 2004 22:21
56 lines
3014 bytes
3014 bytes
Trying to cobble together something that's sort of a one button
"Enhanced Refresh View". This is where I'm at...
// *************
Program RefreshView;
procedure RefreshHeaderDisplayList();
begin
ADo('HeaderlistPane');
ADo('RefreshView');
PostKey(36, false, false, false, false, false, false, false, false);
end;
procedure JumpPane();
begin
Ado('ArticlePane');
end;
Begin
RefreshHeaderDisplayList();
JumpPane();
End.
// *************
I originally had everything together but broke it into two procedures to
try and isolate my problem. That problem being I can't seem to have my
cake and eat it too. :(
Including the JumpPane() procedure makes PostKey(36) apparently fail,
displaying the "next unread message" in the Header Pane, but with focus
on the Article Pane just like I'd like.
If I comment out JumpPane(), PostKey(36) apparently works fine, but of
course focus ends up in the Header List. Identical problem with or
without separate procedures.
I've also tried several variations that include sleep() to see if there
wasn't something about PostKey() that required a delay, as well as some
experiments with lock/unlockdisplay that had zero effect.
I've also tried several versions like...
Ado('HeaderlistPane');
PostKey(36, ....);
ADo('RefreshView');
I've *also* tried both settings for "Return To Last Active Article When
Returning To Group" in General Settings > Navigation... FWIW.
Suggestions?
And as an aside, what are all the key values for PostKey()? A resource
is fine. A method of determining them would be better. ;)
TIA!
Re: [Dialog] Another Basic Script Question
Author: MLC
Date: Fri, 13 Aug 2004 09:36
Date: Fri, 13 Aug 2004 09:36
43 lines
2089 bytes
2089 bytes
Hi _Copelandia Cyanescens_,
[...]
> Suggestions?
Here I am! ;-)
You can avoid that PostKey (which often causes problems) because there is
the ADo('FirstMessage') command.
Then your script becomes:
Program RefreshView;
begin
try
LockDisplay;
ADo('HeaderlistPane');
ADo('RefreshView');
ADo('FirstMessage');
Ado('ArticlePane');
finally
UnlockDisplay;
end;
end.
Begin
End.
>
> And as an aside, what are all the key values for PostKey()? A resource
> is fine.
A resource is the keycodes.exe little program (the zip is only 3.39 KB).
It's in German but you can understand very well what to do :)
The download link:
http://home.arcor.de/mschierlm/agttool/keycodes.zip
>
> TIA!
NP :)
--
Maria Luisa C - 13/08/2004 11.08.56
Re: [Dialog] Another Basic Script Question
Author: Copelandia Cyanescens
Date: Sat, 14 Aug 2004 03:41
Date: Sat, 14 Aug 2004 03:41
95 lines
3796 bytes
3796 bytes
MLC wrote...
>> Suggestions?
>
> Here I am! ;-)
I love you. <grin>
Thanks again, it works perfectly now. I didn't see "FirstMessage"
anywhere in the help files, and can't seem to locate it in the menus
structure...???
And another nit picky question...
try
LockDisplay;
...
finally
UnlockDisplay;
I see this typically written with Lockdisplay before try. Does it
matter? I don't experience the alleged "flickering" either way myself,
even when flipping panes and traversing header lists.
> A resource is the keycodes.exe little program (the zip is only 3.39 KB).
And again I thank you!
Could you, or someone, expand on the reasons why PostKey(...) is such a
bear? Why it won't work in situations like this??
> It's in German but you can understand very well what to do :)
And if I couldn't, I'd just ask my girlfriend to translate. She's a
German citizen in the States on a "green card", and she owes me one for
finding a way to dynamically search the 37K+/- HTML/PDF/DOC files on CD
she brought home from work the other day. <g>
In any case, here's the silly final product left diced up in procedures
because I have "plans", and another little bit of nonsense that seem to
help make reading high traffic groups a bit easier when assigned to a
couple icons in the tool bar and placed next to the standard message
navigation buttons. For me anyway. :)
// **********
//
Program RefreshView;
procedure RefreshHeaderDisplayList();
begin
Ado('HeaderlistPane');
ADo('RefreshView');
Ado('FirstMessage');
end;
procedure JumpPane();
begin
ADo('ArticlePane');
end;
Begin
lockdisplay;
try
RefreshHeaderDisplayList();
JumpPane();
finally
unlockdisplay;
end;
End.
// **********
// **********
Program MarkThreadRead;
Begin
lockdisplay;
try
Ado('HeaderlistPane');
ADo('CollapseThread');
ADo('MarkRead');
ADo('ExpandThread');
ADo('SkipToNextUnreadMessage');
Ado('ArticlePane');
finally
unlockdisplay;
end;
End.
//**********
--
"Just keep the cockpit door closed. You can put up a sign in
Arab - this is, say, type-casting, but say 'Try to hijack,
go to jail.' "
-- Sen. Fritz Hollings
Re: [Dialog] Another Basic Script Question
Author: MLC
Date: Sat, 14 Aug 2004 07:58
Date: Sat, 14 Aug 2004 07:58
157 lines
5048 bytes
5048 bytes
Hi _Copelandia Cyanescens_,
> MLC wrote...
>
>>> Suggestions?
>>
>> Here I am! ;-)
>
> I love you. <grin>
Good! ;)
>
> Thanks again, it works perfectly now. I didn't see "FirstMessage"
> anywhere in the help files, and can't seem to locate it in the menus
> structure...???
You can find it in the Customize buttons/shortcuts window, under Navigation.
If you want a list of all the actions you can use in your scripts, the
simplest way is to run a single line script that will show them all in the
debug panel:
Program ShowActions;
Begin
writeln(GetActionList);
End.
To have them in a text file (I think it is more comfortable to look up), I
made this script:
Program MyActionList;
const
//write here a valid path; the txt file doesn't need to exist,
//it is created by the script
filename = 'C:\Programmi\40tude Dialog\ListaComandi.txt';
var
myString: string;
list: TStringList;
Begin
list := TStringList.Create();
myString:=GetActionList;
try
list.add(myString);
list.SaveToFile(filename);
finally
list.free;
end;
End.
>
> And another nit picky question...
>
> try
> LockDisplay;
> ...
> finally
> UnlockDisplay;
>
> I see this typically written with Lockdisplay before try. Does it
> matter?
AFAIK it doesn't matter a lot, however I think you're right because the
UnlockDisplay is out of the try...finally block.
That was one of my slips :)
> I don't experience the alleged "flickering" either way myself,
> even when flipping panes and traversing header lists.
In this script me too. You can remove the LockDisplay.
In other cases instead it's useful, e.g. when you have to select text or
display the headers...
>
>> A resource is the keycodes.exe little program (the zip is only 3.39 KB).
>
> And again I thank you!
>
> Could you, or someone, expand on the reasons why PostKey(...) is such a
> bear? Why it won't work in situations like this??
I'm afraid I can't. I only see that often the Postkey is kicked by the
following statements.
>
>> It's in German but you can understand very well what to do :)
>
> And if I couldn't, I'd just ask my girlfriend to translate. She's a
> German citizen in the States on a "green card", and she owes me one for
> finding a way to dynamically search the 37K+/- HTML/PDF/DOC files on CD
> she brought home from work the other day. <g>
Then you managed it :)
>
> In any case, here's the silly final product left diced up in procedures
> because I have "plans", and another little bit of nonsense that seem to
> help make reading high traffic groups a bit easier when assigned to a
> couple icons in the tool bar and placed next to the standard message
> navigation buttons. For me anyway. :)
>
> // **********
> //
> Program RefreshView;
>
> procedure RefreshHeaderDisplayList();
> begin
> Ado('HeaderlistPane');
> ADo('RefreshView');
> Ado('FirstMessage');
> end;
>
> procedure JumpPane();
> begin
> ADo('ArticlePane');
> end;
>
> Begin
> lockdisplay;
> try
> RefreshHeaderDisplayList();
> JumpPane();
> finally
> unlockdisplay;
> end;
> End.
> // **********
>
> // **********
> Program MarkThreadRead;
> Begin
> lockdisplay;
> try
> Ado('HeaderlistPane');
> ADo('CollapseThread');
> ADo('MarkRead');
> ADo('ExpandThread');
> ADo('SkipToNextUnreadMessage');
> Ado('ArticlePane');
> finally
> unlockdisplay;
> end;
> End.
> //**********
Well done!
I'd suggest also to associate them with hotkeys, it's fine navigating with
the keyboard.
Cheers,
--
Maria Luisa C - 14/08/2004 9.20.56
Re: [Dialog] Another Basic Script Question
Author: Copelandia Cyanescens
Date: Mon, 16 Aug 2004 03:45
Date: Mon, 16 Aug 2004 03:45
51 lines
3534 bytes
3534 bytes
MLC wrote...
>> Thanks again, it works perfectly now. I didn't see "FirstMessage"
>> anywhere in the help files, and can't seem to locate it in the menus
>> structure...???
>
> You can find it in the Customize buttons/shortcuts window, under Navigation.
Oh. It's *that* easy to find... <grin>
> If you want a list of all the actions you can use in your scripts, the
> simplest way is to run a single line script that will show them all in the
> debug panel:
Thanks once again. A real big help. It's neat that the list includes
custom scripts. In fact I'm left wondering if those scripts can't be
called from other scripts now...???
>> I see this typically written with Lockdisplay before try. Does it
>> matter?
>
> AFAIK it doesn't matter a lot, however I think you're right because the
> UnlockDisplay is out of the try...finally block.
> That was one of my slips :)
You're going to have to quit showing me your slips in public. People
will begin to talk. ;-)
>> I don't experience the alleged "flickering" either way myself,
>> even when flipping panes and traversing header lists.
>
> In this script me too. You can remove the LockDisplay.
> In other cases instead it's useful, e.g. when you have to select text or
> display the headers...
I see. I hadn't tried either one yet, but that's where I'm headed. I'm a
big PGP/GnupPG fan and I'd like to eventually put something together
that allowed Dialog to integrate a bit better than the standard "current
window" stuff most people use when an application doesn't have native
PGP support.
Thanks again my friend, and I hope that some day I can return the favor
twice over. :)
--
"The last time I checked, the Constitution said, 'of the people,
by the people and for the people.' That's what the Declaration
of Independence says."
-- Bill Clinton
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