| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | XBOOT3.BTM |
Hi Gerald.
here's a solution to the date format problem.
what I do is set up a variable containing the conversion expression that
converts between date formats then just use that variable to extract a
converted form of the date when reading the file... theat way the
conversion only needs to be figured out once and can be reused af often as
needed.
text>%tempfile
PATH\PROGRAM TO RUN ³AFTER³ ³ ³DAYS ³
³ DAYS³LAST RUN³NEXT RUN³ LEFT³ASK
endtext
echo ÄÄÄÄ %{at}format[03.3,%country] %{at}repeat[Ä,32]Å%=
ÄÄÄÄÄÅ%df%Å%df%ÅÄÄÄÄÄÅÄÄÄ >> %tempfile
set orig=%{at}instr[48,8,%{at}line[%bootfile,2]]
iff %orig == %df then
set dateconversion=%%date
else
:: build a date conversion expression in a variable...
set dateconversion=%=
%%{at}instr[%{at}index[%orig,%{at}instr[0,2,%df]],2,%%date]%{at}instr[2,1,%df]%=
%%{at}instr[%{at}index[%orig,%{at}instr[3,2,%df]],2,%%date]%{at}instr[5,1,%df]%=
%%{at}instr[%{at}index[%orig,%{at}instr[6,2,%df]],2,%%date]
:: aren't interpreted languages fun!
echo.
echo Converting date format from %orig to %df using expression:
set dateconversion
echo.
endiff
unset orig df
do n=3 to %{at}lines[%bootfile]
set prog=%{at}instr[0,41,%{at}line[%bootfile,%n]]
set when=%{at}instr[42,5,%{at}line[%bootfile,%n]]
:: convert last to local format
set date=%{at}instr[48,8,%{at}line[%bootfile,%n]]
set last=%dateconversion
:: next is never used but I'll convert it too :)
set date=%{at}instr[57,8,%{at}line[%bootfile,%n]]
set next=%dateconversion
set left=%{at}instr[66,5,%{at}line[%bootfile,%n]]
set ask=%{at}instr[72,1,%{at}line[%bootfile,%n]]
-=> Bye <=-
---
* Origin: Green eggs and ham: Environmentally sound produce. (3:640/531.42)SEEN-BY: 24/903 120/544 123/500 400/300 633/104 260 262 267 270 284 285 SEEN-BY: 640/531 954 1674 690/682 713/615 771/4020 774/605 800/1 2432/200 @PATH: 640/531 954 774/605 633/260 285 267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.