🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #172864

Re: [Dialog] Script problem - where could I place (hook) it?

#172864
From: Marsjanin
Date: Tue, 06 Sep 2005 20:28
90 lines
4629 bytes
  Rok 2005 - wrzesień. Dokładnie to wtorek, 6-go. Nieco po 20-ej.
  Nagle zza rogu Marcus Mönnig wrzuca na news.software.readers:

>> Originally it was hooked at ARTICLELV_WM_KEYUP and works perfectly,
>> but just when focus was in the msg-list panel. I want the script
>> to work with focus in body panel - but in BODYPANEL function
>> WM_KEYUP doesn't work at all.  :-( 
>> Where can I hook it?
> The mouse message is not send to the control that currently has
> focus, but to the control that is under the mouse cursor. 

It's well to know it - but I use mouse rather occasionally in Dialog.

> BODYPANEL is the control in which the body editor (though
> read-only), the header panel and the message parts tree are located
> in. Try to hook it with BODYEDIT_WM_KEYUP.

This is it! I didn't try it, because I though, this is rather a window
with new post editor.  :-)

But not all the problems is solved...

I got a problem also when script is hooked to ATRICLELV (and a focus
is there, of course) (script is on bottom of this post):

When I press U or D (Doktor does add few lines to the script for me,
to make the script process itself just after the some (not all) keys
pressed - we deduced key-codes with "writeln" instruction), the
message-select cursor is moving the right way, and I hear a beep
(added "beep()" instruction to have a control).

It works, when *there is a message*, to that Dialog can skip, doing
the native instruction (U, D, SPACE etc.).

When there is no message as above (e.g. U key on the first message on
top, or D key on last on bottom) Dialog running this script skips to a
previous in history (I think so), even to another group. And when key
is pressed again, to "next" in history (it swaps two messages).

How to walkaround this? Maybe I should delete all the "markers" on
beginning of the procedure? If, yes, how to do it?

I think, when current message is the first in the topic, script
doesn't change message view, when doing "collapse all threads", and
then, the "previous marker" is not the one, that should be - just the
*previous*. I think this could be this...

Thanks a lot for the answer, and sorry for my impatience in
<w35n5z4xzeiy$.dlg@marsjanin.tk> ...  ;-)  If it's not cancelled yet.
:-)


========

program BODYEDIT_WM_KEYUP;

procedure ExpandAndCollapse ();
  begin          
    lockdisplay;
    ADo ('ClearMarkers')
    ADo ('AddMarker');
    ADo ('CollapseAllThreads');
    ADo ('ExpandThread');
    ADo ('GoToPreviousMarker');
    unlockdisplay;
    
    beep();

  end;

procedure OnWMessage (var Msg : TMessage; var handled : boolean);
  begin

    // kody klawiszy

    if ((Msg.WParam = 32) or (Msg.WParam = 38) or (Msg.WParam = 40) or (Msg.WParam = 85) or (Msg.WParam = 68))
      then ExpandAndCollapse ();
    handled := false;
  end;
 
begin
end.

========

-- 
  Pozdrawiam,  Marsjanin.  MSN :  marsjanin.tk@hotmail.com
  A może to nie Ranish, tylko zasilacz?  :-(  <http://skocz.pl/ranish>
  Gra:  Neil Landstrumm :  /Brown By August/ :  1.  "Shuttlecock"
  Brzmi:  Blade,  44  kHz,  320  kbps,  Stereo.
Technical Details
Message-ID: <1wjndcpczdr7p$.dlg@marsjanin.tk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.germany.com!news.nask.pl!newsfeed.gazeta.pl!news.gazeta.pl!not-for-mail
References: <2lrsarpzddty$.dlg@marsjanin.tk> <abljzaztye9t$.1iybcbmnyt94g.dlg@40tude.net>

Show Full Headers
Complete Article Headers
Message-ID: <1wjndcpczdr7p$.dlg@marsjanin.tk>
Subject: Re: [Dialog] Script problem - where could I place (hook) it?
Date: Tue, 6 Sep 2005 22:28:43 +0200
From: Marsjanin <09.2005.usenet@marsjanin.tk>
References: <2lrsarpzddty$.dlg@marsjanin.tk> <abljzaztye9t$.1iybcbmnyt94g.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.germany.com!news.nask.pl!newsfeed.gazeta.pl!news.gazeta.pl!not-for-mail
Newsgroups: news.software.readers
Organization: H&D
Lines: 90
Reply-To: 09.2005.usenet@marsjanin.tk
NNTP-Posting-Host: dcu224.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-2"
Content-Transfer-Encoding: 8bit
X-Trace: inews.gazeta.pl 1126038576 12552 83.23.72.224 (6 Sep 2005 20:29:36
 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Tue, 6 Sep 2005 20:29:36 +0000 (UTC)
X-Face: "">i,YT<@)(agU"+'B<v4/]QqK$B%(OVp}}K\BYIX70s/VQ(X+<'v`bDa|I'#Xft~#Hdmcx
 qH/hXeo\`6/B; eU*ZPo.WK6s%g`2P39L#Mu(t78E~l)M;
 1!H_T4rXS{l10<gw]4`>`IxLBlM5PSon- ^Tq/]ivdvM[m\&PER\BAT{=Y!lpJ@Gh4R0p;
 [^5BH(b/O%!}kb#32C
X-User: ninajsram
User-Agent: 40tude_Dialog/2.0.15.1pl Hamster/2.0.7.0