🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #218593

Re: 40tude Dialog: Sorting on watched flag. Need help with script.

#218593
From: VanguardLH
Date: Sat, 05 Apr 2008 17:54
56 lines
4026 bytes
VanguardLH wrote:

> VanguardLH wrote:
> 
>> So other than when ADo() is used to change focus and then use 
>> PostKey(), it seems to get the keystrokes in a newly opened window 
>> that I must either:
>> 
>> - Use ADoLater() that will accept what PostKey() buffered up.
>> - Use PostKey() first to buffer up the keystrokes and then use ADo() 
>> to open the window.
>> 
>> I'll see what happens if I do the 2nd scheme.  I can't find any 
>> documentation on ADoLater() to know how to use it.  
> 
> Okay, I moved the ADo() command to *after* the PostKey() commands and it
> works better (but not yet perfect).  So now I have:
> 
>    ...
>    lockdisplay;             
>    ADo('Watch');
>    <PostKey commands here>
>    ADo('MessageProperties');
>    unlockdisplay;
>    ...
> 
> The dialog pops up very quickly (almost can't be seen unless I run the
> script many times).  The watch flag gets added and the score gets set to
> 9999.  So I'm almost there.
> 
> The problem now is that the 'if' command doesn't work.  When I use the
> script on a message (that is not watched and not scored), the script
> sees the watch flag got set so it runs the 'then' clause of the 'if'
> command to set the scoring value to 9999.  However, when I run the
> script a 2nd time (to clear the watch flag and try to zero out the
> score), the watch flag comes off but AEnabled('Watch') is still
> returning 'true' so the value gets set to 9999 (what it is before)
> instead of zero.
>  
> So there is still some more playing around with the script to do.

My guess, at this point, is that AEnabled() and AChecked() won't work to
test if the watch flag is set or not.  AEnabled(), according to its
extremely terse one-line description via the comment shown in the help
after this function, checks if the object is enabled.  Enabled and
disabled usually is an object attribute that specifies whether or not
the object can be selected (whereas the visible attribute is to
determine if it appears or not in the window).  The "W" menu entry is
always enabled.  That is why the 'then' clause of "if (
AEnabled('Watch') )" always gets ran to set the score to 9999 because it
is always true that the "W" (watch) menu item is enabled.  AChecked()
looks to be for checkbox or radiobox controls.  The "W" menu entry is
not a checkbox or radiobox but instead a trigger that merely toggles the
current watchstate variable.

So how else might I test if the watch flag is set or not?
Technical Details
Message-ID: <ft8ebs$uno$1@registered.motzarella.org>
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!newsfeed.kamp.net!newsfeed.kamp.net!news.motzarella.org!motzarella.org!not-for-mail
References: <ft6i1v$clo$1@registered.motzarella.org> <6aod2sok6yhy.1i6rae0xm67m$.dlg@40tude.net> <c8ydnV0pwK90K2ranZ2dnUVZ_v-hnZ2d@comcast.com> <ft8dp0$r5s$1@registered.motzarella.org>

Show Full Headers
Complete Article Headers
Message-ID: <ft8ebs$uno$1@registered.motzarella.org>
Subject: Re: 40tude Dialog: Sorting on watched flag. Need help with script.
Date: Sat, 5 Apr 2008 12:54:11 -0500
From: VanguardLH <V@nguard.LH>
References: <ft6i1v$clo$1@registered.motzarella.org> <6aod2sok6yhy.1i6rae0xm67m$.dlg@40tude.net> <c8ydnV0pwK90K2ranZ2dnUVZ_v-hnZ2d@comcast.com> <ft8dp0$r5s$1@registered.motzarella.org>
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!newsfeed.kamp.net!newsfeed.kamp.net!news.motzarella.org!motzarella.org!not-for-mail
Newsgroups: news.software.readers
Organization: A noiseless patient Spider
Lines: 56
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: feeder.motzarella.org
 U2FsdGVkX1/UtUTWQyWNewYoAGjM5PT+BLzVX5kGMQYdsq8bldV1AJse7gIbuv1daCV+HbISnlMZ3q2/BNGnhI+iaPErkxGhVBCxY2trNwG0vE1R15nFaI7I5ST61jp7rsYwwCr3C5OrWkL4auQQpw==
X-Complaints-To: Please send complaints to abuse@motzarella.org with full
 headers
NNTP-Posting-Date: Sat, 5 Apr 2008 17:54:05 +0000 (UTC)
X-Auth-Sender: U2FsdGVkX18C2j9sEE8FZk5UwENQpMs/nvs4ZiIUAh4+qlrYadW7Sw==
Cancel-Lock: sha1:8lSixQRasEQmmn0y30MJ9LZ7HeU=
User-Agent: 40tude_Dialog/2.0.15.1