Article View: news.software.readers
Article #35219Re: [SLRN] Help w/macro please
From: Pardoz
Date: Wed, 16 Jul 1997 00:00
Date: Wed, 16 Jul 1997 00:00
48 lines
2278 bytes
2278 bytes
On Wed, 16 Jul 1997 03:42:18 +0200, Bjoern Frantzen <bjoff@bgnett.no> wrote:
>Pardoz <pardoz@io.com> wrote:
>
>> I'm trying to write a slrn macro using select_list_box to set the
>>non_Xbrowser variable - I want to be able to choose between starting up
>
>A very good idea!
Here's a working version of the macro to do it (I hammered it out
last night after digging up an up to date copy of the slang docs). It
is, I think, reasonably self-documenting and easily extensible if you
want to add more browser choices, and it would be easy enough to modify
to select an X browser instead. (Figuring out how to make it test for
X and present an appropriate menu based on mode is beyond me, however.)
%URL picker
define picker ()
{
variable browservbl;
variable rsp;
variable status = get_variable_value ("non_Xbrowser");
rsp = select_list_box ("Select Browser:",
"Lynx", "Bookmark", "Download", 3,
2);
switch (rsp)
{ case "Lynx" : browservbl = "lynx2.cmd %s" }
{ case "Bookmark" : browservbl = "echo %s | geturl.cmd > nul" }
{ case "Download" : browservbl = "echo %s | downurl.cmd > nul" }
set_string_variable ("non_Xbrowser", browservbl);
call ("browse_url");
set_string_variable ("non_Xbrowser", status);
}
definekey ("picker", "U", "article");
--
RIOT, n. A popular entertainment given to the military by innocent
bystanders. (A. Bierce, _The Devil's Dictionary_)
http://www.io.com/~pardoz (Liaden Universe mailing list home page)
http://www.io.com/~pardoz/mythos.html (Mythos Adventure Archive)
Technical Details
Message-ID:
<slrn5spe55.26.pardoz@io.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn5sn34c.8o.pardoz@io.com> <slrn5so9nt.1u.bjoff@bgnett.no>Show Full Headers
Complete Article Headers
Message-ID: <slrn5spe55.26.pardoz@io.com> Subject: Re: [SLRN] Help w/macro please Date: Wed, 16 Jul 1997 00:00:00 +0000 From: pardoz@io.com (Pardoz) References: <slrn5sn34c.8o.pardoz@io.com> <slrn5so9nt.1u.bjoff@bgnett.no> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 257256933 Sender: pardoz@free1-slip216.tele.queensu.ca Organization: Illuminati Online Reply-To: pardoz@io.com Newsgroups: news.software.readers