TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: Gerald Miller
from: Jasen Betts
date: 2002-11-02 15:01:10
subject: XBOOT3.BTM

Hi Gerald.

31-Oct-02 09:01:34, Gerald Miller wrote to Jasen Betts

here's what I did to it.

*** no changes before here ***

::  Next command establishes the location and name of the variable
"tempfile"
::  that holds the tempfileorary information while the action is performed.
  set tempfile=%{at}unique[%temp]

::  User input
  if [%1]==[-?] .or. [%1]==[/?] .or. [%1]==[?] goto USAGE

::  Is the file XBOOT3.DAT there?  Where?
  iff not exist %bootfile then
    echo.
    color bri red on whi
    echo ERROR: %{at}path[%{at}search[%0]]%{at}name[%0].DAT not found!
    color bri cya on bla
    echo.
    delay 5
    goto END
  endiff

::  Set variables. If XBOOT3 did it's job today already or it's before
::  00:01 am, do nothing. In this case, the "start" time is 00:01 am....
  set lastdate=%{at}date[%{at}filedate[%bootfile]]
  set today=%{at}date[%_date]
  set dotime=00:01

  if %{at}eval[%lastdate - %today] eq 0 .or. %{at}eval[%{at}time[%_time] - %=
%{at}time[%dotime]] le 0 goto END

::  Read XBOOT3.DAT, look at which progs to run today, copy info to
::  XBOOT3.TMP and update XBOOT3.DAT
  set i=0
  echo.

set df=%{at}replace[2,d,%{at}replace[20,yy,%{at}replace[1,m,%{at}makedate[14936]]]]
:: df is local date format.
text>%tempfile
PATH\PROGRAM TO RUN                      ³AFTER³        ³        ³DAYS ³
                                         ³ DAYS³LAST RUN³NEXT RUN³ LEFT³ASK
endtext
echo ÄÄÄÄ 001 %{at}repeat[Ä,32]ÅÄÄÄÄÄÅ%df%Å%df%ÅÄÄÄÄÄÅÄÄÄ >> %tempfile
set 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]]
    set last=%{at}instr[48,8,%{at}line[%bootfile,%n]]
    set next=%{at}instr[57,8,%{at}line[%bootfile,%n]]
    set left=%{at}instr[66,5,%{at}line[%bootfile,%n]]
    set ask=%{at}instr[72,1,%{at}line[%bootfile,%n]]

    iff %{at}eval[%today-%{at}date[%last]] ge %when .and. "%prog" ne
"" then
      iff "%ask" eq "Y" then
        beep 294 2 330 2 277 2 294 2 330 2 277 2 294 2 330 2 277 2 294 2
        beep 330 2 0 2 139 2 165 2 196 2 233 2 277 2 466 2 554 2 659 2
        beep 784 2 932 2

        scrput %_row %{at}eval[17+%{at}len[%prog]] bri yel on bla `Y`
        inkey /c/K"YN[esc][enter]" `Execute `%{at}upper[%prog]` [Y/N] ?` %%ink
        echo.
        iff "%ink" eq "Y" .or. "%ink" eq
"{at}28" then
          set i=%{at}inc[%i]
          set run%i=%prog
          set last=%{at}makedate[%today]
        endiff
      elseiff "%ask" eq "N" .or. "%ask" eq
"" then
        set i=%{at}inc[%i]
        set run%i=%prog
        set last=%{at}makedate[%today]
      endiff

    elseiff "%prog" == "" then
            iterate
    endiff

    set nextdate=%{at}eval[%{at}date[%last]+%when]
    set daysleft=%{at}eval[%nextdate - %today]
    echo %{at}format[-41.41,%prog]³%{at}format[-5.5,%when]³%{at}format[-8.8,%last %=
      ]³%{at}makedate[%nextdate]³%{at}format[-5.5,%daysleft]³%ask>>%tempfile

    unset /q prog daysleft nextdate
  enddo
  unset /q next,
  move /q/u %tempfile %bootfile >& nul
    iff "%i" ne "0" then
      do m=1 to %i
        echo. %+ echo.
        color bri whi on whi
        echos XBOOT3 Program Execution:
        color bri cya on bla
        echo  %{at}upper[%[run%m]]
        echo.
        call %[run%m]
        {at}echo off
      enddo
    endiff

    echo.
    color bri red on whi
    echos XBOOT3 END
    color bri cya on bla
    echo.

:END
    color bri cya on bla
    if exist %tempfile del /q %tempfile > nul
    endlocal
    color bri cya on bla
    quit

*** no changes after here ***

 -=> Bye <=-

---
* Origin: Optimization hinders evolution. (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™.