Subj : @-codes in a String
To   : ASCII Express
From : Digital Man
Date : Mon Jan 27 2014 04:07 pm

 Re: @-codes in a String
 By: ASCII Express to All on Sat Jan 25 2014 10:35 pm

> I've jumped in with both feet and have started writing my own command
> shell. It has gone well so far. I have an annoying problem though..
>
> I want to display a textfile based on the current message sub-board. I know
> Synchronet has this, but I need to do it myself. I thought I'd put the
> filename into a string variable.
>
> str fn
> sprintf fn "%%zrooms/%s" "@SUB@"
> printfile fn
> but it has unpredictable results. It seems to set it to the command string.
> I also tried
>
> set str "%zrooms/@SUB@"
>
> but the @-code didn't expand.

@-codes are used for display purposes usually and cannot be used to expand
values in strings in Baja.

> How can I do this? Thanks.

I'm sort of surprised, but I cannot find a way to do this in Baja. There's no
command-line (%) specifier for the current sub-board internal code nor any Baja
"system variable" for that string.

This is rather trivial in JavaScript however (bbs.cursub_code is a string which
contains the current sub-board's internal code), so perhaps you could just
write a small JavaScript to display this file and exec that script form your
Baja script.

                                           digital man

Synchronet "Real Fact" #77:
Synchronet Match Maker had at one time over 4000 profiles of men and women.
Norco, CA WX: 66.9�F, 52.0% humidity, 5 mph SE wind, 0.00 inches rain/24hrs

---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net