🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #147241

Re: [slrn] macro help please

#147241
From: Mike Vanecek
Date: Thu, 29 Apr 2004 01:07
47 lines
2389 bytes
On 27 Apr 2004 15:45:55 GMT, J.B. Nicholson-Owens wrote:
> Mike Vanecek wrote:
>> definekey("my_quit_group", "\033[24~", "article");

> Here you need to include the name of the namespace ("my").

>> .slrnrc has [...]
>> setkey article my->my_quit_group "%"

> If you want to define the key to be F12 and set that in the macro proper,
> you don't need this setkey statement.  Generally, it's better to define the
> keys in your slrnrc so the key definitions are all in one place and it's
> easier to coordinate which keys call which function.

>> S-Lang Error: Undefined Name: my_quit_group is undefined
>> Why am I getting the error message?

> Because my_quit_group is the same as Global->my_quit_group() which does not
> exist.  my->my_quit_group() exists and should run if you press the percent
> sign key.

Thank you for the advice, it was very helpful. I do the setkey to F12 in
.slrnrc now.

OK, making progress. This works, but is not pretty.

implements ("my");
static define my_quit_group ()
   {
      set_integer_variable("query_next_group",0);
      set_integer_variable("confirm_actions", 0);
      call("catchup_all");
      call("next");
      set_integer_variable("query_next_group",1);
      set_integer_variable("confirm_actions", 31);
   }

I should probably test the contents of query_next_group and not set it to 0
if is already 0 and not set it back to 1. Ditto for confirm_actions since all I
really want to do is decrease it by 1 and then restore it. Any shortcuts on 
doing that??



-- 
  Thanks, Mike.
Technical Details
Message-ID: <mq06m1-s4q.ln1@news.invalid.99computer>
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.ash.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!nntp.giganews.com!news.glorb.com!newscene!novia!novia!sequencer.newscene.com!not-for-mail
References: <rc32m1-4mc.ln1@news.invalid.99computer> <slrnc8t01h.6s8.jbn@forestfield.org>

Show Full Headers
Complete Article Headers
Message-ID: <mq06m1-s4q.ln1@news.invalid.99computer>
Subject: Re: [slrn] macro help please
Date: Thu, 29 Apr 2004 01:07:25 +0000
From: Mike Vanecek <MikeV99@privacy.net>
References: <rc32m1-4mc.ln1@news.invalid.99computer> <slrnc8t01h.6s8.jbn@forestfield.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.ash.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!nntp.giganews.com!news.glorb.com!newscene!novia!novia!sequencer.newscene.com!not-for-mail
Newsgroups: news.software.readers
Lines: 47
X-Archive: encrypt
User-Agent: slrn/0.9.8.0 (Linux)