home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
4
/
4dostip6.zip
/
4DOSTIP6.MSG
next >
Wrap
Text File
|
1993-01-04
|
323KB
|
9,030 lines
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/26/1992
To: TONY DUNLAP Num: 104 Date: 10/23/1992
From: DAYTON LIVINGSTON Re: Time: 10:23 am
Subj: 4Dos V4.01 & 4.01B Prvt: N Read: N
DM> So am I, in part. I use both, with the 4DOS internal LIST
DM> aliased to SHOW. For big files and complex tasks, Buerg's
DM> utility can't be equaled. For small files and speed, the 4DOS
DM> internal gets the nod, since invoking it is quicker than calling
DM> LIST as an external. I just wish 4DOS didn't call it's internal
DM> browser LIST. The name conflict is simple enough to work around,
DM> but it would be simpler still if we didn't have to.
TD> I use both as well, except I didn't use a second alias,
TD> when I want 4dos' list I just type *list.
TD> Maybe we could make an alias, that, if a file was over a
TD> certain size, use Buerg's list else use 4dos' list.
Hmmm... Doesn't sound too difficult:
ALIAS LOOK=`IFF %@FILESIZE[%1,K] LT 100 THEN^*LIST %1^...
...ELSE^C:\UTILS\list.com %1^ENDIFF`
(All on one line where the dots are, of course, and of course, if
it's in your ALIAS file, you don't need the back-quotes. And of
course, you can substitute whatever size you like.)
This will, of course, error out on *LIST and call LIST.COM if no
parameters are given (you'll get an "unknown command "endiff"
error on exiting LIST.COM as well, but so what?) Works fine
here! And of course, it could be made bigger and avoid the
errors as well. The only potential problem I found is that it
won't neccessarily work as expected if two or more files are
entered as arguments (hence %1 vice %&) since *LIST supports
multiple arguments while LIST.COM doesn't.
- Dayton
* OLX 994 * To Serve And Protect - TRADITIONAL MOTTO OF RACKETEERS
--- Maximus 2.00
* Origin: T.V. BBS - Glendale, AZ - (602) 930-8542 (1:114/148)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/26/1992
To: DAYTON LIVINGSTON Num: 118 Date: 10/23/1992
From: WILLIAM HUGHES Re: Time: 1:48 pm
Subj: 4dos v4.01(b)/list.ct Prvt: N Read: N
DL>Actually, though I use 4DOS's LIST 99% of the time, there are
>times when LIST.COM is better for my purposes. Primarily when
>I've got a few dozen text files that I need to view & delete one
>by one.
Off the top of my head...
for %a in (*.txt) (
list %a
inkey Delete? (y/N) %%KILL
if %KILL==Y del %a > nul
set KILL=N
)
* SLMR 2.1a *
--- MsgToss 2.0b (r)
* Origin: Nul 512-615-NUL1 HST/V32b,615-NUL2, NUL3, 1.2Gig (1:387/255)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/26/1992
To: WILLIAM HUGHES Num: 100 Date: 10/23/1992
From: PHI NGUYEN Re: Time: 2:23 pm
Subj: Mulpprmp.btm - most obnox Prvt: N Read: N
PN> *ahem* :-)
OK! So it was you! I quoted your message to disk but didn't quote your name!
It is a good idea to include your name into the BTM file!<G>
PN> I rewrote the whole thing last week in much the same manner as
PN> you did. I also put the unchanging flags (versions, shell level,
PN> etc.) in 4START, so as to speed up the prompt. It's down to about
PN> a half-second on my 286-16.
One thing I noted about your RANDOM.COM is that it returned 1 to n while
%@lines and %@line begin with zero. The way that I wrote, the first line in
the TAGLINE file will never be displayed!
Here is the change I think is needed:
RANDOM %@eval[%@lines[tagline.txt]+1]
set TAGLINE=%@line[tagline,%@eval[%? - 1]
Phi
--- GEcho 1.00/beta
* Origin: The Transporter Room: 8 lines 4 gig 5 CD's 704/567-9513
(1:379/1.1)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/26/1992
To: JACK STEIN Num: 125 Date: 10/22/1992
From: HUGO LANDSMAN Re: Time: 2:36 pm
Subj: REXX 4dos Prvt: N Read: N
Hi Jack,
16 Oct 1992 16:49, Jack Stein (1:129/171@fidonet) wrote to Dennis Mccunney:
JS> What I was thinking was passing the VAR from a shell to the master
JS> enviroment. I reckon that's not feasable, and UNIX I think uses the
Ah, that's easy: just use the /M option on SET.
JS> EXPORT function to do what DOS does by default.
And that's the hard part: you have to teach the subshells to somehow reread
the master environment when it's been changed. Something like:
alias import=
iff %@eval[%_shell+%_dv+%_win]=0 then ^ rem should be save now
set exported=
else
set/m exported|input %%doimport
iff "%exported" ne "%doimport" then ^ rem someone did an export
set exported=%doimport
for %a in (%doimport) (set/m %a|input %%%%%a)
endiff
endiff
prompt %@exec[import]$p$g
alias export=
set/m %1=%2&
set/m exported|input %%exported
set/m exported=%exported %1
import
JS> up to is very likely beyond my knowledge. My experience has been
JS> endiff errors were always problems with my construct, and I always
JS> assume I'm doing something wrong, and so far, I've been right! :-)
Yeah! :-)
regards,
hugo
--- FastEcho 1.21/b3
* Origin: st. anna pbbs, nijmegen nl (2:512/154.5@fidonet.org)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/26/1992
To: PAUL CARROLL Num: 114 Date: 10/23/1992
From: RAYMOND BERIAU Re: Time: 12:25 pm
Subj: date/archive Prvt: N Read: N
Greetings Paul!
Answering/Quoting a message from Paul Carroll to Neal Jackson:
PC> I use DAYNBR to do this...
There is an even easier way of doing this (the 4DOS WAY) than calling that
large DAYNBR program:
set tjd=%@eval[%@date[%_date]-%@date[1-1-%@substr[%_date,1,-2]]+1]
The "TJD" stands for "Today's Julian Date"... :)
Also, a few weeks back, a .BTM file called DNR was released in here that
would do everything DANYBR does, but using only 4DOS commands.
PC> ...here's part of my BBS batch file to show you how I rename my logs
PC> and move them into an archive.
Thus, that batch file of yours would become:
:compresslog
pushd d:\log
set tjd=%@eval[%@date[%_date]-%@date[1-1-%@substr[%_date,1,-2]]+1]
ren *.log *.%tjd ^ arj a logfile *.%tjd ^ del *.%tjd
popd ^ goto loop
Shorter and faster than before ... more so if you call it {filename}.BTM
Raymond.
--- GoldED 2.40.P0720
* Origin: INFODATA Service d'Informations * Basses Laurentides (1:242/90)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/26/1992
To: NEAL JACKSON Num: 127 Date: 10/22/1992
From: HENK SIMMELINK Re: Time: 6:36 pm
Subj: date/archive Prvt: N Read: N
Hello Neal!
Sunday October 18 1992, Neal Jackson wrote to himself:
NJ>> Is there a way to have a 4DOS .BTM file rename a archived backup file
NJ>> with the current date? The format of the date/filename is not
NJ>> important.
NJ> I guess I jumped the gun here. I found the %@substr variable and it
works
NJ> just fine.
If you want a neater (IMHO :-) method, try this:
arj a d:\%@date[%_date]
Why should you use this? If you decide to have the old files automatically
deleted just use this:
del d:\%@eval[%@date[%_date]-28].arj
This is the way I do reduce the disk space used by FD.log:
iff exist c:\user\log\fd.log then
copy c:\user\log\fd.log c:\user\log\%@date[%_date].log
rem>c:\user\log\fd.log
arj m -jf1 c:\user\log\fd c:\user\log\%@date[%_date].log
arj d c:\user\log\fd %@eval[%@date[%_date]-28].log
endiff
Yours sincerely,
Henk `HeSitated' Simmelink
P.S. The COPY .... / REM>.... sequence is ment to maintain the right order of
the files in the log directory...
--- GEcho 1.00/beta+
* Origin: (2:283/4.6)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/27/1992
To: GREGORY P. SMITH Num: 117 Date: 10/22/1992
From: JASEN BETTS Re: Time: 3:26 am
Subj: Touching file in 4dos?? Prvt: N Read: N
GP>Well, I've got DR-Dos 6.0, apparently MS was stupid enough not to
GP>include a touch utility with their dos. Anyways, I looked at the
GP>Borland touch that I've got here. It'll set a file date and time to
GP>the current date and time. So if you save the current date and time in
GP>a variable, set it to what you want to make the file, touch it, and
GP>restore the time it should work okay...
The alias for a msdos version of touch is... (get ready to spew)
alias touch for x in (%%&) do command /c copy %%x+,,
--- Maximus 2.01wb
* Origin: Mirth Control Chch, NZ 64-3-3890898 v32b/v42b/FAX (3:770/140)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/28/1992
To: ALL Num: 90 Date: 10/23/1992
From: SAUL LEVY Re: Time: 2:28 pm
Subj: DISKTOT.BTM Prvt: N Read: N
All,
Here is a little utility based on DISKLEFT.EXE version 2.3 by
Paul Munoz-Colman (DISKLF23.ZIP, 28K). DISKLEFT can give the
total disk, free and used capacities for all of your drives, but
I prefer the order shown below and to also have percentages.
So I wrote the following batch file:
============================== CUT HERE ================================
@echo off
rem DISKTOT.BTM by Saul Levy, Tucson, Arizona, 10/22/92, version 1.1
rem Change drive list, %blanks string, and %blanks string output lengths
rem to suit
rem This version handles 999999999, totals of 9999999999 and percentages
rem from 0 to 100 (the latter are rounded up to the next higher % as
rem needed)
rem Main routine
setlocal
set blanks=` `
echo `Drive Total Used % Free %`
echo `=======================================================`
for %a in (C: D: E: F: G: H:) do gosub getnums
echo `=======================================================`
set dutp=%@int[%@eval[%dut/%dtt*100+.5]]
set dftp=%@int[%@eval[%dft/%dtt*100+.5]]
echos Total %@substr[%blanks,0,%@eval[10-%@len[%dtt]]] %dtt
echos %@substr[%blanks,0,%@eval[10-%@len[%dut]]] %dut
echos %@substr[%blanks,0,%@eval[3-%@len[%dutp]]] %dutp
echos %@substr[%blanks,0,%@eval[10-%@len[%dft]]] %dft
echo %@substr[%blanks,0,%@eval[3-%@len[%dftp]]] %dftp
endlocal
quit
rem Subroutine to get data about drives
:getnums
set dt=%@disktotal[%a]
set du=%@diskused[%a]
set dup=%@int[%@eval[%du/%dt*100+.5]]
set df=%@diskfree[%a]
set dfp=%@int[%@eval[%df/%dt*100+.5]]
set dtt=%@eval[%dtt+%dt]
set dut=%@eval[%dut+%du]
set dft=%@eval[%dft+%df]
echos %a %@substr[%blanks,0,%@eval[9-%@len[%dt]]] %dt
echos %@substr[%blanks,0,%@eval[9-%@len[%du]]] %du
echos %@substr[%blanks,0,%@eval[3-%@len[%dup]]] %dup
echos %@substr[%blanks,0,%@eval[9-%@len[%df]]] %df
echo %@substr[%blanks,0,%@eval[3-%@len[%dfp]]] %dfp
return
rem End of DISKTOT.BTM
============================== CUT HERE ================================
The environmental variables are shortened to save space:
dt is the Disk Total capacity for each drive
du is the Disk Used capacity for each drive
dup is the Disk Used divided by Disk Total percentage
df is the Disk Free capacity for each drive
dfp is the Disk Free divided by Disk Total percentage
dtt is the total (sum) of the Disk Total capacities
dut is the total (sum) of the Disk Used capacities
dft is the total (sum) of the Disk Free capacities
dutp is the total Disk Used divided by total Disk Total percentage
dftp is the total Disk Free divided by total Disk Total percentage
blanks is a blank string long enough to fill out each column for
alignment (here 9 spaces)
Here is a sample output (I installed two new, hard disks and have been
reorganizing them):
Drive Total Used % Free %
=======================================================
C: 21344256 19187712 90 2156544 10 [drv. 1, part. 1]
D: 21344256 15331328 72 6012928 28 [drv. 2, part. 1]
E: 21291008 2095104 10 19195904 90 [drv. 1, part. 2]
F: 21291008 0 0 21291008 100 [drv. 2, part. 2]
G: 104738816 31784960 30 72953856 70 [drv. 3]
H: 324096 99328 31 224768 69 [RAM drive]
=======================================================
Total 190333440 68498432 36 121835008 64
[drv. is drive number and part. is partition number]
The substr[] functions left fill each value so the columns line up. The
percentages can hold from 1 to 3 digits as shown. Each percentage is
round up as needed. Change the substr[] functions to suit if you need
more room (increase the 10s and 9s).
Use redirection to save the output to a file (disktot >filename) which
makes it easy to see how fast your drives are filling up (yikes, half a
MB gone in only one day)!
Alas, DISKLEFT runs in less than 2 seconds while DISKTOT takes over 10
(with no floppy drives specified). The batch file is much smaller than
the EXE file though.
The 'for %a...' line won't work as written if %a is replaced by %drv and
the colons left off. Change this line to suit your own system. I also
would like to add commas to the values to make them easier to read, but
don't want to make the batch file even more complicated than it already
is. Have fun with this!
Saul
---
* Origin: Old Pueblo BBS - Tucson Computer Society (1:300/2)
------------------------------------------------------------------------
Echo Flag : Y Permanent: N Export: N Personal Read: N
BBS: ASTRIX Conference: 4DOS Imported: 10/29/1992
To: JOHN DURSO Num: 15069 Date: 10/27/1992
From: DAVE DENNEN Re: 14130 Time: 5:00 pm
Subj: can 4dos do it? Prvt: N Read: N
JD>1) Check if it is between 12:01 am and 3:30am.
JD>2) If yes, it would change the date back 1 day
JD>3) run a program
JD>4) change the date back to todays date
JD>5) all the while not saving the date in a permanent location in
JD> case something happens like a power outage or something
check out the %_Date %_Time %_Eval functions! They are very handy!
When I was in the navy I used them to calculate how many days I had
left!
Here is my alias that I used for that and maybe you could get an idea
for what you are trying to do...
jeff echo Jeff has %@Eval[%@date[10/23/94]-%@Date[%_date]] <cont>...
days, %@int[%@eval[(24 - ((%@time[%_time] / 60) / <cont>...
60)]] hours, %@eval[(59 - ((%@time[%_time] / 60) <cont>...
%% 60)] minutes and %@eval[60 - (%@time[%_time] %% <cont>...
60)] seconds left in the Navy!!
Dave.
---
■ DeLuxe² 1.21 #11617 ■ Pursuing the dream!
* San Diego's Know Ware 619-223-7111(MNP)/5593(HST)/7299(DS)
* PostLink(tm) v1.03 KNOWWARE (#1355) : RelayNet(tm)
PCRelay:DCINFO -> #16 MetroLink International Network
4.10 DC Info Exchange MetroLink International Hub
------------------------------------------------------------------------
Echo Flag : Y Permanent: N Export: N Personal Read: N
BBS: ASTRIX Conference: 4DOS Imported: 10/29/1992
To: JOHN DURSO Num: 15073 Date: 10/28/1992
From: KETIL KRUMM Re: 14130 Time: 5:00 am
Subj: can 4dos do it? Prvt: N Read: N
│JD> 1) Check if it is between 12:01 am and 3:30am. │
│JD> 2) If yes, it would change the date back 1 day │
│JD> 3) run a program │
│JD> 4) change the date back to todays date │
│JD> 5) all the while not saving the date in a permanent location in │
│JD> case something happens like a power outage or something │
╘═══════════════════════════════════════════════════════════════════════════╛
Sure 4DOS can do it! The question is not "Can 4DOS do it", but
"How do I do it with 4DOS" :-))
Well, down to business:
1) The _TIME variable provides you with the system time in the
format HH:MM:SS (separator characters may vary depending on the
codepage you use). This is a 24 hour reprecentation of the
time, so comparisons between times are easy. Also, all
characters are always used, so there will be leading zeros for
the hour as well as for minutes and seconds.
The following lines should do the trick (make sure the
separator characters are right!):
IFF %_TIME GT 00:00:00 .AND. %_TIME LT 03:30:00 then
rem --- What you want to do goes here
ENDIFF
2) To change the date back one day is a bit more tricky. You'd
want a function that works allways, i.e. takes care of things
like on the first in a month switches to the 28th, 29th, 30th
or 31st of the previous mont, and, if neccessary, switches to
the previous year (in case the current date is Jan 1st).
Here goes (remember to exchange all #'s with at-signs!):
*** Start of batch file
set SepChar=-
set LastDate=312831303130313130313031
set CalcDate=%_date
set Day=%#substr[%_date, 3, 2]
set Month=%#substr[%_date, 0, 2]
set Year=%#substr[%_date, 6, 2]
set Day=%#eval[%Day - 1]
iff %Day lt 1 then
rem Month switch
set Month=%#eval[%Month - 1]
iff %Month lt 1
rem Year switch - to Dec 31st
set Day=31
set Month=12
set Year=%#eval[%Year - 1]
rem Handle year 2000!
if %Year eq -1 set Year=99
else
rem Get last day in month from LastDate
set Day=%#substr[%LastDate, %#eval[(%Month-1)*2],2]
iff %Month eq 2 .or. %Month eq 02
rem Take special interest in February (leap year)
if %#eval[(%Year+1900)%%4] eq 0 set Day=29
endiff
endiff
endiff
rem Make sure all values are two digits
if %#len[%Day] eq 1 set Day=0%Day
if %#len[%Month] eq 1 set Month=0%Month
if %#len[%Year] eq 1 set Year=0%Year
rem Now smack it all together to get a date string
set CalcDate=%Month%%SepChar%%Day%%SepChar%%Year
*** End of batch file
Notes:
The SepChar variable contains the character to be used as the
separator between month, day and year in the final string. It
has no influence on the extraction of the values. If you'd
rather have the vaklues separated by another character, just
alter the assignment accordingly.
The variable LastDate contains the number of days in each month
as two characters, and is used to extract the last date in a
month in those cases where a month switch is necessary (where
current date is the 1st of a month). February is set to have
28 days, and leap years are dealt with specially (see remark).
CalcDate isn't used until end of program to assign the
resulting date value, but I like to initialize all vars at the
top. Storing the resulting date in a separate variable will
make sure that nothing's altered in case of power failure etc.
I haven't tested this, but it should work... It will give you
the general idea, anyway. 3, 4 and 5 in your list resolves
temselves, once the above is applied.
---
■ MegaMail 2.10 #786:Reality: A special case of no general interest
* DASAN Databank +47+(0)34 59530-58518-58377-58662-58560-58944
* PostLink(tm) v1.03 DASAN (#352) : RelayNet(tm)
PCRelay:DCINFO -> #16 MetroLink International Network
4.10 DC Info Exchange MetroLink International Hub
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: Telix(ECHO Imported: 10/29/1992
To: COLIN MAHER Num: 254 Date: 10/26/1992
From: PHIL CROWN Re: Time: 5:33 pm
Subj: hsmodem Prvt: N Read: N
>> Quoting Colin Maher to All <<
CM> TELL ME ... this hsmodem protocal I see on all the boards is it
CM> faster than Zmodem. Should I bother d/l it and adding it to my
CM> protocals etc. thants - ..
Do you mean HS Link? YES, definitely get it! Its as has error
correction, crash recovery and is as just as fast Zmodem. It can also
up and download files at the same time. The latest version is
HS113C4.ZIP.
Here's a script for it. This script will upload every file
in the upload directory without asking, so you kinda need to watch it.
The nice part is its fully automatic. Just load it anytime; preferably
before HS Link sends its first signature to start the download.
// HSLink.slt HS Link Auto-Up/Downloading script.
main() { update_term(); terminal();
int hs, stat;
str go[64]=""; go = _up_dir;
str filespec[64]="*.*";
str buf[32]="";
strcat(_up_dir, filespec);
hs = track("S*^B", 0);
while(carrier()){ terminal();stat=track_hit(0);if(!stat) continue;
else if (stat == hs) {
run("C:\Telix\HSLink.exe", GO, 0); } // you may have to edit this line.
track_free(0); hangup(); return; } }
... Phil
--- Maximus 2.01wb
* Origin: Code 3 BBS - HST/V.32b (214)436-8753 / V.32 436-3826 (1:124/6106)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/30/1992
To: TERRY HORTON Num: 67 Date: 10/27/1992
From: MORRIS TURPIN Re: Time: 5:23 pm
Subj: 4DOS menus Prvt: N Read: N
In a message dated Oct 26 at 20:03, Terry Horton of 1:130/41.3103
wrote to *.???:
TH> Calling all =advanced= 4dos users! Anyone know how to do this in
TH> 4dos, or can it be done at all?
TH> @echo off
TH> set f1=%Enter
TH> set f2=%CursorDown%%Enter
TH> set f3=%CursorDown%%CursorDown%%Enter
TH> set f4=%CursorDown%%CursorDown%%CursorDown%%Enter
TH> set f5=%CursorDown%%CursorDown%%CursorDown%%CursorDown%%Enter
TH> gosub Assign_Fkeys
TH> set do_this=%@select[main.men,0,0,24,40,Main Menu]
TH> quit
TH> Here's main.men:
TH> F1 Majong
TH> F2 Baccarat
TH> F3 Backgammon
TH> F4 Shoot the Moon
TH> F5 Pareesi Squares
Well...not exactly like that, but here is a part of my GAMES.BTM file that
performs the selections that you are looking for:
:MAIN_MENU
cls
setdos /s0:0
set choice=timeout
drawbox 3 20 20 60 4 bright white on magenta fill white shadow
scrput 5 34 bright yellow on white Moey's Games
vscrput 7 27 bright white on white 1234567890
vscrput 7 30 bright white on white BCLMPSTWYQ
scrput 7 31 black on white ridge Menu
scrput 8 31 black on white hess
scrput 9 31 black on white eisure Suit Larry Menu
scrput 10 31 black on white onopoly
scrput 11 31 black on white olice Quest
scrput 12 31 black on white olitaire Menu
scrput 13 31 black on white etris
scrput 14 31 black on white heel of Fortune
scrput 15 31 black on white ahtzee
scrput 16 31 black on white uit - Exit to DOS
scrput 18 31 bright yellow on white Make your choice
scrput 18 47 bright blink yellow on white ...
inkey /k"1234567890bclmpstwyqe" /w60 %%choice > nul
if %choice eq 1 .or. %choice eq b goto BRIDGE
if %choice eq 2 .or. %choice eq c goto CHESS
if %choice eq 3 .or. %choice eq l goto LLL
if %choice eq 4 .or. %choice eq m goto MONOPOLY
if %choice eq 5 .or. %choice eq p goto PQ
if %choice eq 6 .or. %choice eq s goto SOLIT_MENU
if %choice eq 7 .or. %choice eq t goto TETRIS
if %choice eq 8 .or. %choice eq w goto WHEEL
if %choice eq 9 .or. %choice eq y goto YAHTZEE
if %choice eq 0 .or. %choice eq q .or. %choice eq e goto END
if %choice eq timeout goto TIMEOUT
Written completely with internal 4DOS commands and is very fast, at least on
my 33MHz 386 <g>. My total .btm file is 8125 bytes long. For more complete
information on any of the above commands, check the manual or browse through
the HELP screens.
--- msged 2.07
* Origin: Ansi's Escape, Echo Point -- Ottawa, Ontario (1:163/140.3)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/30/1992
To: YOU'ALL Num: 88 Date: 10/27/1992
From: MAYNARD HOGG Re: Time: 10:00 am
Subj: Echo Is Off/On Prvt: N Read: N
Tired of those *backward*-compatible C*M*A*D.C*M "ECHO is OFF/ON"
messages? You can get rid of them with a 4DOS alias for ECHO.
Up until today, my alias file used the following.
echo iff "%1"=="" then *echo.^else *echo %&^endiff
In the process of answering a query, I hit upon a much simpler
solution.
echo *echo.%&
Note, if you enter it at the command line, don't forget the back
quotes!
alias echo `*echo.%&`
<later> Alas, to use this version, you have to rewrite all your batch
files to use *echo on and *echo off so that you don't get the words on
and off echoed to the screen.
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/30/1992
To: PAUL CHVOSTEK Num: 68 Date: 10/25/1992
From: WILLIAM BURROW Re: Time: 2:02 pm
Subj: Starting Prvt: N Read: N
* On Oct 22 12:37 Paul Chvostek quoth this to Darren Kay
PC> a UNIX box with a command. Changing a partition table while
PC> in UNIX is no sweat, you just write something directly to the
PC> device, and cry a lot if you screw up. And make a script
PC> that acts as the glue around whatever re-writes the thing, so
PC> it's harder to screw up. On the DOS side, I've never seen
PC> anything that automates the process.
You can do this in (4)DOS by redirecting a file into fdisk (result is
immediate and final, if you don't have a boot floppy ;). Here are some
samples:
Given that the partition table entries are:
1 - DOS
2 - Other operating system
then in the following files put:
[DOS-PART.cmd]
2
1
[OTHER-OS.cmd]
2
2
The procedure is to use the command (under DOS 5):
fdisk < DOS-PART.cmd
for DOS and:
fdisk < OTHER-OS.cmd
for your other operating system boot partition.
You might put things into a batch file like:
[SHUTDOWN.bat]
@echo off
iff x%1==x then ^text
Usage:
shutdown dos|other-os
where: dos - changes partition to DOS boot and reboots
other-os - changes partition to Other-OS and reboots
endtext ^ quit ^ endiff
iff %1==dos then ^ fdisk < dos-part.cmd ^ reboot ^ endiff
iff %1==other-os then ^ fdisk < other-os.cmd ^ reboot ^ endiff
rem (endiffs required to allow drop through for Usage: )
Will.
--- msgedsq 2.1
* Origin: Squish squash, I was reading my mail... (1:255/3.202)
------------------------------------------------------------------------
Echo Flag : Y Permanent: N Export: N Personal Read: N
BBS: ASTRIX Conference: 4DOS Imported: 11/01/1992
To: JOHN DURSO Num: 15083 Date: 10/28/1992
From: JORJ STRUMOLO Re: 14130 Time: 3:00 pm
Subj: CAN 4DOS DO IT? Prvt: N Read: N
JD│1) Check if it is between 12:01 am and 3:30am.
if %#time[%_time] ge 12600 goto skip
JD│2) If yes, it would change the date back 1 day
set mm=%#substr[%_date,0,2] ; play with this set
set dd=%#substr[%_date,3,2]
set yy=%#substr[%_date,6,2]
setlocal ; needed to restore
if %dd ne 01 goto not_1st
if %mm eq 01 set yy=%#eval[%yy-1] ; New Year's Day?
iff %mm eq 04 ; Thirty days hath September....
.or. %mm eq 06
.or. %mm eq 09
.or. %mm eq 11 then set dd=31 ^ else set dd=32
:not_1st
set mm=%#eval[%mm+1]
date %#eval[%mm-1]-%#eval[%dd-1]-yy
JD│3) run a program
run program run.....
:skip
JD│4) change the date back to today's date
endlocal ; gets you back what you had originally
date %mm-%dd-%yy ; I don't know if this is really needed
JD│5) all the while not saving the date in a permanent location in
│ case something happens like a power outage or something.
set mm= ^ set dd= ^ set yy= ; clears these
─────
Done. Presuming you don't lose power during the program, you're
okay. But you *are* changing the date, the real one, not just a copy.
You have to, since that's what the program's looking at. And if you
lose power during the program, you're stuck with the changed date.
I also won't swear to anything in this. I think it'll work, and
that I covered all the contingencies, but it's quite possible I got
lost somewhere. It's near the limits of my conditionality thinking.
Particularly setlocal/endlocal I'm fuzzy on; I've never used them
myself. I don't know how much is saved in the "environment". Is the
current date in there, even if it doesn't show up with SET, for
instance? I don't think so.
---
■ SPEED 1.3d #1019 ■ Stop that man! He's thinking! ■
* Eagles Nest Communications (401)732-5290 Serving RI since '84!
* PostLink(tm) v1.03 EAGLE (#8) : RelayNet(tm) HUB
PCRelay:DCINFO -> #16 MetroLink International Network
4.10 DC Info Exchange MetroLink International Hub
------------------------------------------------------------------------
Echo Flag : Y Permanent: N Export: N Personal Read: N
BBS: ASTRIX Conference: 4DOS Imported: 11/01/1992
To: JOHN DURSO Num: 15106 Date: 10/29/1992
From: MARK D. SHADLEY Re: 14130 Time: 6:00 am
Subj: can 4dos do it? Prvt: N Read: N
JD│ In summary, I'd like to
JD│ 1) Check if it is between 12:01 am and 3:30am.
JD│ 2) If yes, it would change the date back 1 day
JD│ 3) run a program
JD│ 4) change the date back to todays date
JD│ 5) all the while not saving the date in a permanent location in
JD│ case something happens like a power outage or something
This is a btm: (the lines that don't go to the left margin are
continuations of the preceding lines, shortened
here, for mail transfer)
--------------------------------------------------------------
iff %@time[%_time] gt %@time[00:01:00] .and. %@time[%_time] lt
%@time[03:30:00] then
echo %_date >! d:\path\date.$$$
date %@substr[%_date,0,2]-%@eval[%@substr[%_date,3,2]-1]-
%@substr[%_date,6,2]
YOUR PROGRAM GOES HERE
date < d:\path\date.$$$
else
endiff
--------------------------------------------------------------
If you really DON'T want today's date saved in a permanent location,
make the 'd:\path\date.$$$' point to a small RAM disk.
'date.$$$' will always be overwritten, with the current date.
Mark
---
■ OLX 2.1 TD ■ ... I got them ol' postlink blues ... again ...
* N.S.T.T.Z. Fullerton, Ca. 714-879-4052 HST Not v.32!
* PostLink(tm) v1.03 NSTTZ (#363) : RelayNet(tm)
PCRelay:DCINFO -> #16 MetroLink International Network
4.10 DC Info Exchange MetroLink International Hub
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/31/1992
To: TERRY HORTON Num: 127 Date: 10/29/1992
From: FURLAN PRIMUS Re: Time: 9:23 pm
Subj: 4DOS menus Prvt: N Read: N
Regarding the original message from Terry Horton of 1:130/41.3103
writing to Morris Turpin on <Oct 28 12:14> while asserting:
TH> Thanks for the reply, Morris. Very interesting menu, especially
TH> the use of vscrput. The problem for me is that it takes too long
TH> to construct or modify a menu of this type compared to using
TH> %@select, which takes one line of code and an ASCII file to
TH> create.
actually, you don't even need the ASCII file: <g>
text | set choice=%@substr[%@select[con,5,16,20,30, choose one ],0]
Reset Out
Poll
FREQ
Log
Bonk
Color
Control
Echo Report
Edit
Max
Stats
User
Vfam
Wimm
Zgen
Answers
Silt
Quit
endtext
if "%choice" == "" gosub quit
gosub %choice
goto top
::::::::::
:quit
::::::::::
endlocal
cls
quit
return
(and all the subroutines would go here...)
------------------------------------
got it from right here, in the 4DOS echo, i don't recall who suggested it...
fl
--- msgedsq 2.1a
* Origin: SQUISHed MUFFINs make you TUBby, eh? (1:141/590)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 10/31/1992
To: ALL Num: 120 Date: 10/29/1992
From: YOUSUF KHAN Re: Time: 8:36 am
Subj: Daylight Savings Prvt: N Read: N
Here's a little something I created which you might find useful. It's a
batchfile that can determine if today's date falls into daylight savings time
or standard time. I created it because I have a program which regularly calls
a local atomic time beacon to update my computer clock. The problem with this
time beacon is that you have to manually state whether it's daylight savings
time or standard time. But you don't have to use it for that purpose, you can
just use it for your own amusement.
The rule is daylight savings time starts on the first Sunday in April, and
standard time starts on the last Sunday in October. Also it never starts
until 2:00AM on those days.
The following batchfile uses 4dos internal commands only. I realize that I
may have been able to do it easier if I had an external utility like Awk or
Ronset, but I wanted to use 4dos alone to do it.
You should note that this batchfile assumes that you are using code page
#850, which uses the infinitely more logical European date format, dd-mm-yy.
If you're not using code page #850 then you should either make some
modifications to the batchfile, or use the "CHCP 850" command to change your
code page.
Here's an overview of what the batchfile is doing. It first saves today's
date to an environment variable, %REALDATE. It also extracts this year from
today's date, in the env varb %YEAR. It then proceeds to determine standard
time fallback date, by changing the system date to each date in the last week
of October, so that it can determine which date falls on a Sunday. Once it
finds the Sunday date it saves it to env varb %STDTMDATE. Similarly, it also
determines daylight savings time by trying out each day in the first week of
April to see if it's on a Sunday or not, saving to env varb %DAYTMDATE. It
restores the date to today's real date. It then converts these dates into the
number of days that have passed since Jan 1, 1980, using the %@DATE[...]
function. This way each date can be compared mathematically. If today's date
is somewhere between daylight and standard time, then there's not much doubt
where it falls. However if today's date is exactly the same as either the
daylight or standard dates, then an additional check is done to see if the
time is greater than 2:00AM or not; if not, then it's not yet time to switch.
========================================================================
@echo off
set realdate=%_date
set year=%@substr[%_date,6,2]
rem Get Std time fallback date
for %a in (25 26 27 28 29 30 31) do (
date %a-10-%year
if "%_dow" eq "sun" set stdtmdate=%_date
)
echo Standard Time fallback date: %stdtmdate
rem Get Daylite time jumpforward date
for %a in (1 2 3 4 5 6) do (
date %a-04-%year
if "%_dow" eq "sun" set daytmdate=%_date
)
echo Daylight Time jumpforward date: %daytmdate
date %realdate
echo Today's date: %realdate
rem convert all dates into comparable numbers
set realdate=%@date[%realdate]
set daytmdate=%@date[%daytmdate]
set stdtmdate=%@date[%stdtmdate]
iff %realdate gt %daytmdate .and. %realdate lt %stdtmdate then
rem definitely Daylite savings time
echo It's Daylight Savings time!
elseiff %realdate eq %daytmdate then
rem right on daylite date
iff %@time[%_time] lt %@time[02:00:00] then
echo It's not quite Daylight Savings Time, yet.
else
echo Today is the first day of Daylight Savings Time!
endiff
elseiff %realdate eq %stdtmdate then
rem right on std time date
iff %@time[%_time] lt %@time[02:00:00] then
echo It's not quite Standard Time, yet.
else
echo Today is the first day of Standard Time!
endiff
else
rem Definitely Std time
echo It's Standard Time!
endiff
unset realdate,year,stdtmdate,daytmdate
=======================================================================
Yousuf Khan
--- GoldED 2.40
* Origin: Ottawa,Ont,Can,Earth,Sun,Milky Way,Virgo_supercluster
(1:163/215.6)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/01/1992
To: DAYTON LIVINGSTON Num: 78 Date: 10/29/1992
From: MAYNARD HOGG Re: Time: 7:01 am
Subj: Descript.Ion Prvt: N Read: N
------------------------------------------------------------------------
Echo Flag : Y Permanent: N Export: N Personal Read: N
BBS: ASTRIX Conference: 4DOS Imported: 11/03/1992
To: EMIL SIT Num: 15119 Date: 10/31/1992
From: JIM GOMES Re: 14144 Time: 12:00 pm
Subj: Directory sorting Prvt: N Read: N
ES> By default, 4dos does directories sorted by filename. Is there anyway to
ES> make it sort by extension without using an alias (like dir =*dir /oe)?
Yes. Add the /oe switch to an environment variable called DIRCMD like
so:
set DIRCMD=/oe
This will apply the /oe switch to all dir commands.
---
■ SPEED 1.20 [NR] ■ Tag line thievery..Comin' up next on Geraldo.
* The Brass Cannon::Orem Utah::(801)226-8310
* PostLink(tm) v1.03 BRASS (#1126) : RelayNet(tm)
PCRelay:DCINFO -> #16 MetroLink International Network
4.10 DC Info Exchange MetroLink International Hub
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/03/1992
To: ALL Num: 92 Date: 10/30/1992
From: RICHARD ROBERTSON Re: Time: 2:47 pm
Subj: 4PIANO.BTM Prvt: N Read: N
Hello!
I hope there hasn't been anything like this posted here recently - apologies
in advance - this echo is sooo busy <g>. Anyway my kids liked it. Watch out
for commas, apostrophies and spaces - they are not trapped. The BTM is
mostly hard coded - you could add a record and playback routines if you had
the mind to. Enjoy...
_ _ _ O / _ _ C_U_T_ H_E_R_E_ _ _ _
O \
::
:: 4PIANO.BTM version 1.0
:: 29th October 1992 Richard Robertson
:: 3:640/556.6@Fidonet 61:6700/160@Worldnet
::
cls cya on bla
inkey /k"12345678" Note duration (1-8) %%l
text
╒══════════════════════════╕
│- - │
│ Q W E R T Y U I │
│ Low C D E F G A B C │
│ │
│ A S D F G H J K │
│ Med C D E F G A B C │
│ │
│ Z X C V B N M . │
│ Hi C D E F G A B C │
│ │
│ 4PIANO - V1.0 │
│ │
╘══════════════════════════╛
endtext
scrput 2 3 bri whi on blu ESC
:begin
inkey %%keyp >NUL:
if %keyp eq goto done
iff %keyp eq Q then scrput 4 9 blu on whi C
beep 131 %l
scrput 4 9 cya on bla C
endiff
iff %keyp eq W then scrput 4 11 blu on whi D
beep 147 %l
scrput 4 11 cya on bla D
endiff
iff %keyp eq E then scrput 4 13 blu on whi E
beep 165 %l
scrput 4 13 cya on bla E
endiff
iff %keyp eq R then scrput 4 15 blu on whi F
beep 175 %l
scrput 4 15 cya on bla F
endiff
iff %keyp eq T then scrput 4 17 blu on whi G
beep 196 %l
scrput 4 17 cya on bla G
endiff
iff %keyp eq Y then scrput 4 19 blu on whi A
beep 220 %l
scrput 4 19 cya on bla A
endiff
iff %keyp eq U then scrput 4 21 blu on whi B
beep 248 %l
scrput 4 21 cya on bla B
endiff
iff %keyp eq I then scrput 4 23 blu on whi C
beep 262 %l
scrput 4 23 cya on bla C
endiff
iff %keyp eq A then scrput 7 9 red on whi C
beep 523 %l
scrput 7 9 cya on bla C
endiff
iff %keyp eq S then scrput 7 11 red on whi D
beep 587 %l
scrput 7 11 cya on bla D
endiff
iff %keyp eq D then scrput 7 13 red on whi E
beep 659 %l
scrput 7 13 cya on bla E
endiff
iff %keyp eq F then scrput 7 15 red on whi F
beep 698 %l
scrput 7 15 cya on bla F
endiff
iff %keyp eq G then scrput 7 17 red on whi G
beep 784 %l
scrput 7 17 cya on bla G
endiff
iff %keyp eq H then scrput 7 19 red on whi A
beep 880 %l
scrput 7 19 cya on bla A
endiff
iff %keyp eq J then scrput 7 21 red on whi B
beep 988 %l
scrput 7 21 cya on bla B
endiff
iff %keyp eq K then scrput 7 23 red on whi C
beep 1046 %l
scrput 7 23 cya on bla C
endiff
iff %keyp eq Z then scrput 10 9 bri gre on whi C
beep 1046 %l
scrput 10 9 cya on bla C
endiff
iff %keyp eq X then scrput 10 11 bri gre on whi D
beep 1175 %l
scrput 10 11 cya on bla D
endiff
iff %keyp eq C then scrput 10 13 bri gre on whi E
beep 1318 %l
scrput 10 13 cya on bla E
endiff
iff %keyp eq V then scrput 10 15 bri gre on whi F
beep 1397 %l
scrput 10 15 cya on bla F
endiff
iff %keyp eq B then scrput 10 17 bri gre on whi G
beep 1568 %l
scrput 10 17 cya on bla G
endiff
iff %keyp eq N then scrput 10 19 bri gre on whi A
beep 1760 %l
scrput 10 19 cya on bla A
endiff
iff %keyp eq M then scrput 10 21 bri gre on whi B
beep 1973 %l
scrput 10 21 cya on bla B
endiff
:: Kludge - skip comma key
iff %keyp eq . then scrput 10 23 bri gre on whi C
beep 2093 %l
scrput 10 23 cya on bla C
endiff
goto begin
:done
scrput 2 3 bri whi on red ESC
beep 30 5 19 1 30 5
scrput 2 3 cya on bla ESC
unset keyp,l
_ _ _ O / _ _ C_U_T_ H_E_R_E_ _ _ _
O \
Regards,
Richard.
>> Message length exceeded, split by WILDMAIL! v2.04 <<
>> Continued in next message <<
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/03/1992
To: ALL Num: 123 Date: 10/29/1992
From: YOUSUF KHAN Re: Time: 8:36 am
Subj: Daylight Savings Prvt: N Read: N
Here's a little something I created which you might find useful. It's a
batchfile that can determine if today's date falls into daylight savings time
or standard time. I created it because I have a program which regularly calls
a local atomic time beacon to update my computer clock. The problem with this
time beacon is that you have to manually state whether it's daylight savings
time or standard time. But you don't have to use it for that purpose, you can
just use it for your own amusement.
The rule is daylight savings time starts on the first Sunday in April, and
standard time starts on the last Sunday in October. Also it never starts
until 2:00AM on those days.
The following batchfile uses 4dos internal commands only. I realize that I
may have been able to do it easier if I had an external utility like Awk or
Ronset, but I wanted to use 4dos alone to do it.
You should note that this batchfile assumes that you are using code page
#850, which uses the infinitely more logical European date format, dd-mm-yy.
If you're not using code page #850 then you should either make some
modifications to the batchfile, or use the "CHCP 850" command to change your
code page.
Here's an overview of what the batchfile is doing. It first saves today's
date to an environment variable, %REALDATE. It also extracts this year from
today's date, in the env varb %YEAR. It then proceeds to determine standard
time fallback date, by changing the system date to each date in the last week
of October, so that it can determine which date falls on a Sunday. Once it
finds the Sunday date it saves it to env varb %STDTMDATE. Similarly, it also
determines daylight savings time by trying out each day in the first week of
April to see if it's on a Sunday or not, saving to env varb %DAYTMDATE. It
restores the date to today's real date. It then converts these dates into the
number of days that have passed since Jan 1, 1980, using the %@DATE[...]
function. This way each date can be compared mathematically. If today's date
is somewhere between daylight and standard time, then there's not much doubt
where it falls. However if today's date is exactly the same as either the
daylight or standard dates, then an additional check is done to see if the
time is greater than 2:00AM or not; if not, then it's not yet time to switch.
========================================================================
@echo off
set realdate=%_date
set year=%@substr[%_date,6,2]
rem Get Std time fallback date
for %a in (25 26 27 28 29 30 31) do (
date %a-10-%year
if "%_dow" eq "sun" set stdtmdate=%_date
)
echo Standard Time fallback date: %stdtmdate
rem Get Daylite time jumpforward date
for %a in (1 2 3 4 5 6) do (
date %a-04-%year
if "%_dow" eq "sun" set daytmdate=%_date
)
echo Daylight Time jumpforward date: %daytmdate
date %realdate
echo Today's date: %realdate
rem convert all dates into comparable numbers
set realdate=%@date[%realdate]
set daytmdate=%@date[%daytmdate]
set stdtmdate=%@date[%stdtmdate]
iff %realdate gt %daytmdate .and. %realdate lt %stdtmdate then
rem definitely Daylite savings time
echo It's Daylight Savings time!
elseiff %realdate eq %daytmdate then
rem right on daylite date
iff %@time[%_time] lt %@time[02:00:00] then
echo It's not quite Daylight Savings Time, yet.
else
echo Today is the first day of Daylight Savings Time!
endiff
elseiff %realdate eq %stdtmdate then
rem right on std time date
iff %@time[%_time] lt %@time[02:00:00] then
echo It's not quite Standard Time, yet.
else
echo Today is the first day of Standard Time!
endiff
else
rem Definitely Std time
echo It's Standard Time!
endiff
unset realdate,year,stdtmdate,daytmdate
=======================================================================
Yousuf Khan
--- GoldED 2.40
* Origin: Ottawa,Ont,Can,Earth,Sun,Milky Way,Virgo_supercluster
(1:163/215.6)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/03/1992
To: STEVE HODSDON Num: 134 Date: 11/01/1992
From: BRUCE PERATHANER Re: Time: 4:01 pm
Subj: Lost Aliases Prvt: N Read: N
SH>Due to a MAJOR brain lapse on my part, my alias file was deleted. Has
someb
SH>been saving the different aliases that pass through here?
Steve, I am a some-what new user but here is my alias file.
D=cls^dir/4/a/d/j/oe/v
N=cls^dir/4/a/d/j/o:gn/v
S=cls^dir/4/a/d/s/j/o:gn/v/p
cc=cdd c:\^cls^dir/4/a/d/j/oe/v
4d=cdd c:\4dos^cls^dir/4a/d/j/oe/v
AA=a:^cls^dir/4/a/d/j/o:gn/v
pd=cdd c:\pcplus^cls^dir/4a/d/j/oe/v
CALC=echo The answer is: %@eval[%&]
APPEND=echo DO NOT use this Command!
PRINTER=echo Type ALT (Pad Lock 155G)CR (CtrlZ)^copy con: prn:
PC=cdd c:\pcplus^pcplus /b^cdd c:\pcplus\dlf^n
L=listns /m
fx=cdd c:\fx^*fx
@Alt-F1=cdd c:\fx^*fx^cd c:\^nr
machine=nbhelp
@Alt-F2=mpower -on^cdd c:\pcplus^keystack 0 13 Alt-D^pcplus /b^mpower
-off^cdd
optimize=*optimize /cmd=c:\qemm\4dos.cmd
win=*win /3
sd=select del [*.*]^n
sdp=select del /p [*.*]^n
sz=select zs -a %1 [*.*]^n
nd=md %1^cd %1^n
cache=cdd c:\hyperdsk^hyperdkx /y
status=*sample.bat
smp=select move /p [*.*] %1^cdd %1^n
sm=select move [*.*] %1^cdd %1^n
killbak=global del /p *.bak^cd c:\^n
sk=pushd c:\sk2^*sk2^popd^n
smr=select move [*.*] c:\air\reader^cdd c:\air\reader^slmr^cdd c:\^l
pkzip=zs
szm=select zs -m %1 [*.*]
inibak=cdd c:\^xcopy /s c:\*.ini a:\%1^cdd %1^n
sc=select copy [*.*] %1^cdd %1^n
dd=cdd d:\^cls^n
XDISK=pushd c:\HYPERDSK\XD^XDISK.EXE %1 %2^pause^md d:\temp^popd^n
Hope this helps some.
Bruce
* SLMR 2.1a * Minds, like parachutes, work only when open.
--- RyPacker v2.5
* Origin: AirPower, Home of the AIRGUN Echo..(215)259-2198 (1:273/408)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/05/1992
To: TERRY HORTON Num: 138 Date: 10/31/1992
From: DAYTON LIVINGSTON Re: Time: 10:31 am
Subj: 4DOS menus Prvt: N Read: N
TH> Calling all =advanced= 4dos users! Anyone know how to do
TH> this in 4dos, or can it be done at all?
TH> set f1=%Enter
TH> set f2=%CursorDown%%Enter
TH> gosub Assign_Fkeys
TH> set do_this=%@select[main.men,0,0,24,40,Main Menu]
Sorry Terry, but I don't believe that's possible. However, it IS
possible to do basically the same thing:
_______O/_______CUT HERE_______O/________
O\ O\
@ECHO OFF
SETLOCAL^SET x=5^SET y=7
:TOP
CLS BLU ON BLU BOR BLU^GOSUB initialize
:READ
SCREEN %x 7^SET o=%@READSCR[%x,8,19]
SET n=%@READSCR[%x,4,1]^SET c=%@SUBSTR[%_FG,5,3]
SCRPUT %x 7 BRI WHI ON %c %@CHAR[255]%o%%@CHAR[255]
INKEY /K"1234567890[Up][Down][ESC][Enter]" %%key
IF %@ASCII[%key] EQ 27 GOTO 0
SCRPUT %x 7 BRI %c ON BLU %@CHAR[255]%o%%@CHAR[255]
IFF %@ASCII[%key] EQ 13 GOTO %n
IFF %key EQ @72 THEN^SET x=%@EVAL[%x -2]
IF %x LT 3 SET x=21^ENDIFF
IFF %key EQ @80 THEN^SET x=%@EVAL[%x +2]
IF %x GT 21 SET x=3^ENDIFF
IFF %@INDEX[0123456789,%key] GT -1 THEN
SET n=%key^SET x=%@EVAL[(%n*2)+3]^GOTO %n^ENDIFF
GOTO read
:1
SCRPUT 23 0 GRE ON BLA {Majong...........}^GOTO top
:2
SCRPUT 23 0 GRE ON BLA {Baccarat.........}^GOTO top
:3
SCRPUT 23 0 GRE ON BLA {Backgammon.......}^GOTO top
:4
SCRPUT 23 0 GRE ON BLA {Shoot the Moon...}^GOTO top
:5
SCRPUT 23 0 GRE ON BLA {Pareesi Squares..}^GOTO top
:6
BEEP^GOTO read
:7
BEEP^GOTO read
:8
BEEP^GOTO read
:9
BEEP^GOTO read
:0
SCREEN 23 0^QUIT
:INITIALIZE
COLOR BRI WHI ON BLU
TEXT
Please Select A Game:
+-------------------------+ Use the Up/Down arrow keys to
| 0 : | scroll through the entries shown.
|---+---------------------|
| 1 : | Use ENTER to select an entry.
|---+---------------------|
| 2 : | You may also select an entry by
|---+---------------------| hitting the number of the entry
| 3 : | and it will be executed.
|---+---------------------|
| 4 : | You may re-do this screen in ANSI
|---+---------------------| to make it look nicer, then import
| 5 : | it into this BTM (Make sure you
|---+---------------------| keep the placement the same!)
| 6 : |
|---+---------------------| You may exit either by scrolling
| 7 : | and selecting, hitting 0, or
|---+---------------------| hitting ESC.
| 8 : |
|---+---------------------| Hope this works for you!
| 9 : |
+-------------------------+ - Dayton
ENDTEXT
SCRPUT 3 7 BRI RED ON BLU %@CHAR[255]----- E X I T -----^REM 1
SCRPUT 5 7 BRI GRE ON BLU %@CHAR[255]Majong.............^REM 1
SCRPUT 7 7 BRI GRE ON BLU %@CHAR[255]Baccarat...........^REM 2
SCRPUT 9 7 BRI GRE ON BLU %@CHAR[255]Backgammon.........^REM 3
SCRPUT 11 7 BRI GRE ON BLU %@CHAR[255]Shoot the Moon.....^REM 4
SCRPUT 13 7 BRI GRE ON BLU %@CHAR[255]Pareesi Squares....^REM 5
SCRPUT 15 7 BRI YEL ON BLU %@CHAR[255]- Empty -^REM 6
SCRPUT 17 7 BRI YEL ON BLU %@CHAR[255]- Empty -^REM 7
SCRPUT 19 7 BRI YEL ON BLU %@CHAR[255]- Empty -^REM 8
SCRPUT 21 7 BRI YEL ON BLU %@CHAR[255]- Empty -^REM 9
RETURN
_______O/_______CUT HERE_______O/________
O\ O\
Replace the "%@CHAR[255]"'s with the actual ASCII characters to
speed things up a bit after testing it.
Replace the SCRPUT 23 0 GRE ON BLA {Majong...........} with the
actual commands for Majong (& etc). The way I wrote it is for
testing purposes (it will run fine, but won't do anyting).
- Dayton
* OLX 994 * MacIntosh: A computer with training wheels.
--- Maximus 2.00
* Origin: T.V. BBS - Glendale, AZ - (602) 930-8542 (1:114/148)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/05/1992
To: BRUCE PERATHANER Num: 118 Date: 10/23/1992
From: MICHAEL JERKOVIC Re: Time: 10:23 am
Subj: 4DOS v4.01(b)/list.com Prvt: N Read: N
BP>Well, I keep 4dos.doc on my hard drive as
BP>a Zip file. I use List.com by
BP>hi-lighting 4dos.doc, hit V (to bring up
BP>the archive), hit Alt-I, move
BP>cursor to the file I want to read, hit
BP>Enter ,which brings up the file
BP>in List.com.
Hi Bruce
try the following aliases
l=c:\util\list.com
doc=c:\arc\pkunzip -c c:\doc\doc.zip %1*.* | l /s
The second alias uses pkunzip's ability to pipe output
to the console, and hence straight into Bergs List.
This allows you to group all your docs, manuals and text
info into one zip file. For example, my doc.zip contains
4dos.doc; to list 4dos.doc all I need do is type DOC 4DOS.
I have about 4megs of text in my 1meg doc.zip.
Hope you find this useful. ...mic...
a@+---a@+ X WinQwk 2.0b#0 X Unregistered Evaluation Copya@+
--- Squish v1.00-OS/2
* Origin: The Lightning BBS - Don't Worry... Be Happy... (3:634/383)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/05/1992
To: ARAN SPENCE @ 954/403 Num: 111 Date: 11/02/1992
From: MAYNARD HOGG Re: Time: 12:57 pm
Subj: Descriptions Prvt: N Read: N
On 11-01-92, ARAN SPENCE @ 954/403 wrote ALL re: Descriptions
AS>Has anyone come up with at BTM which will describe only the files
>that don't have descriptions?
Off the top of my head--pardon the sawdust <grin>--who needs a BTM
when an alias will do?
alias adddes `for %x in (%&) *if /%@descript[%x]/ == // *describe %x`
The above ALMOST works. For some reason, every so often the IF produces an
"Usage:" message.
AS>Yes, I know they can be done one at a time or in multiples on the
>command line;
And then there are FDU and 4EDIT, which you get when you register... <grin>
-- SPEED 1.10 #1086:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/05/1992
To: DIRK DUNNING Num: 131 Date: 11/01/1992
From: ALEXANDER SKORODUMOV Re: Time: 4:48 pm
Subj: Minor request Prvt: N Read: N
Hello Dirk!
Saturday October 24 1992, Dirk Dunning writes to Rex Conn:
DD> It would be nice to a have a variable that identifies the revision level
DD> of 4DOS being used (and of DOS if possible). This would likely be used
DD> most for information purposes, much as 'ver /r' is used. For a very few
DD> cases, it could be used to determine what action to take in a BAT or BTM
DD> file based on how a function or command works in one version versus
DD> another.
Use:
Ver /r|(Input %%Line1^Input %%Line1^Input %%Line2)
Result:
%Line1 = 4DOS X.XX DOS X.XX
%Line2 = 4DOS Revision X
Good Luck,
SAS
--- QEdit 2.27
* Origin: >>> The MMAS&CO Line <<< (2:5030/42)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/05/1992
To: WAYNE THOMASON Num: 122 Date: 10/27/1992
From: QIU XINCHUAN Re: Time: 11:20 pm
Subj: Neat Idea Prvt: N Read: N
Hi, I think I sent you some of my improvements over your prompt, but here
is my edited version of your prompt. I just think your prompt was great!
Anyway, do comment on my version...
Just replace all the ! with the Esc characters and it should work...
Join up the {...}
@echo off
if "%@name[%cmd%]"=="%@name[%0]" goto TheEnd
REM To guard against multiple copies from loading
REM My previous ver did not trap all..
:Preloop
set cmd=zzzz
REM Use cmd instead of temp coz temp already in use
echos ![s![1;1f![1;44;36m![K ( ) ![32m*![36m Date [![12C] ![32m*...
...![36m Time [![5C] ![32m*![36m Mem [![3C] KB ![32m*...
...![36m Fixed Disk [![%@len[%@diskfree[c:,m]]C] MB![u...
REM Draws the fields for Date, Time, Mem, Fixed Disk space...
if %_row=0 echo ![1;1H
echos ![1;37;41m%_cwds![0;1;31m>![32m>![33m>![35m>![36m>
REM Just a fancy prompt
:loop
echos ![s![1;3f![1;44;33m%_Shell![10C%_dow %_date...
...![10C%@substr[%_time,0,5]![9C%@int[%@eval[%@dosmem[b]/1024]]...
...![19C%@diskfree[c:,m]![u![0m
REM Finally fills in the variables (Time, Date,etc..) in the fields
input /w1 %%cmd
if "%cmd%"=="zzzz" goto loop
REM If no commands typed then just update the variables,
REM no need to redraw fields, thus less flickering and faster.
if "%cmd%"=="end" goto TheEnd
iff "%@substr[%cmd,0,1]"=="@" then
call %@substr[%cmd,1]
else call %cmd%
history/a %cmd%
endiff
REM To save commands to command history if they
REM are not preceded by @ character
if not "%cmd%"=="" echo.
REM This is to echo a new line because after programs
REM this prompt just overlaps on the last line
goto Preloop
:TheEnd
unset cmd
--- GEcho 1.00/beta
* Origin: 4 DOS - Choice of New Generation (6:600/602)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/06/1992
To: KEITH WINEKA Num: 80 Date: 11/02/1992
From: PAUL CHVOSTEK Re: Time: 3:39 am
Subj: DESCRIPTIONS Prvt: N Read: N
-> >>> 4DOS saves the file descriptions into a DESCRIPT.ION file. Is
-> >>> it possible to use different name?
->
-> >> No, there's no option to change the description file name (though
-> >> if you were adventurous you could patch 4DOS.COM and change the
-> >> strings there).
-> >> Why do you want/need to change the name?
->
-> > I would be nice for many BBS operators if the name were "FILES.BBS"
-> and > it weren't hidden.
->
-> I'll be the first to agree with that! :-)
Well, Maximus lets you change the name of FILES.BBS to something else.
Why not DESCRIPT.ION?
The biggest problem I see with this is that the 4DOS DESCRIBE command
only lets you edit the first 40 characters of the description. A better
solution might be to leave FILES.BBS as it is, and have a batch file
containing something like this:
-----
@echo off
if not exist files.bbs quit
attrib -h descript.ion
ren descript.ion descript.bak
set i=0
:loop
if %i GT %@lines[files.bbs] goto end
if exist %@word[0,%@line[0,files.bbs,%i]] gosub add_it
set i=%@eval[1+%i]
goto loop
:add_it
set desc=%@line[files.bbs,%i]
set first=%@index[%desc,%@word[1,%desc]]
set desc=%@substr[%desc,%first,%@eval[%@len[%desc] - %first]
describe %@word[0,%@line[files.bbs,%i]] "%desc"
return
:end
unset i
set desc=
set first=
set desc=
attrib +h descript.ion
-----
Note that I just wrote this, I haven't tested it. It looks to me as if
it should work, but if it doesn't, you can probably fix whatever problem
it has. My concern is whether "%desc" would be translated properly in
the describe line. If it isn't, the line can be added manually with
ECHO redirected with append to >>descript.ion.
Another major reason not to use the same file for DESCRIPT.ION and
FILES.BBS is that while BBS programs don't care about whitespace between
the filename and the descript.ion, 4DOS does. You'd get non-4DOS
readable description files if you wanted them to be human readable.
Here's a possibility -- just have whatever control characters are
translated by the [link] MECCA token in your files.bbs, so that
FILES.BBS actually contains:
[link]descript.ion
Would that work? Again, the human-readable bit, but if you don't need
your files.bbs to be human readable, that's no problem.
pmc
--- FidoPCB v1.3 [ff053/x]
* Origin: Canada Remote Systems, Mississauga, Ontario (1:229/15)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/06/1992
To: SAUL LEVY Num: 92 Date: 11/03/1992
From: RICHARD ROBERTSON Re: Time: 12:00 pm
Subj: DISKTOT.BTM Prvt: N Read: N
Hello Saul,
SL> Alas, DISKLEFT runs in less than 2 seconds while DISKTOT takes
SL> over 10 (with no floppy drives specified). The batch file
SL> is much smaller than the EXE file though.
Hmm.. BTM takes less than 2 seconds here on my 386-33.
SL> The 'for %a...' line won't work as written if %a is replaced by
SL> %drv and the colons left off. Change this line to suit your
SL> own system. I also would like to add commas to the values
SL> to make them easier to read, but don't want to make the
SL> batch file even more complicated than it already is. Have
SL> fun with this!
Ok - well I added a search for drives routine to speed <g> things along a
bit. Uses %_lastdisk variable.
_ _ _ O / _ _ C_U_T_ H_E_R_E_ _ _ _
O \
@echo off
:: DISKTOT.BTM by Saul Levy, Tucson, Arizona, 10/22/92, version 1.1
:: Modified by Richard Robertson, 3rd Nov '92, 3:640/556.6@Fidonet
:: (added drive list search)
:: change %blanks string, and %blanks string output lengths to suit
:: This version handles 999999999, totals of 9999999999 and percentages
:: from 0 to 100 (the latter are rounded up to the next higher % as
:: needed)
rem Main routine
setlocal
set blanks=` `
echo `Drive Total Used % Free %`
echo `=======================================================`
set c=66
rem 66 = drive C - make this 64 for drive A
set lastd=%@ascii[%_lastdisk]
:loop
set c=%@eval[%c+1]
set a=%@char[%c]:
gosub getnums
if %lastd eq %c goto display
goto loop
:display
echo `=======================================================`
set dutp=%@int[%@eval[%dut/%dtt*100+.5]]
set dftp=%@int[%@eval[%dft/%dtt*100+.5]]
echos Total %@substr[%blanks,0,%@eval[10-%@len[%dtt]]] %dtt
echos %@substr[%blanks,0,%@eval[10-%@len[%dut]]] %dut
echos %@substr[%blanks,0,%@eval[3-%@len[%dutp]]] %dutp
echos %@substr[%blanks,0,%@eval[10-%@len[%dft]]] %dft
echo %@substr[%blanks,0,%@eval[3-%@len[%dftp]]] %dftp
endlocal
quit
rem Subroutine to get data about drives
:getnums
set dt=%@disktotal[%a]
set du=%@diskused[%a]
set dup=%@int[%@eval[%du/%dt*100+.5]]
set df=%@diskfree[%a]
set dfp=%@int[%@eval[%df/%dt*100+.5]]
set dtt=%@eval[%dtt+%dt]
set dut=%@eval[%dut+%du]
set dft=%@eval[%dft+%df]
echos %a %@substr[%blanks,0,%@eval[9-%@len[%dt]]] %dt
echos %@substr[%blanks,0,%@eval[9-%@len[%du]]] %du
echos %@substr[%blanks,0,%@eval[3-%@len[%dup]]] %dup
echos %@substr[%blanks,0,%@eval[9-%@len[%df]]] %df
echo %@substr[%blanks,0,%@eval[3-%@len[%dfp]]] %dfp
return
rem End of DISKTOT.BTM
--- msgedsq 2.1
* Origin: Robbo's MailBox -=BNE QLD OZ=- (3:640/556.6)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/06/1992
To: ALL Num: 93 Date: 10/31/1992
From: MARK STIEBEL Re: Time: 2:24 am
Subj: SPACE.BTM Prvt: N Read: N
Hi all you fellow 4DOS dudes..
Once again, prompted by a post by someone else in this echo (Saul Levy),
I have used their idea of a batch file to show drive info.
SPACE.BTM shows the total, free and used space and percentages of a drive,
and
draws a usage graph as well. It might take a few seconds the first time you
run it on a certain drive while 4DOS logs that drive, but such is life.
----[ CUT HERE ]------------------------------
:: Author : Mark Stiebel, 3:633/159 (The Gate - (03)879-9082)
:: Written : 31/10/92
::
:: Please feel free to distribute and modify
::
:: There are a few things that could be modified and made better, but as
:: long as you specify a correct disk name, nothing can go wrong.
::
:: Have fun.
:: Check if the user wants help - not that he'd need it.
IF %@SUBSTR[%1,1,1] == h GOTO Usage
IF %@SUBSTR[%1,1,1] == ? GOTO Usage
IF %@SUBSTR[%1,0,1] == h GOTO Usage
IF %@SUBSTR[%1,0,1] == ? GOTO Usage
:: Get rid of the cursor, set values, and if no drive was specified,
:: use the default drive instead.
SETDOS /s0:0
Set c=4
Set drive=%1:
IF %1. == . SET drive=%_DISK:
:: If the selected drive is ready, work out how many blocks will be
:: needed (for the usage graph), and if not to go to the error message.
CLS
IFF %@READY[%drive] == 1 THEN (
Set x=%@INT[%@EVAL[(%@DISKUSED[%drive,b]/%@DISKTOTAL[%drive,b])*61]]
)
ELSE GOTO NotReady
ENDIFF
:: Draw the boxes and display the numerical stats.
DRAWBOX 1 30 3 63 1 whi on bla
DRAWBOX 3 3 7 63 1 whi on bla
DRAWBOX 1 3 9 63 2 whi on bla
SCRPUT 2 31 whi on bla SPACE.BTM - Mark Stiebel (c)1992
SCRPUT 2 6 whi on bla Statistics for drive %@UPPER[%drive]
SCRPUT 4 6 whi on bla Total space : %@DISKTOTAL[%drive,K] Kbytes
SCRPUT 5 6 whi on bla Used space : %@DISKUSED[%drive,K] Kbytes
SCRPUT 6 6 whi on bla Free space : %@DISKFREE[%drive,K] Kbytes
SCRPUT 4 34 whi on bla - %@DISKTOTAL[%drive,M] Mbytes
SCRPUT 5 34 whi on bla - %@DISKUSED[%drive,M] Mbytes
SCRPUT 6 34 whi on bla - %@DISKFREE[%drive,M] Mbytes
SCRPUT 4 48 whi on bla - 100`%`
SCRPUT 5 48 whi on bla -
%@INT[%@EVAL[(%@DISKUSED[%drive,b]/%@DISKTOTAL[%drive,b])*101]]`%`
SCRPUT 6 48 whi on bla -
%@INT[%@EVAL[(%@DISKFREE[%drive,b]/%@DISKTOTAL[%drive,b])*101]]`%`
:: Draw the usage bar. If anyone can find a quicker way (preferably
:: instantaeous) way to do this, can you please give me a buzz.
:Bar
IFF %x gt %c THEN SCRPUT 8 %c bri whi on bla ▒
ELSE IFF %x le %c THEN SCRPUT 8 %c bri whi on bla ·
ENDIFF
Set c=%@EVAL[%c+1]
IF %c lt 63 GOTO Bar
Goto End
:: The 'Drive Not Ready' error message
:NotReady
echo.
echo ERROR: Drive %drive Is not ready. Please insert a disk or make sure
echo that the hard drive is operational.
echo.
SETDOS /s10:100
QUIT
:: The 'Help' message
:Usage
TEXT
USAGE:
SPACE <drive>
Where <drive> is the drive letter. This may be specified in
upper or lower case.
If no drive is specified, SPACE.BTM will use the current drive.
ENDTEXT
QUIT
:: unset all the environment variables used, restore the cursor,
:: and put it just below the output from the .BTM file.
:End
SCREEN 12 0
UNSET c x drive
SETDOS /s10:100
----[ CUT HERE ]------------------------------
-:{ M-><-S }:-
... Thinly sliced cabbage -- Cole's Law
--- FMail 0.92
* Origin: The Gate - Melbourne, Australia - +61-3-879-9082 (3:633/159.0)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/06/1992
To: FURLAN PRIMUS Num: 86 Date: 11/03/1992
From: MAYNARD HOGG Re: Time: 1:45 pm
Subj: Text | Set Prvt: N Read: N
On 10-29-92, you wrote TERRY HORTON re: 4DOS menus
FP>actually, you don't even need the ASCII file: <g>
>text | set choice=%@substr[%@select[con,5,16,20,30, choose one ],0]
>:
>endtext
>:
>got it from right here, in the 4DOS echo, i don't recall who
>suggested it...
Whoever it was deserves a medal! This arcane trick belongs in the
manual as the archetypical example of how to use %@SELECT[].
<Later> I can't get this to work. %@line[] works, but not %@select[].
The latter waits for input from the keyboard and, when I hit the ^Z CR
sequence, displays the lines that I have typed and then hangs. Back to
the drawing board...
-- SPEED 1.10 #1086:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/07/1992
To: ARAN SPENCE Num: 129 Date: 11/04/1992
From: FRANK STOERMER Re: Time: 8:27 pm
Subj: Descriptions Prvt: N Read: N
> Has anyone come up with at BTM which will describe only the files
> that don't have descriptions? It's kind of annoying when you have
> to fan through 200+ files just to describe 30 or so. Yes, I know
> they can be done one at a time or in multiples on the command line;
> but wouldn't it be much simpler to type DESCRIBE *.* and only comment
> the files without existing descriptions?
alias describe for %a in (*.*) do if "%@descript[%a]" eq "" describe %a
FrAnK
---
* Origin: Fatal application error - please replace user (2:2402/313.2)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/07/1992
To: ALL Num: 140 Date: 11/04/1992
From: DAYTON LIVINGSTON Re: Time: 11:04 am
Subj: It CAN be done! Prvt: N Read: N
TO WHOM IT MAY CONCERN:
(Sorry, I forgot the poster's name)
A few days back, there was a message from someone who wanted to
know how to make the %@SELECT function scroll down a number of
times and select an item all by hitting a function key. He was
designing some sort of menu system for games. I think it looked
something like:
F1 Majong
F2 Baccarat
F3 Backgammon
F4 Shoot the Moon
F5 Pareesi Squares
I wrote back that it could not be done (and I saw that that was
the general consensus from others as well), and wrote a BTM that
would do something similar. Since then, I've read some other
messages that got the ol' brain-thingie working on the problem,
and I finally figured out a solution. Using ANSI key re-
definitions will allow one to redefine keys which %@SELECT will
accept. Of course, this will depend on the ANSI driver used. I'm
using DGANSI (with DVANSI to get it into my other DV windows),
and the following works fine on my machine. I will NOT say if it
will work on others!!!
Thanks to Terry Horton who mentioned the ANSI redefinition in use
with SELECT (not %@SELECT - it was a different topic, but it gave
me the idea), and to Furlan Primus for showing me how to use the
TEXT | %@SELECT redirection - nice!
Also, if anyone remembers who wrote the initial question on how
to do it, please let them know about this possible solution.
Thanks.
ZELECT.BTM
_______________________O/_____CUT HERE_____O/______________________
O\ O\
@ECHO OFF
SETLOCAL
ECHO %@CHAR[27][0;59;0;71;0;80;13p
^REM F1=Down Enter
ECHO %@CHAR[27][0;60;0;71;0;80;0;80;13p
^REM F2=Down Down Enter
ECHO %@CHAR[27][0;61;0;71;0;80;0;80;0;80;13p
^REM F3=Down Down Down Enter
ECHO %@CHAR[27][0;62;0;71;0;80;0;80;0;80;0;80;13p
^REM F4=Down Down Down Down Enter
ECHO %@CHAR[27][0;63;0;71;0;80;0;80;0;80;0;80;0;80;13p
^REM F5=Down Down Down Down Down Enter
TEXT | SET CHOICE=%@SUBSTR[%@SELECT[CON,5,16,20,29, CHOOSE ONE ],0]
-- EXIT --
You hit F1
You hit F2
You hit F3
You hit F4
You hit F5
ENDTEXT
ECHO %choice
ECHO %@CHAR[27][0;59;0;59p ^REM Reset F1 to F1
ECHO %@CHAR[27][0;60;0;60p ^REM Reset F2 to F2
ECHO %@CHAR[27][0;61;0;61p ^REM Reset F3 to F3
ECHO %@CHAR[27][0;62;0;62p ^REM Reset F4 to F4
ECHO %@CHAR[27][0;63;0;62p ^REM Reset F5 to F5
QUIT
_______________________O/_____CUT HERE_____O/______________________
O\ O\
Of course, the %@CHAR[27] can be replaced with an actual escape
character (ASCII 27) to speed things along. This is just an
example of HOW to do it to go over the echo.
- Dayton
* OLX 994 * Muhamed Ali's greatest hits - Knockout Records
--- Maximus 2.00
* Origin: T.V. BBS - Glendale, AZ - (602) 930-8542 (1:114/148)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/08/1992
To: FURLAN PRIMUS Num: 76 Date: 11/05/1992
From: MAYNARD HOGG Re: Time: 10:40 am
Subj: Descriptions Prvt: N Read: N
On 11-02-92, you wrote JOHN THOMPSON
JT>Can't you just make an unhidden copy of DESCRIPT.ION and call it
>FILES.BBS?
FP>no, the formats are a bit different.
Is it text? If so, DESCRIPT.ION files are incredibly easy to hack with
AWK.
#AWK program to format DESCRIPT.ION file to fixed-width format
#Usage:
# attrib -h %targetdir\descript.ion
# awk -f this.awk %targetdir\descript.ion >%targetdir\descript.lst
#from:
# mirror.fil MIRROR FAT saver
# treeinfo.ncd Norton Change Directory database
# l&f lost+found
# trash trash bucket
# $1 $2 $3...
#to:
# mirror.fil MIRROR FAT saver
# treeinfo.ncd Norton Change Directory database
# l&f lost+found
# trash trash bucket
{
$1 = sprintf("%-12s",$1)
print
}
The same goes for DIR/KMA-D listings. Unlike that other shell, 4DOS
keeps the extension and the filename together so that you can refer to
them together as $1 ("first word"). None of that nonsense of worrying
about whether $2 is the extension or the size! (Alas, you have to
watch out for 0:00 time stamps since they are suppressed.)
-- SPEED 1.10 #1086:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/08/1992
To: PHIL BEEBLE Num: 60 Date: 11/05/1992
From: MORRIS TURPIN Re: Time: 9:00 pm
Subj: help Prvt: N Read: N
In a message dated Oct 29 at 16:27, Phil Beeble of 1:105/78
wrote to All:
PB> How can I pause the Batch file to allow the Keystack to work
PB> completely, but still have the process go on automatically?
PB> When a PAUSE is put into the Batch file, It has no effect, Since
PB> the Keystack
PB> has not had time to run. Putting in a /w at the end of it does not
PB> help either.. It pauses at the end of the Command, but does not run
PB> the command.
No problem. From the KEYSTACK help screen:
SYNTAX (Internal 4DOS)
KEYSTACK ["abc"] [nn] [key] [@nn] [!] [/Wn]
The /W option allows you to wait for the specified number of clock ticks
(each tick = 1/18th second) before passing the following characters.
As you can see, placing the "/w" at the end of the line will not have any
effect, since no characters follow the "wait" switch.
To illustrate the usage of the "/w" switch, here is the alias that I use to
load GEOCLOCK:
GEO=kstack^keystack /w6 27 /w6 "9"^pushd c:\geo^
geoclk showsvga map4001^popd^cls
KEYSTACK will wait for 6 timer ticks (1/3 sec) then send the escape
character (ascii 27), wait an additional 6 timer ticks then send numeral
"9".
Works like a charm!
--- msged 2.07
* Origin: Ansi's Escape, Echo Point -- Ottawa, Ontario (1:163/140.3)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/08/1992
To: SAUL LEVY Num: 69 Date: 11/05/1992
From: TERRY PINTO Re: Time: 6:59 am
Subj: system.btm Prvt: N Read: N
SL>> echo `Drive Total Used % Free %`
SL>> echo `=======================================================`
SL>> for %a in (C: D: E: F: G: H:) do gosub getnums
SL>> echo `=======================================================`
SD> [...]
Saul,
I saw this posted and thought you might like to see something I put
together that does the same thing but a little more... SYSTEM.BTM reports
vital system statistics and lists the TOTAL SPACE - SPACE USED - FREE SPACE
for drives that are currently attached to the system (not including floppy
drives - YET!) and the percentage of space used in an automatically sized
window. The routing uses two system variables, SYSOP and SYSTEM that are the
SYSOP name and the SYSTEM name. These are for display purposes only and could
just as easily be hard coded in the .BTM file but this made it a bit more
portable... enjoy!
-------------- > cut here <
---------------------------------------------------
@echo off
cls
scrput 1 0 bright yellow on black 4DOS System Information - v1.00
echo
iff %_NDP=0 then
set copr=None
else
set copr=80%_NDP
endiff
if %_dv=0 .and. %_win=0 set multi=None
if %_dv=1 set multi=DesqView
if %_win=1 set multi=Win 2.0
if %_win=2 set multi=Win 3.x Enh
if %_win=3 set multi=Win 3.x Real or Stan
if %_win=20 set multi=OS2 DOS Box
:parse
if %#=0 goto :full_screen
if %1=/cpu scrput 3 1 bright green on black Processor: 80%_cpu
if %1=/fpp scrput 3 1 bright green on black Co-Processor: %copr
iff %1=/ver then
iff %2=/r then
scrput 3 1 bright green on black Operating System:
ver /r
else
scrput 3 1 bright green on black Operating System: MSDOS %_dosver
scrput 4 1 bright green on black 4DOS %_4ver
endiff
endiff
if %1=/com scrput 3 1 bright green on black COMSPEC: %comspec
if %1=/vid scrput 3 1 bright green on black Video:
%@upper[%_video]:%@upper[%_monitor]
if %1=/mtk scrput 3 1 bright green on black Multi-Tasker: %multi
(%@eval[%_shell-1])
iff %1=/mem then
scrput 3 1 bright green on black Memory: %@dosmem[b] bytes
iff %2=/c then
scrput 3 1 bright green on black EMS: %@ems[b] bytes
scrput 3 1 bright green on black XMS: %@xms[b] bytes
endiff
endiff
iff %1=/fre then
for %a in (C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z) if %a LE
%_lastdisk fre %a
endiff
if %1=/ems scrput 3 1 bright green on black EMS: %@ems[b] bytes
if %1=/xms scrput 3 1 bright green on black XMS: %@xms[b] bytes
if %1=/help goto :help
goto :exit
:help
scrput 3 1 bright cyan on black Syntax SYSTEM [/option]
scrput 5 19 bright red on black /cpu - Report CPU type
scrput 6 19 bright red on black /fpp - Report Floating Point Processor type
scrput 7 19 bright red on black /ver - Report DOS/4DOS version information
scrput 8 19 bright red on black /com - Report COMSPEC in use
scrput 9 19 bright red on black /vid - Report Video Mode and Monitor type
scrput 10 19 bright red on black /mtk - Report Multi-Tasker in use
scrput 11 19 bright red on black /mem - Report Conventional memory
scrput 12 19 bright red on black /ems - Report EMS Memory
scrput 13 19 bright red on black /xms - Report XMS Memory
scrput 14 19 bright red on black /fre - Report Disk Statistics
goto :exit
:full_screen
set brow=%@eval[%@ascii[%_lastdisk]-%@ascii[C]+9]
drawbox 2 0 17 31 2 bright white on red fill red
drawhline 5 0 31 3 bright white on red
drawbox 2 35 %brow 75 2 bright white on blue fill blue
drawhline 5 35 40 2 bright white on blue
rem beep 440 4 600 2 1040 6
scrput 3 3 bright yellow on red %system
scrput 4 3 bright yellow on red %sysop
scrput 3 37 bright yellow on blue Disk Statistics
scrput 4 37 white on blue Drive Total Used Free
scrput 6 3 white on red Date :
scrput 6 13 bright cyan on red %_DATE
scrput 7 3 white on red Time :
scrput 7 13 bright cyan on red %_TIME
scrput 8 3 white on red CPU :
scrput 8 13 bright cyan on red 80%_CPU
scrput 9 3 white on red MathCoP :
scrput 9 13 bright cyan on red %COPR
scrput 10 3 white on red DOS/4DOS:
scrput 10 13 bright cyan on red %_DOSVER/%_4VER
scrput 11 3 white on red Comspec :
scrput 11 13 bright cyan on red %COMSPEC
scrput 12 3 white on red Video :
scrput 12 13 bright cyan on red %@UPPER[%_VIDEO]:%@UPPER[%_MONITOR]
scrput 13 3 white on red M-Task :
scrput 13 13 bright cyan on red %MULTI (%@EVAL[%_SHELL])
scrput 14 3 white on red Memory :
scrput 14 13 bright cyan on red %@DOSMEM[b]
scrput 15 3 white on red EMS :
scrput 15 13 bright cyan on red %@EMS[b]
scrput 16 3 white on red XMS :
scrput 16 13 bright cyan on red %@XMS[b]
screen 18 0
set x=6
set d=%@ascii[C]
:DLOOP
set total=0
set totused=0
set totfree=0
:DLOOP1
iff %@char[%d] LE %_lastdisk then
if %@eval[%@disktotal[%@char[%d]:,m]] LT 1000 .and.
%@eval[%@disktotal[%@char[%d]:,m]] GE 100 scrput %x 39 bright yellow on blue
%@char[%d]:
if %@eval[%@disktotal[%@char[%d]:,m]] LT 1000 .and.
%@eval[%@disktotal[%@char[%d]:,m]] GE 100 scrput %x 44 bright cyan on blue
%@disktotal[%@char[%d]:,m] Mb
if %@eval[%@diskused[%@char[%d]:,m]] LT 1000 .and.
%@eval[%@diskused[%@char[%d]:,m]] GE 100 scrput %x 53 bright cyan on blue
%@diskused[%@char[%d]:,m] Mb
if %@eval[%@diskfree[%@char[%d]:,m]] LT 1000 .and.
%@eval[%@diskfree[%@char[%d]:,m]] GE 100 scrput %x 63 bright cyan on blue
%@diskfree[%@char[%d]:,m] Mb
if %@eval[%@disktotal[%@char[%d]:,m]] LT 100 .and.
%@eval[%@disktotal[%@char[%d]:,m]] GE 10 scrput %x 39 bright yellow on blue
%@char[%d]:
if %@eval[%@disktotal[%@char[%d]:,m]] LT 100 .and.
%@eval[%@disktotal[%@char[%d]:,m]] GE 10 scrput %x 45 bright cyan on blue
>> Message length exceeded, split by WILDMAIL! v2.04 <<
>> Continued in next message <<
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/08/1992
To: SAUL LEVY Num: 70 Date: 11/05/1992
From: TERRY PINTO Re: Time: 6:59 am
Subj: system.btm Prvt: N Read: N
>> Message length exceeded, split by WILDMAIL! v2.04 <<
>> Continued from previous message <<
%@disktotal[%@char[%d]:,m] Mb
if %@eval[%@diskused[%@char[%d]:,m]] LT 100 .and.
%@eval[%@diskused[%@char[%d]:,m]] GE 10 scrput %x 54 bright cyan on blue
%@diskused[%@char[%d]:,m] Mb
if %@eval[%@diskfree[%@char[%d]:,m]] LT 100 .and.
%@eval[%@diskfree[%@char[%d]:,m]] GE 10 scrput %x 64 bright cyan on blue
%@diskfree[%@char[%d]:,m] Mb
if %@eval[%@disktotal[%@char[%d]:,m]] LT 10 .and.
%@eval[%@disktotal[%@char[%d]:,m]] GE 0 scrput %x 39 bright yellow on blue
%@char[%d]:
if %@eval[%@disktotal[%@char[%d]:,m]] LT 10 .and.
%@eval[%@disktotal[%@char[%d]:,m]] GE 0 scrput %x 46 bright cyan on blue
%@disktotal[%@char[%d]:,m] Mb
if %@eval[%@diskused[%@char[%d]:,m]] LT 10 .and.
%@eval[%@diskused[%@char[%d]:,m]] GE 0 scrput %x 55 bright cyan on blue
%@diskused[%@char[%d]:,m] Mb
if %@eval[%@diskfree[%@char[%d]:,m]] LT 10 .and.
%@eval[%@diskfree[%@char[%d]:,m]] GE 0 scrput %x 65 bright cyan on blue
%@diskfree[%@char[%d]:,m] Mb
set
per=%@int[%@eval[%@diskused[%@char[%d]:,m]/%@disktotal[%@char[%d]:,m]*100] ]
if %per == 100 scrput %x 70 bright white on blue %@eval[%per]%%%%
if %per LE 99 .and. %per GT 90 scrput %x 71 bright blink red on blue
%@eval[%per]%%%%
if %per LE 90 .and. %per GT 70 scrput %x 71 bright red on blue
%@eval[%per]%%%%
if %per LE 70 .and. %per GT 50 scrput %x 71 bright yellow on blue
%@eval[%per]%%%%
if %per LE 50 .and. %per GT 30 scrput %x 71 bright green on blue
%@eval[%per]%%%%
if %per LE 30 .and. %per GE 0 scrput %x 72 bright white on blue
%@eval[%per]%%%%
set total=%@eval[%@disktotal[%@char[%d]:,m]+%total]
set totused=%@eval[%@diskused[%@char[%d]:,m]+%totused]
set totfree=%@eval[%@diskfree[%@char[%d]:,m]+%totfree]
set x=%@eval[%x+1]
set d=%@eval[%d+1]
goto :DLOOP1
endiff
drawhline %x 37 37 1 bright white on blue
set x=%@eval[%x+1]
scrput %x 37 bright yellow on blue Total:
scrput %x 44 bright green on blue %total Mb
scrput %x 53 bright green on blue %totused Mb
scrput %x 63 bright green on blue %totfree Mb
set totper=%@int[%@eval[%totused/%total*100]]
if %totper == 100 scrput %x 70 bright blink white on blue
%@eval[%totper]%%%%
if %totper LE 99 .and. %totper GT 90 scrput %x 71 bright blink red on blue
%@eval[%totper]%%%%
if %totper LE 90 .and. %totper GT 70 scrput %x 71 bright red on blue
%@eval[%totper]%%%%
if %totper LE 70 .and. %totper GT 50 scrput %x 71 bright yellow on blue
%@eval[%totper]%%%%
if %totper LE 50 .and. %totper GT 30 scrput %x 71 bright green on blue
%@eval[%totper]%%%%
if %totper LE 30 .and. %totper GE 0 scrput %x 72 bright white on blue
%@eval[%totper]%%%%
:EXIT
-----------------------------------------------------------------------------
Terry
--- GoldEd 2.40.P0720+/D'Bridge
* Origin: CyBorg Systems BBS (1:105/340)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/08/1992
To: DENNIS MATNEY Num: 61 Date: 11/02/1992
From: BILL-STEVEN KERR Re: Time: 7:46 pm
Subj: Touching file in 4dos Prvt: N Read: N
> JB> The alias for a msdos version of touch is... (get ready to spew)
> JB> alias touch for x in (%%&) do command /c copy %%x+,,
^
> Don't know if there is a typo or what-but this does
> not work for me...
Change the x to %%x.
Steven.
Fidonet : 2:259/27.5
Usenet : bill-steven.kerr@almac.co.uk
--- FMail 0.90
* Origin: Bill-Steven Kerr, Mid Calder, SCOTLAND (2:259/27.5)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/09/1992
To: BILL TOWSLEY Num: 80 Date: 11/06/1992
From: MAYNARD HOGG Re: Time: 4:31 pm
Subj: Descriptions Prvt: N Read: N
On 11-03-92, BILL TOWSLEY wrote FURLAN PRIMUS re: Descriptions
BT>Actually, although it's not pretty to look at, the descript.ion
>file *WILL* work when copied to files.bbs (descriptions may get
>truncated however).
>
>The key to all of this, is that it would make file movement
>*SIMPLER* on a BBS system, if a person could call the description
>file files.bbs, and leave it unhidden. That way, any 4DOS file
>manipulation commands would automatically update the BBS files
>listings. As it is now, if you use a BBS file manager, you loose
>your DIR descriptions, and if you use COPY/MOVE, you loose your
>files.bbs descriptions.
Simple or the type of simple-minded approach that eventually causes
more work than it saves? Let's try logic and work it through. Imagine
this scenario: Someone is desperate enough to simply take a hex editor
to 4DOS.COM, changing DESCRIPT.ION to FILES.BBS. That person will
still have to build the appropriate ATTRIB -H FILES.BBS lines into the
batch files for BBS "events" and 4DOS-style maintenance. Now, if that
person wanted to use something a bit more sophisticated that
DESCRIBE--FDU or 4EDIT, for example--those programs are going to look
for DESCRIPT.ION. Solution: Yet more patching. (Simple enough for
4EDIT.EXE, but my version of FDU.COM presents problems.) Sounds like a
lot of unnecessary work to me.
The preceding paragraph totally ignored the issue of file format.
What's so bad about having separate files? (Assuming, of course,
infinite disk space which nobody has. <g>) The trick is to always use
batch files that make sure that keep the two in sync.
The answer? MAKE, of course. If you've got the necessary conversion
tools--I'll use the names F2D and D2F--a 7-line makefile should do the
trick.
files.bbs: descript.ion
d2f descript.ion files.bbs
touch -f descript.ion files.bbs
descript.ion: files.bbs
f2d files.bbs descript.ion
touch -f files.bbs descript.ion
What does this mean? Note that there are two types of lines. #1 and #5
are dependency rules; the indented ones, commands. #1 tells MAKE that
FILES.BBS depends on--i.e., is made from or must be newer
than--file(s) DESCRIPT.ION; #5, that target DESCRIPT.ION depends on
file(s) FILES.BBS.
If the target does not exist or predates any files on the list, MAKE
runs the commands on subsequent indented lines to "make" (or
"remake"--i.e. update) the target.
The great thing about MAKE is that, once you've written the makefile,
it AUTOMATICALLY does ONLY what is necessary. Here, if you are a
"hands off" sysop--e.g., spend your time in the message section or
working--all MAKE will do is update DESCRIPT.ION and then only on the
days that FILES.BBS changes.
Note: The TOUCH commands in lines 3 and 7 are to force the time stamps
on the two files to agree so that MAKE doesn't go into a loop updating
FILES.BBS from DESCRIPT.ION, updating DESCRIPT.ION from the new
FILES.BBS, etc. ad infinitum. (If your TOUCH doesn't support the -f
"take stamp from file" option, use the regular "touch to current
system time" approach demonstrated in the batch file below.)
Sorry for the long commercials on MAKE, but it's the sort of tool that
4DOS users should know about.
BTW, speaking of 4DOS, while you're looking around for a public domain
or shareware MAKE, note that you can always simulate simple makefiles
like the above with batch commands. (In some ways, this version is
better--no risk of an infinite loop, for example.)
IFF %@filedate[files.bbs] lt %@filedate[descript.ion] .or.
%@filetime[files.bbs] lt %@filetime[descript.ion]
THEN d2f descript.ion files.bbs
ELSEIFF %@filedate[files.bbs] gt %@filedate[descript.ion] .or.
%@filetime[files.bbs] gt %@filetime[descript.ion]
THEN f2d files.bbs descript.ion
ELSE (echo. Files in sync! Nothing to do.^quit)
touch files.bbs descript.ion
-- SPEED 1.10 #1086:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/09/1992
To: YALL Num: 81 Date: 11/07/1992
From: MAYNARD HOGG Re: Time: 1:40 am
Subj: Space.Btm Prvt: N Read: N
It took some work, but I managed to speed up the loop for displaying
the fuel gauge bar by building strings for the two parts and then
displaying them with a single SCRPUT. But the result was so fast on my
slower machine, a 386/33, that I had to slow it down somewhat by
adding scale lines, tracking the percentage with an extra SCRPUT, and
pausing briefly with a BEEP. Even with the BEEP delay in the loop, the
file runs approximately twice as fast as my previous version.
First, the initial calculations.
set dt=%@disktotal[%drive,b]
set du=%@diskused[%drive,b]/%dt
Set x=%@EVAL[%du*60]
set du=%@EVAL[%du*100]
::don't want to worry about special case of 100% just yet
:(too hard to program)
if %x ge 60 set x=59.99
if %du ge 100 set du=99.99
:
:
SCRPUT 5 48 %wob - %@int[%du]`%`
:: ^^^^^^^^^^Never greater than 99% here.
SCRPUT 6 48 %wob - %@INT[%@EVAL[(%@DISKFREE[%drive,b]/%dt)*100+0.5]]`%`
::print scale first
set outc=%@char[250]
set outc=%outc%%outc%%outc%%outc%%outc%%@char[179]
:dots
set outc=%outc%%outc%
if %@len[%outc] lt 59 goto dots
set outc=%@substr[%outc,0,59]
SCRPUT 8 4 %wob %outc
::screen 0 0 ^pause
set ptr=4
set c=%@int[%@eval[%du/10]]^if %c lt 1 goto bar20
:: ^^^^^^^^^^^^^^^^^^^^^max = 9
::now is the time to round off %du
set du=%@int[%@eval[%du+0.5]]
:: ^^^^^^^^^^^^^^^^^^^^^^round up (even to 100%)
set outc=%@char[177]
::six blocks for each 10% on scale
set outc=%outc%%outc%%outc%%outc%%outc%%@char[179]
::print bar in 10% blocks
:bar10
::pc is the current per cent for SCRPUT command below
set pc=%@eval[(10 - %c)*10]
::print remainder
:bar15
scrput 5 50 %bwob% %pc`% `
SCRPUT 8 %ptr %bwob %outc
::delay 2 ticks
beep 10 2
set ptr=%@eval[%ptr + %@len[%outc]]
set c=%@eval[%c - 1]
if %c gt 0 goto bar10
if %c eq 0 (
set outc=%@substr[%outc,0,%@eval[%x %% 6]]
rem ^^^^^^^^^^^^^^^
rem yields 5 for 99.99% case
set c=0^set pc=%du
if /%outc/ != // goto bar15
)
:bar20
set outc=%@char[250]
set outc=%outc%%outc%%outc%%outc%%outc%
set c=%@eval[60-1-%x]^if %c lt 1 goto end
:bar30
set c=%@eval[%c - %@len[%outc]]
set outc=%outc%%outc%
if %c gt 1 goto bar30
set outc=%@substr[%outc,0,%@eval[60-1-%x]]
SCRPUT 8 %ptr %bwob %outc
Goto End
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
yo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/09/1992
To: MARK STIEBEL Num: 77 Date: 11/06/1992
From: MAYNARD HOGG Re: Time: 4:31 pm
Subj: Space.Btm 1/2 Prvt: N Read: N
On 11-06-92, MAYNARD HOGG wrote MARK STIEBEL re: SPACE.BTM 1/2
MS>Hi all you fellow 4DOS dudes..
I'm no DUDE, turkey! <grin>
Some changes--improvements, I hope:
<>text>nul
<>Date: 10-31-92
<>From: MARK STIEBEL
<>Returns (via %?):
<>* the percentage in the middle line (indicated with an arrow)
<>* 255 if the disk is not ready
<>* 0 for the help mode
<>:
<>endtext
One of my recent discoveries. <grin>
MS>:: Get rid of the cursor, set values, and if no drive was specified,
>:: use the default drive instead.
setlocal
The SETLOCAL is so that you don't have to UNSET at the end.
MS>::SETDOS /s0:0
At this point, you should save the current cursor shape, but I've
forgotten how. <sigh> I've therefore disabled it so that others don't
get the same shock as I did when I ran your version--a totally
different cursor. It took me a while to figure how to change it back.
Things aren't so bad since the cursor stays in the upper left hand
corner. Of course, the faster the bar routine, the less time that the
user has to notice. On my 33-MHz machines, things happen pretty fast.
MS>Set c=4
>Set drive=%1:
>IF %1. == . SET drive=%_DISK:
set wob=bri green on %_bg
set bwob=bri red on %_bg
These variables serve two purposes: (1) They help short the longest
lines to within the 80-character limit for messages. (2) They provide
centralized control over the color scheme.
Note the use of %_BG to prevent dropouts inside the box.
MS>IFF %@READY[%drive] == 1 THEN (
> Set x=%@INT[%@EVAL[(%@DISKUSED[%drive,b]/%@DISKTOTAL[%drive,b])*61]]
> )
>ELSE GOTO NotReady
>ENDIFF
The following would be simpler:
IF %@READY[%drive] != 1 GOTO NotReady
set dt=%@disktotal[%drive,b]
set du=%@diskused[%drive,b]/%dt
Set x=%@INT[%@EVAL[%du*61]]
set du=%@INT[%@EVAL[%du*101]]
Note how I again use environment variables to shorten the longest
lines and, coincidentally, avoid unnecessary recalculations. (I didn't
bother with the megabyte and kilobyte versions since the lines are
short enough, and the values are only used once.)
At this point, DU is the disk usage in percent--i.e., the return code.
>SCRPUT 4 48 whi on bla - 100`%`
SCRPUT 5 48 %wob - %du`%`
SCRPUT 6 48 %wob - %@INT[%@EVAL[(%@DISKFREE[%drive,b]/%dt)*101]]`%`
The "longest lines" that I referred to above.
>:: Draw the usage bar.
set outchar=%@char[177]
:Bar
if %x eq %c set outchar=%@char[250]
SCRPUT 8 %c %bwob %outchar
Note how I used the %@char[] function to keep this 7-bit and then had
to rearrange the loop to minimize the number of calls.
>::If anyone can find a quicker way (preferably
>::instantaeous) way to do this, can you please give me a buzz.
Let me think about it. The trick is to either use variations on the
following scheme or build the string first--yet another environment
variable!--and then display it.
%@substr[%@char[177]%@char[177]...,0,%count]
%@substr[%@char[250]%@char[250]...,0,%@eval[63-%count]]
[ Continued In Next Message... ]
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/09/1992
To: MARK STIEBEL Num: 78 Date: 11/06/1992
From: MAYNARD HOGG Re: Time: 4:31 pm
Subj: Space.Btm 2/2 Prvt: N Read: N
[ ...Continued From Previous Message ]
>:: The 'Drive Not Ready' error message
>:NotReady
>:
>::SETDOS /s10:100
>::QUIT
set du=255
goto end
Unlike BAT files--the only kind offered by that other shell--BTM files
do not suffer much of a performance hit with GOTOs. Since the file has
to clean up after itself, it's best to keep the number of QUITs to a
minimum.
MS>:: The 'Help' message
>:
>QUIT 0
This QUIT, however, is safe since the only path here skips the first
SETDOS.
MS>:End
>::UNSET c x drive
As mentioned above, SETLOCAL relieves you of the responsibility of
keeping track of which variables to UNSET.
MS>::SETDOS /s10:100
As mentioned above, I've disabled the SETDOS/S commands in the
interest of portability.
>***EOF***
quit %du
Return the disk utilization percentage--for use in activating cleanup
routines, for example.
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/11/1992
To: YOUSUF KHAN Num: 55 Date: 11/07/1992
From: MAYNARD HOGG Re: Time: 7:57 am
Subj: Daylight Savings Prvt: N Read: N
MH>Such loops are not necessary. Once you know what day the last day
>of October is, you can CALCULATE the date of the last Sunday.
YK>True, but that would involve a bunch of "IFF ... THEN ... ELSE[IFF]
>... ENDIFF" statements, this one does it only FOR statements.
Huh? When I said calculate, I meant a single-line calculation of the
form. (Code for the function DOW have already appeared in this echo.)
set sunday=31-%@dow[10-31-%substr[%_date,6,2]]
If the 31st is a Monday (i.e. day 1 of the week), the preceding Sunday
is the 30th. Surprise!
It's called arithmetic. I learned in elementary school. Of course,
that was back in the Dark Ages before "New Math". <g>
-- SPEED 1.10 #1086:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/11/1992
To: HERBERT BOUKNIGHT Num: 59 Date: 11/07/1992
From: RUPA SCHOMAKER Re: Time: 10:19 pm
Subj: Neat Idea Prvt: N Read: N
Howdy Herbert:
In a msg dated <06 Nov 92>, Herbert Bouknight writes to Mike Dunnagan:
HB> By the way, if Qui is reading this, the prompt is great, but I've got
one
HB> suggestion. Isn't it possible to have the prompt show the free space of
HB> the drive you are present on instead of only the drive you assign in the
HB> prompt string?? For ex, if you are on C:, then show free space on C:,
but
HB> if you change to D:, show that free space. Anyway, this is still
HB> excellent work ;).
Try this prompt:
PROMPT=$e[1;1H$e[44m$e[K Time: $t$h$h$h | Date: %%_DATE | %%@dosmem[K]K
Free | %%@diskfree[%%_disk,K]K Free | Shell
[$z]$e[%%_ROWS;1H$e[0m$e[0;32m$l$e[0;31m$p$e[0;32m$g$e[0;36m$e[K
The "|" will need to be escaped or converted to high ascii (it is the
vertical bar on my system). And yes, it shows free diskspace for the current
drive. I could probably even put logic in there for not checking free space
of a floppy drive, but I didn't bother.
Anyway, tell me what you think.
-=(Rupa)=- [Entered on <07 Nov 92> at <22:13> in Houston Texas]
--- FreeMail/GoldED 2.40.P0720+
* Origin: Funny ... I don't recall asking for your opinion.... (1:106/1024)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/11/1992
To: SCOTT WUNSCH Num: 84 Date: 11/09/1992
From: MAYNARD HOGG Re: Time: 9:25 am
Subj: Space.Btm Prvt: N Read: N
On 11-05-92, you wrote MARK STIEBEL
SW>It might interest you to know that not all of us use SETDOS /V0,
>etc. <g> Perhaps an @ECHO OFF would be in order? ;)
Some us also use COMMAND.COM <g>--but only in Japanese.
SW>The graph drawing tends to be a little <g> slow on my 386SX-16. I
>think 4DOS needs an equivilent to the BASIC STRING$ function.
I tried BASIC once. In 1980 on a Commodore. At first I liked it
because it reminded me of FORTRAN, my first programming language, but
when I graduated to CP/M, I switched to assembler and BDS C.
What does STRING$ do? There's always %@substr[] and implicit
concatenation. (See my version for examples.)
set xxx=%solidbar%%dots
Building the string and then displaying it with a single call to
SCRPUT greatly sped up the batch file, but I had to backtrack because
(1) it was too fast on my 386/33, and (2) the display was boring.
The line "BEEP 10 2" in my version takes of the first problem.
My version solves the second by displaying the solid bar six blocks
(the equivalent of 10%) at a time. Even more interesting would be to
build the solid bar and display it one character at a time.
set i=0
sel len=%@len[%solidbar]
:loop
set i=%@eval[%i + 1]
SCRPUT 8 %@eval[3+%i] %@substr[%solidbar,%i,1]
if %i lt len goto loop
MS>SETDOS /s10:100
SW> Thanks for messing up my cursor :).
My sentiments exactly.
SW>Origin:... Regina, Sask.
My birthplace! I left at the age of six months and never went back
except to visit my aunt and uncle, Dorothy and Larry Maier.
-- SPEED 1.10 [NR]:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/11/1992
To: RALPH SIMS Num: 79 Date: 11/09/1992
From: DAVE M. WALKER Re: Time: 8:44 am
Subj: un-julian wanted Prvt: N Read: N
RS>I now have a julian routine embedded in numerous BTM files, but
RS>came across a need to un-julian a date, i.e. return the actual
RS>month and day of the Julian date.
RS>Any takers?
No prob...
echo %@makedate[%@eval[%@date[1-1-%@substr[%_date,1,-2]]+%tjd]]
...where %tjd is your julian date. If your date is formatted with the
year first (ie. 92-11-10), change that to read:
echo %@makedate[%@eval[%@date[%@substr[%_date,1,-2]-1-1]+%tjd]]
* SLMR 2.1 * An optimist is a guy without much experience
--- Maximus 2.01wb
* Origin: The Southern Star - 5 Lines - HST/V32b - 504-885-5928 - (1:396/1)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/12/1992
To: MAYNARD HOGG Num: 125 Date: 11/09/1992
From: DAYTON LIVINGSTON Re: Time: 11:09 am
Subj: For Loops Prvt: N Read: N
MH> Did you know that 4DOS allows you to change the value of the
MH> loop variable within a FOR loop? Try the following:
MH> for %x in (*.*) (set x=%@name[%x]^dir/k/m %x.*^echo....)
MH> I'm sure someone out there will have a use for this bit of arcana.
No, I didn't know that. And yeah, I can already see how that
might come in handy - as a conditional exit for example.
Maybe we should change the name of this conference to 4ARCANA?
(Grin)
- Dayton
* OLX 994 * It ain't over till the FAT table sings...
--- Maximus 2.00
* Origin: T.V. BBS - Glendale, AZ - (602) 930-8542 (1:114/148)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/12/1992
To: MARK STIEBEL Num: 121 Date: 11/09/1992
From: DAYTON LIVINGSTON Re: Time: 11:09 am
Subj: Space.Btm Prvt: N Read: N
MS> Hi all you fellow 4DOS dudes..
Hello fellow 4DOS dude!
MS> SPACE.BTM shows the total, free and used space and
MS> percentages of a drive, and draws a usage graph as well. It
MS> might take a few seconds the first time you run it on a
MS> certain drive while 4DOS logs that drive, but such is life.
Pretty neat! However, a couple of suggestions... When you
submit things like this over the echo, it's a GOOD idea to format
them accordingly. I recieved these lines:
MS> SCRPUT 6 34 whi on bla - %@DISKFREE[%drive,M] Mbytes
MS> SCRPUT 4 48 whi on bla - 100`%`
MS> SCRPUT 5 48 whi on bla -
MS> %@INT[%@EVAL[(%@DISKUSED[%drive,b]/%@DISKTOTAL[%drive,b])*10
MS> ]]`%`
MS> SCRPUT 6 48 whi on bla -
MS> %@INT[%@EVAL[(%@DISKFREE[%drive,b]/%@DISKTOTAL[%drive,b])*10
MS> ]]`%`
which naturally didn't work too well! They'd have been easier
for me to figure out if they were formatted like:
SCRPUT 6 34 whi on bla - %@DISKFREE[%drive,M] Mbytes
SCRPUT 4 48 whi on bla - 100`%`
SCRPUT 5 48 whi on bla - %@INT[%@EVAL[(%@DISKUSED...
...[%drive,b]/%@DISKTOTAL[%drive,b])*100]]`%`
SCRPUT 6 48 whi on bla - %@INT[%@EVAL[(%@DISKFREE...
...[%drive,b]/%@DISKTOTAL[%drive,b])*100]]`%`
MS> :: Draw the usage bar. If anyone can find a quicker way
MS> :: (preferably instantaeous) way to do this, can you please
MS> :: give me a buzz.
As for speeding it up... I couldn't make it instantaneous, but I
think you'll agree that it's significantly faster to use %@SUBSTR
in the following manner (long lines split at the three dots, and
your high-ASCII characters substituted for "*" and "-" so we
don't get yelled at by the echo moderator):
YOURS (the "build & loop" approach):
:Bar
IFF %x gt %c THEN SCRPUT 8 %c bri whi on bla *
ELSE IFF %x le %c THEN SCRPUT 8 %c bri whi on bla -
ENDIFF
Set c=%@EVAL[%c +1]
IF %c lt 63 GOTO Bar
MINE (the "skwew it and do it" approach):
SET b=%@SUBSTR[******************************************...
...*****************,0,%@EVAL[%x-4]]
SET b=%b%%@SUBSTR[---------------------------------------...
...--------------------,%@EVAL[%x-4],59]
SCRPUT 8 4 BRI WHI ON BLA %b ^ UNSET b
(Of course, you'll want to substiture nice high-ASCII characters
in place of the "*" and "-" I'm using here!)
I can't say my solution is perfect, I've done very little testing
(only two drives), but it matched up with yours on what little
testing I did, and it's much faster. By the way, I just did a
little more testing... On the bar graph, when a disk is 100%
full (0 bytes free), it still leaves two blanks at the end.
Didn't want to mess with it, but thought you should know. That's
on my RAMDrive. I think it might be because it's reading the
bytes in the files, rather than the bytes actually allocated or
something? I fixed it on my copy by deleting the ",59" and two
of the "-"'s from my seconf SUBSTR line and increasing the SCRPUT
to "8 5". Makes the display a little nicer too (IMHO).
Anyway...
Thanks for another neat little utility!
- Dayton
* OLX 994 * Maintenance release = written by the janitor?
--- Maximus 2.00
* Origin: T.V. BBS - Glendale, AZ - (602) 930-8542 (1:114/148)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/14/1992
To: YOUSUF KHAN Num: 115 Date: 11/11/1992
From: MAYNARD HOGG Re: Time: 11:37 am
Subj: Daylight Savings Prvt: N Read: N
MH>Such loops are not necessary. Once you know what day the last day
>of October is, you can CALCULATE the date of the last Sunday.
YK>True, but that would involve a bunch of "IFF ... THEN ... ELSE[IFF]
>... ENDIFF" statements, this one does it only FOR statements.
MH>Huh? When I said calculate, I meant a single-line calculation of
>the form.
>(Code for the function DOW have already appeared in this echo.)
^^^^^^^^^^^^^^^^^^^^^^^^^
> set sunday=31-%@dow[10-31-%substr[%_date,6,2]]
^^^^^
YK>Since when was there ever a %@DOW[...] function? I was looking for
>just such a function, but I never found it mentioned in the manual
>or the 4dos help file.
Ever since someone wrote one and posted it in this echo. If you wish
to participate in this echo, please LEARN TO READ.
In case you missed, here is my DOW.BTM posted again for the second
time this month. Can you find the key three lines? (Hint: one of them
is a QUIT. <g>)
:@(#)calculates Day of Week
setlocal
unalias set echo
set d=%1
set m=%2
set y=%3
if /%y/==// set y=19%@substr[%_date,6,2]
if /%m/==// set m=%@substr[%_date,0,2]
if %y ge 0 .and. %y le 99 set y=19%y
if %m lt 1 .or. %m gt 12 (echo Invalid month (%m)^goto help)
if %d lt 1 .or. %d gt 31 (echo Invalid day (%d)^goto help)
if %y lt 1600 (echo Invalid year (%y)^goto help)
if %m lt 3 (set y=%@eval[%y-1] ^set m=%@eval[%m+12])
set d=%@int[%@eval[(13*%m+8)/5+%d]]
set
y=%@eval[%y+%@int[%@eval[%y/4]]-%@int[%@eval[%y/100]]+%@int[%@eval[%y/400]]
quit %@eval[(%y+%d)%%7]
:help
echo.^echo Usage: %%@name[%%0] day [ month [year]]
echo if %%? le 6 *echo
%%@substr[SunMonTueWedThuFriSat,%%@eval[3*%
echo.^echo Notes:
echo * "month" and "year" default to current month and year.
echo * "year" is automatically prefixed with 19 if necessary.
echo * On error, returns 255.
quit 255
-- sleep zzzz zzzz:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/14/1992
To: SAUL LEVY Num: 117 Date: 11/11/1992
From: MAYNARD HOGG Re: Time: 11:37 am
Subj: Disktot.Btm Prvt: N Read: N
On 11-08-92, you wrote TOM HALL re: DISKTOT.BTM
SL>Adding commas to a .BTM output is a mess!
It wasn't as easy as I thought it was going to be.
SL>The way I see it now (not having done it yet!) is to split up each
>number into three digits, add a comma after each and continue to
>the end.
The trick is handling the extra with the modulo operator (%%).
SL>It's a little worse than that as you'd have to handle numbers from
>0 to 999999999!
The upper limit for the method below is the length of environment
variables--over a hundred digits even for that other command
processor (the one without %@substr[]).
setlocal
for %x in (123456 1234567 123456789012345678901234567890) (
echo %x to...
gosub comma
echo %x
)
quit
:comma
set len=%@len[%x]
set n=%@eval[%len %% 3]
if %n eq 0 set n=3
set out=%@substr[%x,0,%n]
:loop_comma
::echo ...%out
if %n ge %@len[%x] (set x=%out^return)
set out=%out,%@substr[%x,%n,3]
set n=%@eval[%n + 3]
goto loop_comma
-- sleep zzzz zzzz:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/14/1992
To: ALL Num: 136 Date: 11/10/1992
From: JASEN BETTS Re: Time: 6:31 am
Subj: Keystack Problem Prvt: N Read: N
I cant get keystack to send sancode=1,asciicode=27 (IE the escape key)
Keystack @1 does scancode=1
Keystack 27 does asciicode=27
But there's no way to do both in the same key-buffer entry
has anyone managed to do this?
BTW:
Here's a little util which shows the contents on the keybooard buffer.
begin 644 bios.com
M!C/`CL"T$LT6M``F.@87!'45)H`V%P2`M!+-%K0`)CH&%P1U`K00!U!84,T6
M/"!T$8;@Z!$`M`ZP#<T0L`K-$.OGN`!,S2%0Z`,`6(;@4%&Q!-+H6>@#`%@D
M#P20)Q1`)[0.S1##8GD@4F]B97)T($PN($AU;6UE;"`M("AC*2`Q.3@W(%II
59F8@0V]M;75N:6-A=&EO;G,@0V\N
`
end
--- Maximus 2.01wb
* Origin: Mirth Control Chch, NZ 64-3-3890898 v32b/v42b/FAX (3:770/140)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/14/1992
To: ALL Num: 103 Date: 11/11/1992
From: SCOTT WUNSCH Re: Time: 1:54 pm
Subj: SHELL.BTM... version 2.00 Prvt: N Read: N
Remember that SHELL.BTM that was originally posted by Mark Stiebel?
Well, I think I have improved it. By using aliases to implement its
ON, OFF and END commands, it no longer has to do very much with the
commands you enter. Hopefully this will allow things like variable
functions and multiple commands (^) to work properly. Anyhow, here it
is...
_______O_/___________________| Cut |___________________\_O_______
O \ | Here! | / O
@ECHO OFF
: * * * * * * * * * * [ SHELL.BTM v2.00 ] * * * * * * * * *
: * 4DOS Prompt Shell Batch File *
: * *
: * Originally by Mark Stiebel (3:633/159) -- 05/10/92 *
: * Revised by Scott Wunsch (1:140/23) -- 11-Nov-92 *
: * *
: * Description: SHELL.BTM will keep looping, updating *
: * the prompt every second or so. *
: * Commands and aliases are entered as *
: * usual, and are added to the command *
: * history. *
: * *
: * Commands while in SHELL.BTM: *
: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
: * ON - Turn the Status Line ON *
: * OFF - Turn the Status Line OFF *
: * END - Quit SHELL.BTM *
: * *
: * Anything else will run as it would *
: * from a normal 4DOS command line. *
: * *
: * New Features: *
: * ~~~~~~~~~~~~~~~ *
: * Handles multi-command lines (using "^") and other *
: * embedded commands the previous version would choke *
: * on. Special commands now implemented through *
: * aliases.
: * *
: * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SETLOCAL
Set _SL=1
Set _FL=0
Set _ST=%@EVAL[%_ST+1]
SET CursorStyle=100:1
ALIAS ON=SET _SL=1
ALIAS OFF=SET _SL=0
ALIAS END=SET _GOOD=BYE
:MainLoop
Set _cmd=%@CHAR[32]
if %_CWDS == %cudir goto nochange
set cudir=%_CWDS
pushd
:nochange
IF '%_SL' == '0' GOTO NoStat
Setdos /s0:0
IFF %@DISKFREE[%_DISK:,M] LT 1 THEN^SET _CLR1=%@CHAR[27][0;31;46m^...
...ELSE^SET _CLR1=%@CHAR[27][34m^ENDIFF
IFF %@DOSMEM[k] LT 400 THEN^SET _CLR2=%@CHAR[27][0;31;46m^ELSE^SET...
... _CLR2=%@CHAR[27][34m^ENDIFF
IFF %@EMS[K] LT 500 THEN^SET _CLR3=%@CHAR[27][0;31;46m^ELSE^SET ...
..._CLR3=%@CHAR[27][34m^ENDIFF
IFF %_SHELL GT 0 THEN^SET _CLR4=%@CHAR[27][0;31;46m^ELSE^SET ...
..._CLR4=%@CHAR[27][34m^ENDIFF
IFF %_ST GT 1 THEN^SET _CLR5=%@CHAR[27][0;31;46m^ELSE^SET _CLR5=...
...%@CHAR[27][34m^ENDIFF
echos %@CHAR[27][s%@CHAR[27][H%@CHAR[27][1;30;46m%@CHAR[27][K
echos %@CHAR[27][1;30m[%@CHAR[27][34m%@SUBSTR[%_DATE,0,2]/
echos %@SUBSTR[%@LINE[D:\BATCH\MONTHS.DAT,%@EVAL[%@SUBSTR[%_DATE,...
...3,2]-1]],0,3]
echos %@CHAR[27][1;30m][%@CHAR[27][34m%_TIME%%@CHAR[27][1;30m][
echos %_DISK:%_CLR1%@DISKFREE[%_DISK:,K]Kb%@CHAR[27][1;30m][Mem:%_CLR2%
echos %@DOSMEM[K]Kb%@CHAR[27][1;30m][EMS:%_CLR3%%@EMS[K]Kb
echos %@CHAR[27][1;30m][Extended:%@CHAR[27][34m%@EXTENDED[K]Kb
echos %@CHAR[27][1;30m][Shell:%_CLR4%%_SHELL%%@CHAR[27][1;30m/%_CLR5%
echos %@EVAL[%_ST-1]%@CHAR[27][1;30m]
IF %_DISK == A ECHOS %@CHAR[27][0;37m
IF %_DISK == B ECHOS %@CHAR[27][0;32m
IF %_DISK == C ECHOS %@CHAR[27][0;35m
IF %_DISK == D ECHOS %@CHAR[27][0;36m
IF %_DISK == E ECHOS %@CHAR[27][0;33m
IF %_DISK == F ECHOS %@CHAR[27][0;1;30m
echos %@CHAR[27][%_ROWS;1H%_CWDS%%@CHAR[27][1;33m`| >`
SETDOS /S100:1
GOTO SubLoop
:SubLoop
IF '%_SL' == '0' GOTO NoStat
Setdos /s0:0
echos %@CHAR[27][s%@CHAR[27][H%@CHAR[27][1;30;46m%@CHAR[27][1;30m[
echos %@CHAR[27][34m%@SUBSTR[%_DATE,0,2]/
echos %@SUBSTR[%@LINE[D:\BATCH\MONTHS.DAT,%@EVAL[%@SUBSTR[%_DATE,...
...3,2]-1]],0,3]
echos %@CHAR[27][1;30m][%@CHAR[27][34m%_TIME%%@CHAR[27][1;30m]
echos %@CHAR[27][u%@CHAR[27][0;1;33m
IF %_FL == 0 (ECHOS %@CHAR[27][3D`|\>`%@CHAR[27][33m ^ SET _FL=1)
IF %_FL == 1 (ECHOS %@CHAR[27][3D`||>`%@CHAR[27][33m ^ SET _FL=2)
IF %_FL == 2 (ECHOS %@CHAR[27][3D`|/>`%@CHAR[27][33m ^ SET _FL=3)
IF %_FL == 3 (ECHOS %@CHAR[27][3D`|->`%@CHAR[27][34m ^ SET _FL=0)
SETDOS /S%CursorStyle
GOTO IP
:NoStat
IF %_DISK == A ECHOS %@CHAR[27][0;37m
IF %_DISK == B ECHOS %@CHAR[27][0;32m
IF %_DISK == C ECHOS %@CHAR[27][0;35m
IF %_DISK == D ECHOS %@CHAR[27][0;36m
IF %_DISK == E ECHOS %@CHAR[27][0;33m
IF %_DISK == F ECHOS %@CHAR[27][0;1;30m
ECHOS %@CHAR[27][%_ROWS;1H%_CWDS%%@CHAR[27][1;33m`|`
echos %@CHAR[240]`>`%@CHAR[27][34m
:IP
INPUT /w0 %%_cmd
:Execute
History /A %_cmd
CALL %_cmd
IF "%_GOOD" == "BYE" (SET _ST=%@EVAL[%_ST-1]^UNSET _GOOD^ENDLOCAL^QUIT)
IF "%@READSCR[0,0,1]" == "[" GOTO SubLoop
GOTO MainLoop
:NoHist
CALL %@SUBSTR[%_cmd,1]
GOTO MainLoop
_______O_/___________________| Cut |___________________\_O_______
O \ | Here! | / O
That's it!
/\ LLAP...
> \ cott \\'unsch <
\/
... Oh give me a phone, with a modem on loan...
--- GEcho 1.00/beta+
* Origin: Polestar * Regina, Sask. USR V42.b (1:140/10.0)
>> Message length exceeded, split by WILDMAIL! v2.04 <<
>> Continued in next message <<
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/14/1992
To: YALL Num: 98 Date: 11/10/1992
From: MAYNARD HOGG Re: Time: 1:26 pm
Subj: Space.Btm Prvt: N Read: N
Here are the changes for printing out the solid bar one character at a
time. The rough musings that I posted yesterday were off the top of my
head, so had lots of sawdust. <g>
BTW, on my 486/33, this version takes four times as long as the
version that I posted with the delay disabled.
set dt=%@disktotal[%drive,b]
set du=%@diskused[%drive,b]/%dt
set x=%@int[%@eval[%du*60 + 0.5]]
set du=%@int[%@eval[%du*100 + 0.5]]
::100% special case--don't print 60th block
if %x ge 60 set x=59
if %du ge 100 set du=100
scrput 5 48 %wob - %du`%`
::build bar
set outc=%@char[177]
::six blocks for each 10% on scale
set outc=%outc%%outc%%outc%%outc%%outc%%@char[179]
:bar10
set outc=%outc%%outc%
if %@len[%outc] lt %x goto bar10
set outc=%@substr[%outc,0,%x]
::print bar one block at a time
set i=0
:bar20
scrput 8 %@eval[4+%i] %bwob %@substr[%outc,%i,1]
::delay 2 ticks
::beep 10 2
set i=%@eval[%i + 1]
if %i lt %x goto bar20
* SLEEP 0.00 [ZZ] * I tried BASIC once, but I didn't inhale.
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/14/1992
To: RALPH SIMS Num: 112 Date: 11/11/1992
From: MAYNARD HOGG Re: Time: 6:20 am
Subj: Un-Julian Wanted Prvt: N Read: N
RS>I now have a julian routine embedded in numerous BTM files, but
>came across a need to un-julian a date, i.e. return the actual
>month and day of the Julian date.
If %jd is the julian date: (tested!)
echo %@makedate[%@eval[%@date[1-1-%@substr[%_date,6,2]] + %jd -1]]
-- SLEEP 0.00 [ZZ]:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/14/1992
To: JASEN BETTS Num: 95 Date: 11/08/1992
From: HUGO LANDSMAN Re: Time: 10:06 pm
Subj: Touching file in 4dos?? Prvt: N Read: N
Hi Jasen,
22 Oct 1992 03:26, Jasen Betts (3:770/140) wrote to Gregory P. Smith:
JB> The alias for a msdos version of touch is... (get ready to spew)
JB> alias touch for x in (%%&) do command /c copy %%x+,,
You've been sleeping? ;-) The alias for 4DOS is: for x in (%&) copy/b %x+nul
--- FastEcho 1.21/b4
* Origin: st. anna: just showing off with fastecho 1.21/b4 :-)
(2:512/154.5)
To: Michelangelo Jones Message #: 10604
From: Maynard Hogg Submitted: 12 Nov 92 12:49:00
Subject: Exe Pick Lists Status: Public
Received: No Group: 4DOS (89)
MSGID: 6:730/9 9f0cd930
PID: GE 1/b21
On 11-09-92, you wrote REX CONN re: 4DOS Wish List/Enhancements
MJ>Something in %@functions approximating the FindFirst/FindNext DOS
>functions, but with 4DOS wildcards? Usage: something approximating
>EX*.EXE[Tab][Return] in a batch file?
What exactly is it that you are trying to do? Have you tried something
like the following? (I hadn't. Surprise! Another off-the-wall idea of
mine that works!)
SELECT/otr (ex*.exe)
^^^^ ^ ^ ^^^^^^^^
(1) (2) (3)
(1) Whatever order you like.
(2) These must be parentheses, not brackets.
(3) Alas, no command line parameters. (You'll have to select from BTM
wrappers instead. <g>)
-- beggarware sux :
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
=-=-=-=-=
To: Phi Nguyen Message #: 11615 1932 <Thread
From: George Worley Submitted: 12 Nov 92 09:10:00
Subject: Loading alias Status: Public
Received: No Group: 4DOS (89)
-=> Quoting Phi Nguyen to George Worley on 05 Nov 92 05:02:00 <=-
Hi Phi Nguyen,
GW>Except it would not work. The correct command should be:
GW>ALIAS AE=x:\path\EDIT x:\path\ALIAS.LST^(ALIAS /R x:\path\ALIAS.LST)
GW>Without proper grouping your alias file would not be read.
PN> edita keystack Alt-V Alt-P "X" Esc
PN> ^write c:\4\aliases^unalias *
PN> ^alias /r c:\4\aliases
That seems like too much work or I should say too much alias space to me,
mine on the other hand calles the alias EDIT which can be used by other
things. I use VDE as that I can have this all ready put into one of the
default options for the particalar file type. And, if you do it the way I
have done it you do need the grouping. Also if I am only goning to add 1
alias to it I have another command for that:
alias=*alias %&^if "%&" ne "" (*alias > c:\4dos\alias)
This is sort and sweet - nothing fancy but it gets the job done.
George
... Everyone wants to be noticed, but no one wants to be watched...
--- Blue Wave/Opus v2.11c Beta
* Origin: PIC of the MID Town BBS (713) 527-8939 (1:106/31.0)
=-=-=-=-=
To: all Message #: 10599
From: Neal Jackson Submitted: 11 Nov 92 19:32:00
Subject: onceaweek Status: Public
Received: No Group: 4DOS (89)
MSGID: 1:104/717.2 2b015ff7
Hello all!
Is there a way to add the %_dow[sun] variable to the Onceaday.btm
to make it run my files backup btm every Sunday when I boot up?
I am running Speedisk, Timeset and Chkdsk daily with this btm.
Will it accommodate a weekly call or would a Onceweek.btm be required?
Here is Onceaday.btm :
---------------------------------------------------------------------------
: ONCEADAY.BTM
setlocal
set lastdate=0
iff exist %_boot:\onceaday.dat then
set lastdate=%@line[%_boot:\onceaday.dat,0]
endiff
iff %@date[%_date] gt %lastdate then
iff %time[%_time] gt %@time[06:00] then
call %&
echo %@date[%_date] >! %_boot:\onceaday.dat
endiff
endiff
---------------------------------------------------------------------------
Thanks.
Neal
--- GoldED 2.40.P0720
* Origin: Redrum (1:104/717.2)
=-=-=-=-=
To: Mark Stiebel Message #: 10583 7182 <Thread> 10584
From: Michael Jerkovic Submitted: 06 Nov 92 20:25:00
Subject: SPACE.BTM Status: Public
Received: No Group: 4DOS (89)
MSGID: 3:634/387 2afad4a0
:Hi Mark
:I found your space.btm enough inspiration to cook this up.
:It has a few extra display features;
:1. Almost instant bar graph (as requested).
:2. The ability to display two or more graphs on the same screen.
:
:All are welcome to use, hack, and destroy to their delight.
:Michael Jerkovic (Melb/Aust)
:
:Note the line starting with "if not %u_int==0" is split over two lines.
:
:\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
@echo off
setlocal
:: Validate Input
set dsk=%@upper[%@substr[%1,0,1]]:
iff "%dsk"==":" then
set dsk=%_disk:
elseiff %@ready[%dsk]==0 then goto usage
endiff
:: Screen Handling
:: This allow use to set up a alias to show two or more drive, depending
:: on how many lines you have your screen set up for.
:: Example: alias spacd=cls^for %a in (c d) space %a
:: (this will work on a 25 line screen.)
:: Note: The screen handling slows down space.btm a bit, if you have
:: no need for screen handling, then rewrite with hardcoded row numbers.
set row=%_row
if %row gt %@eval[%_rows-11] (cls^set row=0)
set drow=%@eval[%row+2]
set trow=%@eval[%row+4]
set urow=%@eval[%row+5]
set frow=%@eval[%row+6]
set brow=%@eval[%row+8]
set fin=%@eval[%row+10]
:: Disk usage in %
:: Note 1: that 1 byte is added to the total of disk used.
:: This avoids error caused by running space on an empty drive.
:: Note 2: The ratio has an error of +-0.01%
set ratio=%@eval[(%@diskused[%dsk,b]+1)/%@disktotal[%dsk,b]]
set up=%@eval[%@int[%@eval[%ratio*10000]]/100]
set fp=%@eval[100-%up]
:: Display Bar calculation
:: I have used a 50 char bar. If you change the template, "50"
:: should be changed to the length of the new bar.
set u_no=%@eval[%ratio*50]
set u_int=%@int[%u_no]
if %u_int ne 0 .and. %@eval[%u_no-%u_int] ge .5 set u_int=%@eval[%u_int+1]
:: Use a template for the layout
screen %row 0
text
╔═════════════════════════╤══════════════════════════╗
║ Statistics for drive │ SPACE.BTM ║
╟─────────────────────────┴──────────────────────────║
║ Total : 100% ║
║ Used : ║
║ Free : ║
╟────────────────────────────────────────────────────╢
║ .................................................. ║
╚════════════════════════════════════════════════════╝
endtext
:: Stuff the screens face
if not %u_int==0 scrput %brow 14 bri whi on %_bg %@substr[
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓,0,%u_int]
scrput %drow 35 bri whi on %_bg %dsk
screen %trow 26 %@disktotal[%dsk,K]K
screen %urow 26 %@diskused[%dsk,K]K
screen %frow 26 %@diskfree[%dsk,K]K
screen %trow 39 %@disktotal[%dsk,M]M
screen %urow 39 %@diskused[%dsk,M]M
screen %frow 39 %@diskfree[%dsk,M]M
screen %urow 53 %up%%%
screen %frow 53 %fp%%%
screen %fin 0
endlocal
quit
:usage
if %dsk==A: .or. %dsk==B: (beep^echo Drive %dsk is not ready.)
echo Usage: SPACE [drive]
echo The default drive is current the drive.
endlocal
:\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
--- TMail v1.25
* Origin: Dr Blaze, the Turbo Pascal Repairman. (3:634/387)
=-=-=-=-=
To: Scott Wunsch Message #: 10602 10586 <Thread> 10608
From: Maynard Hogg Submitted: 12 Nov 92 12:49:00
Subject: Space.Btm Status: Public
Received: No Group: 4DOS (89)
MSGID: 6:730/9 9f0cd92e
PID: GE 1/b21
MH>What does STRING$ do?
SW>STRING$ takes two parameters: the number of repetitions, and the
>character to repeat.
>SET LONGLINE=%@REPEAT[#,100]
>...which would produce a row of 100 # signs. <g>
That's easy enough to simulate: (Note that the function is
logarithmic, not linear with regard to the length parameter. It could
also use some error checking.)
setlocal
for %arg2 in (25 50 100) (
set arg1=#
timer on
gosub string
timer
echo %arg1
)
quit
:string
set arg1=%arg1%%arg1%
if %arg2 gt %@len[%arg1] goto string
set arg1=%@substr[%arg1,0,%arg2]
return
But, yes, a built-in function would be much faster.
-- beggarware sux :
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
=-=-=-=-=
To: Mark Stiebel Message #: 13332 11618 <Thread
From: Bill-Steven Kerr Submitted: 09 Nov 92 19:15:00
Subject: SPACE.BTM Status: Public
Received: No Group: 4DOS (89)
MSGID: 2:259/27.5@Fido 9d132281
Hi Mark, here's a little sysinfo batch file I use. The bars are dead quick!
--------------- chop here -----------------
@ECHO OFF
:: Sysinfo.btm by Steven Kerr '92
:: Email - Fido : 2:259/27.5
:: - Usenet : bill-steven.kerr@almac.co.uk
::
SETLOCAL
CLS
SCREEN 19 0
:: //
DRAWBOX 2 0 18 79 0 BRI BLA ON WHI FILL WHI
SCRPUT 18 1 BRI BLA ON WHI ▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
SCRPUT 2 1 BRI WHI ON WHI ▀▀▀▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
SCRPUT 2 78 BRI BLA ON WHI ▀
DRAWVLINE 2 0 17 0 BRI WHI ON WHI
SCRPUT 18 1 BRI WHI ON WHI ▄
:: //
DRAWBOX 4 2 16 37 0 RED ON WHI FILL RED
DRAWHLINE 3 2 11 0 RED ON WHI
DRAWHLINE 17 4 35 0 BRI BLA ON WHI
DRAWVLINE 5 38 13 0 BRI BLA ON WHI
DRAWVLINE 5 39 13 0 BRI BLA ON WHI
:: //
DRAWBOX 4 42 8 75 0 BLU ON WHI FILL BLU
DRAWHLINE 3 42 11 0 BLU ON WHI
DRAWHLINE 9 44 34 0 BRI BLA ON WHI
DRAWVLINE 5 76 5 0 BRI BLA ON WHI
DRAWVLINE 5 77 5 0 BRI BLA ON WHI
:: //
DRAWBOX 12 42 16 75 0 MAG ON WHI FILL MAG
DRAWHLINE 11 42 11 0 MAG ON WHI
DRAWHLINE 17 44 34 0 BRI BLA ON WHI
DRAWVLINE 13 76 5 0 BRI BLA ON WHI
DRAWVLINE 13 77 5 0 BRI BLA ON WHI
:: //
SCRPUT 3 4 BRI WHI ON RED GENERAL
SCRPUT 3 44 BRI WHI ON BLU DISK C:
SCRPUT 11 44 BRI WHI ON MAG DISK D:
:: //
SCRPUT 5 4 BRI WHI ON RED 4DOS Version No. : %_4ver
SCRPUT 6 4 BRI WHI ON RED DOS Version No. : %_dosver
SCRPUT 7 4 BRI WHI ON RED Alias Free : %_alias b
SCRPUT 8 4 BRI WHI ON RED Environment Free : %_env b
SCRPUT 9 4 BRI WHI ON RED System Time : %_time
SCRPUT 10 4 BRI WHI ON RED System Date : %_date
SCRPUT 11 4 BRI WHI ON RED Day of the week : %_dow
SCRPUT 12 4 BRI WHI ON RED Monitor Type : %_monitor
SCRPUT 13 4 BRI WHI ON RED Video Card : %@UPPER[%_video]
IFF "%_NDP"=="387" .AND. "%_CPU"=="486" THEN
SCRPUT 14 4 BRI WHI ON RED Maths Copro. : 487
ELSE
SCRPUT 14 4 BRI WHI ON RED Maths Copro. : %_ndp
ENDIFF
SCRPUT 15 4 BRI WHI ON RED Shell level : %_shell
:: //
SCRPUT 5 44 BLA ON BLU ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
SCRPUT 13 44 BLA ON MAG ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
SCRPUT 7 44 BRI WHI ON BLU Used : %@diskused[c:,M] of %@disktotal[c:,M] Mb
SCRPUT 15 44 BRI WHI ON MAG Used : %@diskused[d:,M] of %@disktotal[d:,M] Mb
:: Join up the four lines below..
DRAWHLINE 5 44 %@INT[%@EVAL[(%@INT[%@EVAL[(%@DISKUSED[C:]/
%@DISKTOTAL[C:])*100]]/10)*3]] 0 WHI ON WHI
DRAWHLINE 13 44 %@INT[%@EVAL[(%@INT[%@EVAL[(%@DISKUSED[D:]/
%@DISKTOTAL[D:])*100]]/10)*3]] 0 WHI ON WHI
SCRPUT 5 45 BRI WHI ON WHI %@INT[%@EVAL[(%@DISKUSED[C:]/
%@DISKTOTAL[C:])*100]]%
SCRPUT 13 45 BRI WHI ON WHI %@INT[%@EVAL[(%@DISKUSED[D:]/
%@DISKTOTAL[D:])*100]]%
SCRPUT 5 47 BRI WHI ON WHI `%`
SCRPUT 13 47 BRI WHI ON WHI `%`
:: //
:EXIT
SCREEN 19 0
ENDLOCAL
---------- chop here ---------------
Have fun!
Steven.
Fidonet : 2:259/27.5
Usenet : bill-steven.kerr@almac.co.uk
--- FMail 0.90
* Origin: Bill-Steven Kerr, Mid Calder, SCOTLAND (2:259/27.5)
=-=-=-=-=
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/16/1992
To: ALL Num: 33 Date: 11/12/1992
From: SAUL LEVY Re: Time: 4:02 am
Subj: DISKTOTP.BTM Prvt: N Read: N
All,
Here is DiskTOT-Plus, a little utility based on DISKTOT.BTM version 1.1
and DISKLEFT.EXE version 2.3 by Paul Munoz-Colman (DISKLF23.ZIP, 28K).
DISKLEFT can give the total disk, free and used capacities for all of
your drives, but I prefer the order shown below and to also have
percentages.
So I rewrote the following batch file (note the way that the three long
lines were handled):
============================== CUT HERE ================================
@echo off
rem DISKTOTP.BTM by Saul Levy, Tucson, Arizona, 11/9/92, version 1.0
rem Change drive list, descriptions and description output for your
rem system!
rem Also, for different formatting, change %blanks string and %blanks
rem string-output lengths to suit
rem This version handles values up to 999,999,999 and percentages from 0
rem to 100 (the latter are rounded up to the next higher % as needed)
setlocal
rem Nice title and a plug for the programmer!
cls bright white on blue
drawbox 0 31 2 46 2 red on green fill green shadow
scrput 1 33 bright white on magenta DiskTOT-Plus
scrput 3 35 bright white on black by Saul Levy
rem Skip over title
echo.
echo.
echo.
echo.
echo.
rem Main routine
set blanks=` `
gosub getdes
echos `Drive Total Used % Free % Drive `
echo `Description`
echos `===============================================================`
echo `================`
color bright green on blue
for %a in (C: D: E: F: G: H:) do gosub getnums
color bright white on blue
echos `===============================================================`
echo `================`
set dutp=%@int[%@eval[%dut/%dtt*100+.5]]
set dftp=%@int[%@eval[%dft/%dtt*100+.5]]
set dum=%dtt
gosub fill9
echos Total %dum1%%dum2%%dum3%
set dum=%dut
gosub fill9
echos %dum1%%dum2%%dum3%
echos %@substr[%blanks,0,%@eval[3-%@len[%dutp]]] %dutp
set dum=%dft
gosub fill9
echos %dum1%%dum2%%dum3%
echo %@substr[%blanks,0,%@eval[3-%@len[%dftp]]] %dftp
color white on blue
endlocal
quit
rem Subroutine to get data about drives (blank-fill to nine digits)
:getnums
set dt=%@disktotal[%a]
set du=%@diskused[%a]
set dup=%@int[%@eval[%du/%dt*100+.5]]
set df=%@diskfree[%a]
set dfp=%@int[%@eval[%df/%dt*100+.5]]
set dtt=%@eval[%dtt+%dt]
set dut=%@eval[%dut+%du]
set dft=%@eval[%dft+%df]
set dum=%dt
gosub fill9
echos %a %dum1%%dum2%%dum3%
set dum=%du
gosub fill9
echos %dum1%%dum2%%dum3%
echos %@substr[%blanks,0,%@eval[3-%@len[%dup]]] %dup
set dum=%df
gosub fill9
echos %dum1%%dum2%%dum3%
echos %@substr[%blanks,0,%@eval[3-%@len[%dfp]]] %dfp
rem Output drive descriptions
if %a=A: echo %@substr[%blanks,0,1] %driveA
if %a=B: echo %@substr[%blanks,0,1] %driveB
if %a=C: echo %@substr[%blanks,0,1] %driveC
if %a=D: echo %@substr[%blanks,0,1] %driveD
if %a=E: echo %@substr[%blanks,0,1] %driveE
if %a=F: echo %@substr[%blanks,0,1] %driveF
if %a=G: echo %@substr[%blanks,0,1] %driveG
if %a=H: echo %@substr[%blanks,0,1] %driveH
return
rem Subroutine to get description of each drive
:getdes
rem |<=STAY INSIDE LINES=>|
set driveA=1.2 MB floppy
set driveB=360 K floppy
set driveC=Describe each drive here.
set driveD=Up to 26 characters each.
set driveE=Next line is blank.
set driveF=%@char[24]%@char[255]
set driveG=Plus Hardcard II XL 105
set driveH=RAM Drive
rem |<Ctrl-X><Alt-255> |
return
rem Subroutine to blank-fill values to nine digits, add comma after
rem every three digits except where all blanks
:fill9
>> Message length exceeded, split by WILDMAIL! v2.04 <<
>> Continued in next message <<
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/16/1992
To: ALL Num: 34 Date: 11/12/1992
From: SAUL LEVY Re: Time: 4:02 am
Subj: DISKTOTP.BTM Prvt: N Read: N
>> Message length exceeded, split by WILDMAIL! v2.04 <<
>> Continued from previous message <<
set dum=%@substr[%blanks,0,%@eval[9-%@len[%dum]]]%dum%
set dum1=%@substr[%dum,0,3], ^ if "%dum1"=" ," set dum1=` `
set dum2=%@substr[%dum,3,3], ^ if "%dum2"=" ," set dum2=` `
set dum3=%@substr[%dum,6,3]
return
rem End of DISKTOTP.BTM
============================== CUT HERE ================================
The environmental variables are shortened to save space:
dt is the Disk Total capacity for each drive
du is the Disk Used capacity for each drive
dup is the Disk Used divided by Disk Total percentage
df is the Disk Free capacity for each drive
dfp is the Disk Free divided by Disk Total percentage
dtt is the total (sum) of the Disk Total capacities
dut is the total (sum) of the Disk Used capacities
dft is the total (sum) of the Disk Free capacities
dutp is the total Disk Used divided by total Disk Total percentage
dftp is the total Disk Free divided by total Disk Total percentage
blanks is a blank string long enough to fill out each column for
alignment (here 8 spaces)
dum, dum1, dum2, dum3 are temporary variables used to add commas
Here is a sample output (I hope it isn't too long to pass through the
net unharmed):
Drive Total Used % Free % Drive Description
==============================================================================
C: 21,344,256 21,006,336 98 337,920 2 Describe each drive
here.
D: 21,344,256 20,469,760 96 874,496 4 Up to 26 characters
each.
E: 21,291,008 12,990,464 61 8,300,544 39 Next line is blank.
F: 21,291,008 2,172,928 10 19,118,080 90 [Nothing shows
on-screen]
G: 104,738,816 34,254,848 33 70,483,968 67 Plus Hardcard II XL 105
H: 324,096 99,328 31 224,768 69 RAM Drive
==============================================================================
Total 190,333,440 90,993,664 48 99,339,776 52
The substr[] functions left fill each value so the columns line up. The
percentages can hold from 1 to 3 digits as shown. Each percentage is
rounded up as needed. Change the substr[] functions to suit if you need
more room above 999 MB (increase the 9s). The output of DISKTOTP is
compressed to give more room for the drive descriptions.
Use redirection to save the output to a file (disktotp >filename) which
makes it easy to see how fast your drives are filling up. The colored
header is not saved (DRAWBOX and SCRPUT are screen-only functions), but
the other ANSI commands will appear in the output file (removed above).
Change the colors to your favorites, especially the last COLOR statement
just before the ENDLOCAL should give your default colors (I also use the
PROMPT to color my system). Remove the blue backgrounds if you have a
monochrome system.
Alas, DISKLEFT runs in less than 2 seconds while DISKTOT takes over 10
(with no floppy drives specified). DISKTOTP takes 19 or 28 seconds
depending on whether my new Plus Hardcard has already stored the
information in its on-board cache or not. If you have a slow computer,
use DISKTOT (you can add color as shown above). The batch files are
still much smaller than DISKLEFT.EXE.
The 'for %a...' line won't work as written if %a is replaced by %drv and
the colons left off. Change this line, the descriptions and the
description output to suit your own system.
This version adds color, a drive description of up to 26 characters
(whatever you want), and commas to the values to make them easier to
read (Note to Tom Hall: It was simple to code!). Each value is blank-
filled to nine total characters. Then the substr[] function is used to
pick off three-character groups and a comma is added to the right end of
the first two groups (%dum1 and %dum2).
You may need to increase the environment size from the default 512 bytes
(I'm using 640 which doesn't leave much!). Either use an /E:nnn in the
SHELL statement or add/modify the ENVIRONMENT = nnn statement in
4DOS.INI.
There must be some way to make the drive description output use only one
line of code for all drives! I tried various things, but need help!
There are probably other ways to shorten this batch file...
My thanks to Douglas Kitson for his support (and naming DiskTOT-Plus!).
Remember, have fun with this! ^^^^^
Saul
--- GEcho 1.00
* Origin: Old Pueblo BBS - Tucson Computer Society (1:300/2)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/17/1992
To: YALL Num: 107 Date: 11/14/1992
From: MAYNARD HOGG Re: Time: 5:04 pm
Subj: Alias: Getyn Prvt: N Read: N
Try adding the following to your aliases file (all on one line, of
course).
getyn `inkey /K"YN[ENTER]" %& (%YNS) %%YN^ \
if /%YN/==// .or. /%YN/==/%@char[13]/ set YN=%@substr[%YNS,0,1]`
Description:
INKEY wrapper that returns, via environment variable YN, the default
value, specified via environment variable YNS, when the user hits
Enter or INKEY times out.
Usage:
set YNS=Y/n
:: ^
getyn /Wx blah, blah, blah
:: ^^^wait limit for INKEY
Examples:
Here are two applications from OPTDISK.BTM, a wrapper for two disk
optimizers.
setlocal
set thisbat=%@lower[%@name[%0]]
:
:readyloop
iff %@ready[%D] == 1 then gosub doit
else (
@echo.
@echo.%thisbat: Drive %D is not ready.
@echo.
@echo.Please insert a disk, make sure
@echo.that the hard drive is operational,
@echo.or just skip.
@echo.
set YNS=N/y
getyn /W10 %thisbat: Process drive %D?
if /%yn/ == /y/ goto readyloop
)
:
:doit
set YNS=Y/n
getyn /W10 %thisbat: Process drive %D?
if /%YN/ == /N/ return
set YNS=N/y
getyn /W10 %thisbat: Process drive %D?
if /%YN/ == /y/ goto readyloop
)
:
return
* beggarware sux *
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/17/1992
To: MICHELANGELO JONES Num: 106 Date: 11/14/1992
From: MAYNARD HOGG Re: Time: 5:04 pm
Subj: Daylight Savings Prvt: N Read: N
On 11-11-92, you wrote YOUSUF KHAN
MJ>set month=%@substr[%_date,0,2]
>if %month LT 4 .OR. %month GT 10 set daylight=0
>if %month GT 4 .AND. %month LT 10 set daylight=1
>iff "%daylight" != "" then^unset month^quit^endiff
Huh? At first look, because the first two tests are mutually
exclusive, this should be marginally faster:
iff %month LT 4 .OR. %month GT 10 then set daylight=0
elseiff %month GT 4 .AND. %month LT 10 then set daylight=1
endiff
if "%daylight" != "" (unset month^quit)
Why use UNSET, when SETLOCAL is available? Because you're afraid of
losing the result in %daylight? You can fix that by changing all your
QUITs to the following
quit %daylight
If you're willing to put up with multiple return points--generally
inadvisable in structured programming, but oh so handy here--you can
simplify greatly, dealing with the easy cases first.
if %month lt 4 .or. %month gt 10 then quit 0
if %month gt 4 .and. %month lt 10 then quit 1
:
But for speed, nothing beats a lookup table:
::@(#)Returns 1 if daylight savings is in effect today
::Maynard Hogg, 11/14/91
::
setlocal
set month=%@substr[0000200000300,%@substr[%_date,0,2],1]
::Note month "0"---^ ^Apr ^Oct
if %month le 1 quit %month
::next Sunday?
::Can't use previous Sunday since 4DOS treats negative
::numbers in comparisons as strings in comparisons!
set sun=%@eval[%@substr[%_date,3,2]- \
%@index[SunMonTueWedThuFriSat,%_dow]/3 + 7]
iff %month == 2 then
echo April
if %sun ge 8 quit 1
quit 0
elseiff %month == 3 then
echo October
if %sun ge 32 quit 0
quit 1
else then
echo Shouldn't reach here!
quit 255
endiff
-- beggarware sux : Aren't you glad you use 4DOS? Don't you wish everybody?
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/17/1992
To: PHIL BEEBLE Num: 123 Date: 11/15/1992
From: MORRIS TURPIN Re: Time: 2:09 pm
Subj: Oh yeah... I forgot... Prvt: N Read: N
In a message dated Nov 14 at 00:44, Phil Beeble of 1:105/78
wrote to all:
PB> Does anyone know a way to keep the Keystack commands in their own
PB> DV window?
PB> If I got the BBS running in the background, The Keystack commands
PB> that I have at the end of the Batch File all go into the forground
PB> window..
PB> Anyone know how to keep this from happening?
I can't give you a definitive answer, Phil, but I don't have any problems
with KEYSTACK bleeding through between windows. I'm running 4DOS ver 4.01
rev d, MS-DOS 5, DV 2.40 and QEMM 6.0 in ST:M mode. In those btm files
requiring KEYSTACK I run the alias "kstack" where:
KSTACK=iff %_dv eq 1 then^c:\4dos4\kstack.com /i^else^c:\qemm\loadhi
/r:2 c:\4dos4\kstack.com^endiff (all on one line, of course)
I don't load KSTACK.COM before running DV. This way, KEYSTACK is only
loaded inside each window that needs it. If I am not in DV, (not normally
the case) KSTACK.COM is loaded high.
Another way that I have used with success is to use DGANSI outside of DV.
DGANSI provides not only the ANSI driver but replaces KSTACK.COM as well.
I stopped using DGANSI because the shared program portion, DGANSI.SHP,
slowed things down too much. Right now I use ANSI.COM loaded by my
autoexec.bat file and load DVANSI in those windows that need it along with
KSTACK where required.
Hope this helps.
--- msged 2.07
* Origin: Ansi's Escape, Echo Point -- Ottawa, Ontario (1:163/140.3)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/17/1992
To: NEAL JACKSON Num: 109 Date: 11/14/1992
From: MAYNARD HOGG Re: Time: 5:04 pm
Subj: Onceaweek Prvt: N Read: N
NJ>Is there a way to add the %_dow[sun] variable to the Onceaday.btm
>to make it run my files backup btm every Sunday when I boot up?
Why stop at Sunday? All it takes is a single line to add support for a
different batch for every day of the week: ONCE-SUN.BTM, ONCE-MON.BTM,
etc. <g>
>: ONCEADAY.BTM
>setlocal
>set lastdate=0
>iff exist %_boot:\onceaday.dat then
> set lastdate=%@line[%_boot:\onceaday.dat,0]
>endiff
>iff %@date[%_date] gt %lastdate then
> iff %time[%_time] gt %@time[06:00] then
> call %&
> echo %@date[%_date] ! %_boot:\onceaday.dat
once-%_dow
> endiff
>endiff
-- beggarware sux :
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/19/1992
To: MICHELANGELO JONES Num: 89 Date: 11/14/1992
From: HENK SIMMELINK Re: Time: 8:57 pm
Subj: 4DOS Wish List/Enhancemen Prvt: N Read: N
Hello Michelangelo!
Monday November 09 1992, Michelangelo Jones writes to Rex Conn:
MJ> 1) Change TIMER so that STOP does not do a RESET, or at least give
the
MJ> option. Example: you want to know how much time the system spends on a
MJ> certain task over a week. I would LOVE to see this one.
I like your idea, but try this:
setlocal
set date=%_date
rem Next line is just for testing purposes
rem date 11-10-92
set d1=%@date[%_date]
rem date %date
set t1=%@time[%_time]
rem Replace next line with your command...
delay 1
set d2=%@date[%_date]
set t2=%@time[%_time]
iff exist d:\time.log then
set t3=%@line[d:\time.log,0]
else
set t3=0
endiff
set t4=%@eval[(%d2-%d1)*86400]
set t5=%@eval[%t2-%t1+%t3+%t4]
echo %t5|tee d:\time.log
MJ> 2) Something in %@functions approximating the FindFirst/FindNext DOS
MJ> functions, but with 4DOS wildcards? Usage: something approximating
MJ> EX*.EXE[Tab][Return] in a batch file?
I might not understand your question completely, but is this not the "for ...
in (...) do ..." command you are asking for?
MJ> There've been times I've had to resort do doing a cls^dir and pulling
MJ> the filenames off the screen. That's clumsy indeed. Give us a better
way.
Use |%@line[con,<linenumber>]
MJ> 3) %_ANSI doesn't seem to work with ANSI.COM 1.3 from PC Mag. It
always
MJ> reads 0. (Am I doing something wrong?)
Look under SETDOS /A ....
Yours sincerely,
Henk `HeSitated' Simmelink
--- GEcho 1.00/beta+
* Origin: (2:283/4.6)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/21/1992
To: MOLLY CHIN Num: 145 Date: 11/19/1992
From: JAY CURRY Re: Time: 11:21 am
Subj: 1 MB DOC Prvt: N Read: N
-=> Quoting Molly Chin to All<=-
MC> Is there anyway I can seperate the 1 DOC file into part 1 and part 2
MC> or something like that?
I assume that you would like to view it with some type of editor. My
sugestion is to find out how large of a file your editor will handle,
take that number divide it by 80, then run the dock file through a
program like this.
------------------
:: this is a program that will split a text file into multiple text
:: files.
@echo off
if %2=`` goto command_error
if not exist %1 goto command_error
setlocal
set filecount=0
set ext=tx
set filename=%@NAME[%1]
set line_count=0
set max_line=%@lines[%1]
:top
set loc_count=0
set filecount=%@eval[%filecount+1]
:local
set line=%@line[%1,line_count]
echo line >> %filename.%ext%filecount
set loc_count=%@eval[loc_count+1]
set line_count=%@eval[line_count+1]
if line_count .ge. max_line goto done
if line_count .lt. %2 goto local
goto top
:command_error
text
the format for %0 is as follows:
%0 filename.ext nn
where filename.ext is replaced with the file name and extension
of the file that you wish to split, and nn is replaced with the
number of lines you wish to put into each of the output files.
the output file will have the same file name as the input file,
but the extension will be TXn where n is replaced with a number
from 1 through 9. if filenumber 1 is larger than your editor
can handle, gave that file a new name and re run this program on
it.
endtext
:done
---------------
Probably a faster way to look at the file in any case is to use the list
command within 4dos. especially as the program I gave requires 4dos in
order to operate correctly. If you would like to just run the list
command to view the file but do not wish to actually run 4dos as your
command interpreter yet, you could use this command:
4dos /c list 4dos.doc
you could try the program above the same way.
take care.
-Jay
... My cat has 9 lives, but my frog croaks daily!
--- FMail 0.90
* Origin: Le Cross Roads 608-788-8086 HST/DS LaCrosse, WI (1:2360/12.0)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/21/1992
To: KEITH D. CAMPBELL Num: 124 Date: 11/18/1992
From: MAYNARD HOGG Re: Time: 12:01 pm
Subj: New Btm? Prvt: N Read: N
On 11-11-92, you wrote DAYTON LIVINGSTON re: new btm?
KDC>: for each previously hidden file, rehide it
>for %file in (@\zorkjunk.h) do attrib /d /q +h %file
^
After checking the online help, I was going to say: "The only problem
is that 4DOS FOR does not allow you to take lists from a file. It sure
would be nice if it did, though. <sigh>"
I am ECSTATIC to report, however, to report that I AM WRONG. FOR does!
How often I've wished for this capability! Now I can stop resorting to
such workarounds as
awk '{system("del " $1)}' filelist
Thanks for the tip!
-- SPEED 1.10 [NR]:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/21/1992
To: ALL Num: 106 Date: 11/16/1992
From: MICHAEL JERKOVIC Re: Time: 9:21 pm
Subj: SPACE.BTM Prvt: N Read: N
I uploaded a version of space.btm about a week ago but I think it never
made it past the local BBS. Anyway I've made some fixes and here it
goes again: ...Michael...
@echo off
::SPACE.BTM Michael Jerkovic (original and inspiration by Mark Stiebel)
setlocal
alias inc `set %1=%@eval[%[%1]+%2]`
:: Validate Input
set dsk=%@upper[%@substr[%1,0,1]]:
iff "%dsk"==":" then
set dsk=%_disk:
elseiff %@ready[%dsk]==0 then goto usage
endiff
:: Disk usage in %
:: Note 1: that 1 byte is added to the total of disk used.
:: This avoids error caused by running space on an empty drive.
:: Note 2: The ratio has an error of +-0.01%
set ratio=%@eval[(%@diskused[%dsk,b]+1)/%@disktotal[%dsk,b]]
set up=%@eval[%@int[%@eval[%ratio*10000]]/100]
set fp=%@eval[100-%up]
:: Display Bar calculation
:: I have used a 50 char bar. If you change the template, the "50"
:: should be changed to the length of the new bar.
set u_no=%@eval[%ratio*50]
set u_int=%@int[%u_no]
if "%@eval[%u_no-%u_int]" ge "0.5" inc u_int 1
:: Use screen handling. Allows the use of an alias to show two or
:: more drives, depending on how many lines your display is set up for.
:: Eg for 25 line display use - "alias spaced=cls^for %a in (c d) space %a"
:: Make sure there is enough room on screen to display the output.
if %_row gt %@eval[%_rows-11] cls
:: Set the row indicator for the first line a variable is displayed.
set row=%@eval[%_row+2]
:: Use a template for the layout
text
IMMMMMMMMMMMMMMMMMMMMMMMMMQMMMMMMMMMMMMMMMMMMMMMMMM;
: Statistics for drive 3 SPACE.BTM :
GDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDDDDDDDDDD:
: Total - 100% :
: Used - :
: Free - :
GDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD6
:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy:
HMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM<
endtext
:: Stuff the templates face
scrput %row 36 bri whi on %_bg %dsk
inc row 2
screen %row 26 %@disktotal[%dsk,K]K
screen %row 39 %@disktotal[%dsk,M]M
inc row 1
screen %row 26 %@diskused[%dsk,K]K
screen %row 39 %@diskused[%dsk,M]M
screen %row 52 %up%%%
inc row 1
screen %row 26 %@diskfree[%dsk,K]K
screen %row 39 %@diskfree[%dsk,M]M
screen %row 52 %fp%%%
inc row 2
if not %u_int==0 scrput %row 14 bri whi on %_bg %@substr[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[,0,%u_int]
inc row 2
screen %row 0
endlocal
quit
:usage
if %dsk==A: .or. %dsk==B: (beep^echo Drive %dsk is not ready.)
echo Usage: SPACE [drive]
echo The default drive is current the drive.
endlocal
--- Squish/2 v1.01
* Origin: The Lightning BBS - Don't Worry... Be Happy... (3:634/383)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/23/1992
To: ALL Num: 76 Date: 11/20/1992
From: SCOTT WUNSCH Re: Time: 4:45 pm
Subj: SHELL.BTM... version 2.01 Prvt: N Read: N
Salutations, All!
Remember that SHELL.BTM that was originally posted by Mark Stiebel? Well,
I think I have improved it. And now I've even fixed my improvements ;). By
using aliases to implement its ON, OFF and END commands, it no longer has to
do very much with the commands you enter. Hopefully this will allow things
like variable functions and multiple commands (^) to work properly. Anyhow,
here it is...
__________O_/___________________| Cut |___________________\_O__________
O \ | Here! | / O
@ECHO OFF
: * * * * * * * * * * [ SHELL.BTM v2.01 ] * * * * * * * *
: * 4DOS Prompt Shell Batch File *
: * *
: * Originally by Mark Stiebel (3:633/159) -- 05/10/92 *
: * Revised by Scott Wunsch (1:140/23.1701) -- 19-Nov-92 *
: * *
: * Description: SHELL.BTM will keep looping, updating *
: * the prompt every second or so. *
: * Commands and aliases are entered as *
: * usual, and are added to the command *
: * history. *
: * *
: * Commands while in SHELL.BTM: *
: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
: * ON - Turn the Status Line ON *
: * OFF - Turn the Status Line OFF *
: * END - Quit SHELL.BTM *
: * *
: * Anything else will run as it would *
: * from a normal 4DOS command line. *
: * *
: * New Features: *
: * ~~~~~~~~~~~~~~~ *
: * Handles multi-command lines (using "^") and other *
: * embedded commands the previous version would choke *
: * on. Special commands now implemented through *
: * aliases. *
: * *
: * * * * * * * * * * * * * *[]* * * * * * * * * * * * * *
SETLOCAL
Set _SL=1
Set _FL=0
Set _ST=%@EVAL[%_ST+1]
SET CursorStyle=100:1
ALIAS ON=SET _SL=1
ALIAS OFF=SET _SL=0
ALIAS END=SET _GOOD=BYE
:MainLoop
Set _cmd=%@CHAR[32]
if %_CWDS == %cudir goto nochange
set cudir=%_CWDS
pushd
:nochange
IF '%_SL' == '0' GOTO NoStat
Setdos /s0:0
IFF %@DISKFREE[%_DISK:,M] LT 1 THEN^SET _CLR1=%@CHAR[27][0;31;46m^...
...ELSE^SET _CLR1=%@CHAR[27][34m^ENDIFF
IFF %@DOSMEM[k] LT 400 THEN^SET _CLR2=%@CHAR[27][0;31;46m^ELSE^SET...
... _CLR2=%@CHAR[27][34m^ENDIFF
IFF %@EMS[K] LT 500 THEN^SET _CLR3=%@CHAR[27][0;31;46m^ELSE^SET ...
..._CLR3=%@CHAR[27][34m^ENDIFF
IFF %_SHELL GT 0 THEN^SET _CLR4=%@CHAR[27][0;31;46m^ELSE^SET ...
..._CLR4=%@CHAR[27][34m^ENDIFF
IFF %_ST GT 1 THEN^SET _CLR5=%@CHAR[27][0;31;46m^ELSE^SET _CLR5=...
...%@CHAR[27][34m^ENDIFF
echos %@CHAR[27][s%@CHAR[27][H%@CHAR[27][1;30;46m%@CHAR[27][K
echos %@CHAR[27][1;30m[%@CHAR[27][34m%@SUBSTR[%_DATE,0,2]/
echos %@SUBSTR[%@LINE[D:\BATCH\MONTHS.DAT,%@EVAL[%@SUBSTR[%_DATE,...
...3,2]-1]],0,3]
echos %@CHAR[27][1;30m][%@CHAR[27][34m%_TIME%%@CHAR[27][1;30m][
echos %_DISK:%_CLR1%%@DISKFREE[%_DISK:,K]Kb%@CHAR[27][1;30m][Mem:%_CLR2%
echos %@DOSMEM[K]Kb%@CHAR[27][1;30m][EMS:%_CLR3%%@EMS[K]Kb
echos %@CHAR[27][1;30m][Extended:%@CHAR[27][34m%@EXTENDED[K]Kb
echos %@CHAR[27][1;30m][Shell:%_CLR4%%_SHELL%%@CHAR[27][1;30m/%_CLR5%
echos %@EVAL[%_ST-1]%@CHAR[27][1;30m]
IF %_DISK == A ECHOS %@CHAR[27][0;37m
IF %_DISK == B ECHOS %@CHAR[27][0;32m
IF %_DISK == C ECHOS %@CHAR[27][0;35m
IF %_DISK == D ECHOS %@CHAR[27][0;36m
IF %_DISK == E ECHOS %@CHAR[27][0;33m
IF %_DISK == F ECHOS %@CHAR[27][0;1;30m
echos %@CHAR[27][%_ROWS;1H%_CWDS%%@CHAR[27][1;33m`| >`
SETDOS /S100:1
GOTO SubLoop
:SubLoop
IF '%_SL' == '0' GOTO NoStat
Setdos /s0:0
echos %@CHAR[27][s%@CHAR[27][H%@CHAR[27][1;30;46m%@CHAR[27][1;30m[
echos %@CHAR[27][34m%@SUBSTR[%_DATE,0,2]/
echos %@SUBSTR[%@LINE[{Month Filename Here!!!!},%@EVAL[%@SUBSTR[%_DATE,...
...3,2]-1]],0,3]
echos %@CHAR[27][1;30m][%@CHAR[27][34m%_TIME%%@CHAR[27][1;30m]
echos %@CHAR[27][u%@CHAR[27][0;1;33m
IF %_FL == 0 (ECHOS %@CHAR[27][3D`|\>`%@CHAR[27][33m ^ SET _FL=1)
IF %_FL == 1 (ECHOS %@CHAR[27][3D`||>`%@CHAR[27][33m ^ SET _FL=2)
IF %_FL == 2 (ECHOS %@CHAR[27][3D`|/>`%@CHAR[27][33m ^ SET _FL=3)
IF %_FL == 3 (ECHOS %@CHAR[27][3D`|->`%@CHAR[27][34m ^ SET _FL=0)
SETDOS /S%CursorStyle
GOTO IP
:NoStat
IF %_DISK == A ECHOS %@CHAR[27][0;37m
IF %_DISK == B ECHOS %@CHAR[27][0;32m
IF %_DISK == C ECHOS %@CHAR[27][0;35m
IF %_DISK == D ECHOS %@CHAR[27][0;36m
IF %_DISK == E ECHOS %@CHAR[27][0;33m
IF %_DISK == F ECHOS %@CHAR[27][0;1;30m
ECHOS %@CHAR[27][%_ROWS;1H%_CWDS%%@CHAR[27][1;33m`|`
echos %@CHAR[240]`>`%@CHAR[27][34m
:IP
INPUT /w0 %%_cmd
:Execute
History /A %_cmd
CALL %_cmd
IF "%_GOOD" == "BYE" (SET _ST=%@EVAL[%_ST-1]^UNSET _GOOD^ENDLOCAL^QUIT)
IF "%@READSCR[0,0,1]" == "[" GOTO SubLoop
GOTO MainLoop
:NoHist
CALL %@SUBSTR[%_cmd,1]
GOTO MainLoop
_______O_/___________________| Cut |___________________\_O_______
O \ | Here! | / O
That's it! Now, it uses a file containing the names of all twelve months
to quickly display the month name in text form. Just create a file listing
out the month names in full, and put its name in SHELL.BTM where indicated.
Hope I got everything this time... ;)
/\ LLAP...
> \ cott \\'unsch <
\/
--- GoldED 2.40
* Origin: Good Point! -=- Regina, Sask, Canada -=- (1:140/23.1701)
>> Message length exceeded, split by WILDMAIL! v2.04 <<
>> Continued in next message <<
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/25/1992
To: MIKE DUNNAGAN Num: 90 Date: 11/22/1992
From: MAYNARD HOGG Re: Time: 10:10 am
Subj: Space.Btm 1/2 Prvt: N Read: N
@echo off
rem SPACE.BTM
goto start
Sample output:
Statistics for drive C: SPACE.BTM - Mark Stiebel (c)1992
Total space : 32580 Kbytes - 31 Mbytes - 100%
Used space : 25934 Kbytes - 25 Mbytes - 80% <---
Free space : 6646 Kbytes - 6 Mbytes - 20%
Returns (via ERRORLEVEL or 4DOS' %?):
* the percentage in the middle line (indicated with an arrow)
* 255 if the disk is not ready
* 0 for the help mode
Date: 10-31-92
From: MARK STIEBEL
Once again, prompted by a post by someone else in this echo (Saul
Levy), I have used their idea of a batch file to show drive info.
SPACE.BTM shows the total, free and used space and percentages of a
drive, and draws a usage graph as well. It might take a few seconds
the first time you run it on a certain drive while 4DOS logs that
drive, but such is life.
:start
:: Author : Mark Stiebel, 3:633/159 (The Gate - (03)879-9082)
:: Written : 31/10/92
::
:: Please feel free to distribute and modify
::
:: There are a few things that could be modified and made better, but as
:: long as you specify a correct disk name, nothing can go wrong.
::
:: Have fun.
:: Check if the user wants help - not that he'd need it.
IF %@SUBSTR[%1,1,1] == h GOTO Usage
IF %@SUBSTR[%1,1,1] == ? GOTO Usage
IF %@SUBSTR[%1,0,1] == h GOTO Usage
IF %@SUBSTR[%1,0,1] == ? GOTO Usage
:: Get rid of the cursor, set values, and if no drive was specified,
:: use the default drive instead.
setlocal
unalias set >&nul
set wob=bri green on %_bg
set bwob=bri red on %_bg
if isalias curson SETDOS /s0:0
Set c=4
Set drive=%1:
IF %1. == . SET drive=%_DISK:
:: If the selected drive is ready, work out how many blocks will be
:: needed (for the usage graph), and if not to go to the error message.
CLS
IF %@READY[%drive] != 1 GOTO NotReady
set dt=%@disktotal[%drive,b]
set du=%@diskused[%drive,b]/%dt
if /%2/ != // set du=%2
Set x=%@EVAL[%du*60]
set du=%@EVAL[%du*100]
::don't want to worry about special case of 100% just yet
:(too hard to program)
if %x ge 60 set x=59.99
if %du ge 100 set du=99.99
:: Draw the boxes and display the numerical stats.
DRAWBOX 1 30 3 63 1 %wob
DRAWBOX 3 3 7 63 1 %wob
DRAWBOX 1 3 9 63 2 %wob
SCRPUT 2 31 %wob SPACE.BTM - Mark Stiebel (c)1992
SCRPUT 2 6 %wob Statistics for drive %@UPPER[%drive]
SCRPUT 4 6 %wob Total space : %@DISKTOTAL[%drive,K] Kbytes
SCRPUT 5 6 %wob Used space : %@DISKUSED[%drive,K] Kbytes
SCRPUT 6 6 %wob Free space : %@DISKFREE[%drive,K] Kbytes
SCRPUT 4 34 %wob - %@DISKTOTAL[%drive,M] Mbytes
SCRPUT 5 34 %wob - %@DISKUSED[%drive,M] Mbytes
SCRPUT 6 34 %wob - %@DISKFREE[%drive,M] Mbytes
SCRPUT 4 48 %wob - 100`%`
SCRPUT 5 48 %wob - %@int[%du]`%`
:: ^^^^^^^^^^Never greater than 99% here.
SCRPUT 6 48 %wob - %@INT[%@EVAL[(%@DISKFREE[%drive,b]/%dt)*100+0.5]]`%`
[ Continued In Next Message... ]
-- SPEED 1.10 [NR]:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/25/1992
To: MIKE DUNNAGAN Num: 91 Date: 11/22/1992
From: MAYNARD HOGG Re: Time: 10:10 am
Subj: Space.Btm 2/2 Prvt: N Read: N
[ ...Continued From Previous Message ]
::print scale first
set outc=%@char[250]
set outc=%outc%%outc%%outc%%outc%%outc%%@char[179]
:dots
set outc=%outc%%outc%
if %@len[%outc] lt 59 goto dots
set outc=%@substr[%outc,0,59]
SCRPUT 8 4 %wob %outc
::screen 0 0 ^pause
set ptr=4
set c=%@int[%@eval[%du/10]]^if %c lt 1 goto bar20
:: ^^^^^^^^^^^^^^^^^^^^^max = 9
::now is the time to round off %du
set du=%@int[%@eval[%du+0.5]]
:: ^^^^^^^^^^^^^^^^^^^^^^round up (even to 100%)
set outc=%@char[177]
::six blocks for each 10% on scale
set outc=%outc%%outc%%outc%%outc%%outc%%@char[179]
::print bar in 10% blocks
:bar10
::pc is the current per cent for SCRPUT command below
set pc=%@eval[(10 - %c)*10]
::print remainder
:bar15
scrput 5 50 %bwob% %pc`% `
SCRPUT 8 %ptr %bwob %outc
::delay 2 ticks
beep 10 4
set ptr=%@eval[%ptr + %@len[%outc]]
set c=%@eval[%c - 1]
if %c gt 0 goto bar10
if %c eq 0 (
set outc=%@substr[%outc,0,%@eval[%x %% 6]]
rem ^^^^^^^^^^^^^^^
rem yields 5 for 99.99% case
set c=0^set pc=%du
if /%outc/ != // goto bar15
)
:bar20
Goto End
:: The 'Drive Not Ready' error message
:NotReady
echo.
echo ERROR: Drive %drive is not ready. Please insert a disk or make sure
echo that the hard drive is operational.
echo.
set du=255
goto end
:: The 'Help' message
:Usage
TEXT
USAGE:
SPACE <drive>
Where <drive> is the drive letter. This may be specified in
upper or lower case.
If no drive is specified, SPACE.BTM will use the current drive.
ENDTEXT
QUIT 0
:: unset all the environment variables used, restore the cursor,
:: and put it just below the output from the .BTM file.
:End
SCREEN 12 0
if isalias curson curson
quit %du
-- SPEED 1.10 [NR]:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: ALL Num: 108 Date: 11/24/1992
From: TONY DUNLAP Re: Time: 6:38 pm
Subj: 4fill Prvt: N Read: N
(BTM follows next message)
4FILL.BTM
This BTM will attempt to "BEST FIT" files from a source directory
to a target disk. Copy and Move are supported as well as format
between disks if desired. The DESCRIPTIONS are also copied/moved.
Initial Release 2-11-1992
Change 3-29-1992
-Shortened filenames, label names and messages to reduce the
size of the btm to less than 2048 bytes (1 cluster on most
hard drives)
Change 11-24-1992
-Changed input routine to use @select.
PLEASE READ NOTES at the end of this document.
Questions? Suggestions?
Tony Dunlap
296 Elm St.
Chillicothe, Ohio 45601
Or send NETMAIL to Fidonet 1:2220/30
The latest version will always be available for F'req there as 4FILL.ARJ
or
Available via FREQ or first time callers from The Outer Limits I (1:2220/10)
at
1-614-772-5520 (USR Dual Standard) or The Outer Limits II (1:2220/15) at
1-614-772-5583 (USR 14.4 HST). (For F'req, magic name is 4FILL)
Any ideas or suggestions are urged and welcome.
This BTM requires 4DOS 4.xx
An ANSI driver is recommended.
It is suggested that you keep the original BTM intact and do modifications
to a copy.
Variable names used in this BTM (they are all released when the btm has
finished and won't conflict with yours even if you are using the same name)
Cfil, Cfre, Dz, Hman, Op, Tman
Temporary files used in this BTM
4f#1.4f, 4f#2.4f
Files are created in the root directory of the Current drive, then
are erased when the BTM is finished. Thus, THIS BTM WILL NOT RUN FROM THE
ROOT DIRECTORY OF ANY DRIVE. It is suggested that it be put in your PATH.
Usage:
It is recommended that 4fill.btm be in a subdirectory listed in your PATH
statement and that you CD to the directory where the files you want to
copy are located. You may choose to rename 4FILL.BTM to some other name.
(I call it FILL.BTM myself)
4FILL sourcefiles targetdrive: [/M]
where "sourcefiles" is a valid filespec (wildcards are allowed)
and
"targetdrive" is a valid drive (don't forget the colon)
/M is optional and means to MOVE files to the target rather than
copying (which is the default)
Notes:
1. One place where you might want to modify the btm is the line for the
format option. Look for the following line:
if %dz EQ F format %2 (line 34 as distributed)
and replace "format %2" with your desired command line.
2. I have trimmed the btm down pretty good but if you need to trim off
a few more bytes (say, to make a better help screen) you can delete
the 2 space indentation on commands after "iff" and "else".
Errors:
There are 2 error conditions that you need to watch out for.
1. Root directory full:
360k and 720k diskettes can hold only 112 entries (files) in the
Root Directory. If you are copying many small files (less than 3000
bytes) you may run into this problem. A way around it is to modify the
program to create and copy to a subdirectory on the target floppy.
I leave this as an exercise to the user as it will increase the size
of the btm substantially.
2. Description file couldn't be updated:
This is very rare (in fact, I couldn't produce this error). There is
a slight possibility that during the copy operation, there will be
room enough for the next file but not enough for the description. I
know of no way to fix this. In fact I'm not even sure that it will
be detected. I assume if it happens the copy will return a non-zero
errorlevel but I'm not sure since it's never happened.
--- GEcho 1.00
* Origin: DISCOVER (1:2220/30.1)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: ALL Num: 109 Date: 11/24/1992
From: TONY DUNLAP Re: Time: 6:42 pm
Subj: 4fill Prvt: N Read: N
(Remove line numbers before using)
1 : @echo off
2 : if "%_cwp" NE "\" .AND. "%@substr[%2,1,1]" EQ ":" goto go
3 : echo.
4 : echo Syntax: %0 sourcefiles targetdrive: [/M]
5 : text
6 :
7 : /M means move, instead of copy
8 :
9 : endtext
10 : echo %0 must be run from a SUBDIRECTORY!
11 : quit
12 : :err
13 : echo ERROR! Root directory full or Description not updated.
14 : quit
15 : :go
16 : setlocal
17 : cls
18 : *del \4f#*.4f>& nul
19 : if "%3" EQ "/M" set op=move
20 : if "%3" NE "/M" set op=copy
21 : *dir /o-s /a-d-r-h /b %1>\4f#1.4f
22 : :L1
23 : text | set dz=%@substr[%@select[con,18,10,24,42,Insert Disk in Drive
%2 and...],0]
24 : Copy Files
25 : Directory of Target
26 : Format Target
27 : List remaining files
28 : endtext
29 : if "%dz" EQ "" goto DONE
30 : set dz=%@substr[%dz,0,1]
31 : echo.
32 : if %dz EQ L (*type \4f#1.4f /p^echo %@eval[%@lines[\4f#1.4f]%+1]%
files remaining^goto L1)
33 : if %dz EQ D (*dir %2 /4^pause^goto L1)
34 : if %dz EQ F format %2
35 : if %@ready[%2] NE 1 (echo Drive error or not formatted^goto L1)
36 : iff %@diskused[%2] NE 0 then
37 : echo DISK %2 is not empty.%@char[7]
38 : inkey /k"YN" Do you want to erase %2 (Y/N)? %%dz
39 : if %dz EQ y (*dir %2 /4 ^ echo.^echos ERASING-^*del /s/x/q %2\*.*)
40 : endiff
41 : iff %@diskfree[%2,b] LT %@filesize[%@line[\4f#1.4f,0]] then
42 : echo %@line[\4f#1.4f,0]too big for %2
43 : inkey /k"CE" Continue or Exit(C/E)?%@char[7] %%dz
44 : if %dz EQ E goto done
45 : endiff
46 : echo.
47 : set hman=%@lines[\4f#1.4f]
48 : set tman=0
49 : text
50 : Processing Bytes File File
51 : File # Free Name Size
52 :
53 : endtext
54 : :L2
55 : set cfil=%@line[\4f#1.4f,%tman]
56 : set cfre=%@diskfree[%2,b]
57 : screen %_row %@eval[5-%@len[%@eval[%tman+1]]] %@eval[%tman+1]
58 : iff %@eval[%@filesize[%cfil,b]] LE %cfre then
59 : screen %_row %@eval[19-%@len[%cfre]] %cfre
60 : screen %_row %@eval[34-%@len[%cfil]] %cfil
61 : screen %_row %@eval[43-%@len[%@filesize[%cfil,b]]]
%@filesize[%cfil,b]
62 : echo.
63 : *%op %cfil %2>&nul
64 : if %_? NE 0 goto err
65 : else
66 : echo %cfil>>\4f#2.4f
67 : endiff
68 : set tman=%@eval[%tman+1]
69 : if %hman GE %tman goto L2
70 : :done
71 : *del \4f#1.4f>&nul
72 : ren \4f#2.4f \4f#1.4f>&nul
73 : if exist \4f#1.4f goto L1
74 : echo !! DONE !!
--- GEcho 1.00
* Origin: DISCOVER (1:2220/30.1)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: RICHARD ROBERTSON Num: 85 Date: 11/25/1992
From: MAYNARD HOGG Re: Time: 1:51 pm
Subj: 4Piano.Btm Prvt: N Read: N
@echo off
goto begin
Date: 10-30-92
From: RICHARD ROBERTSON
I hope there hasn't been anything like this posted here recently
- apologies in advance - this echo is sooo busy <g>. Anyway my
kids liked it. Watch out for commas, apostrophies and spaces -
they are not trapped. The BTM is mostly hard coded - you could
add a record and playback routines if you had the mind to.
Enjoy...
::preliminaries by Maynard Hogg, Tokyo 11/25/92
:begin
setlocal
unalias set >& nul
set oldfg=%_fg
set oldbg=%_bg
set c1=whi on blu
set c2=blu on whi
set c3=cya on bla
set c4=red on whi
set keymap1=QWERTYUIASDFGHJKZXCVBNM.
set keymap2=CDEFGABCCDEFGABCCDEFGABC
set freqs=2093 2349 2637 2794 3136 3520 3951 4186
set l=8
cls
for %keyp in (q w e r t y u i) gosub doit
::
:: 4PIANO.BTM version 1.0
:: 29th October 1992 Richard Robertson
:: 3:640/556.6@Fidonet 61:6700/160@Worldnet
::
inkey /k"12345678" Note duration (1-8) %%l
cls %c3
screen 1 0
text
***********4PIANO***********
*-esc- *
* Low C D E F G A B C *
* *
* A S D F G H J K *
* Med C D E F G A B C *
* *
* Z X C V B N M . *
* High C D E F G A B C *
* *
* V1.0 Richard Robertson *
* V1.1 Maynard Hogg *
****************************
endtext
scrput 2 3 bri %c1 ESC
:loop
screen 15 0
::inkey /k"%keymap1[ESC]" %%keyp >nul
inkey %%keyp >nul
if "%keyp" == "%@char[27]" goto done
gosub doit
if /%keyno/ == /-1/ goto loop
goto loop
:done
for %keyp in (e e e q) gosub doit
cls %oldfg on %oldbg border %oldbg
quit
:doit
::Calculate parameters
set keyp=%@upper[%keyp]
set keyno=%@index[%keymap1,%keyp]
if /%keyno/ == /-1/ return
set n=%@substr[%keymap2,%keyno,1]
set r=%@int[%@eval[%keyno/8]]
set c=%@eval[%keyno %% 8]
set div=%@substr[/4/4,%@eval[%r*2]]
set f=%@int[%@eval[%@word[%c,%freqs]%div+0.5]]
set r=%@eval[%r * 3 + 4]
set c=%@eval[%c * 2 + 9]
scrput %r %c %c4 %n
beep %f %l
scrput %r %c %c3 %n
return
* SPEED 1.10 [NR] *
* SPEED 1.10 [NR] *
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: DAYTON LIVINGSTON Num: 33 Date: 11/22/1992
From: ERA ERIKSSON Re: Time: 4:17 am
Subj: Disktot.Btm Prvt: N Read: N
* Quoting Dayton Livingston (1:114/148) to Saul Levy on 14 Nov 1992:
SL>> Adding commas to a .BTM output is a mess! The way I see it
SL>> now (not having done it yet!) is to split up each number
SL>> into three digits, add a comma after each and continue to
> If you come up with something useful, please post it. I fooled
> around a bit with it, but it's really a hassle - especially since
Just whipped up this for the fun of it. Not thoroughly tested (and just look
at the time, omigod :-) but maybe it will help someone.
This would normally not be a batch file in itself -- just put it in a
subroutine whenever you need it.
Pardon the short variable names. N is for Number, O is simply N+1, D is for
delimiter.
Note that space is the delimiter of choice over here. Change to comma for
your Angloamerican philistine conventions.
/* era */
:: NUM.BTM
:: era eriksson 2:220/851.95 22.11.92
@echo off
setlocal
:: Change this to your local delimiter
set d=` `
set n=
set o=
:: You wouldn't use INPUT in a subroutine. Just put the original value
:: into n (and don't "set n=" above) and see what happens.
input Let's see a number: %%n
:lloopp
iff %@len[%n] gt 3 then
set o=%d%%@substr[%n,2,-3]%o
set n=%@substr[%n,0,%@eval[%@len[%n]-3]]
else
echo %n%%o
:: This would be "return" if used as a subroutine. You may also want
:: to top it off with "set n=%n%%o" to get the final output into the
:: variable you originally fed the routine.
quit
endiff
goto lloopp
---
* Origin: root:V9zG.Iy.9ndH2:0:0:era, o . ,,:/:/bin/bash (2:220/851.95)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: ALL Num: 117 Date: 11/26/1992
From: STEVE LAMB Re: Time: 9:12 am
Subj: Nice Prompt Prvt: N Read: N
Here's a nice prompt I just got done perfecting:
set prompt=`$e[34m[$e[31mTime: $e[32m$t$e[34m$b$e[31mDate:
$e[32m$d$e[34m]$_[$e[31mDOS: $e[32m%@do
smem[K]k$e[34m$b$e[31mEMS:$e[32m%@ems[K]k$e[34m]$_[$e[36m$xc: %@diskfree[c:,
K]k free$e[34m]$_[$e[36m$xd: %@diskfree[d:,K]k free$e[34m]$_$e[m$p$g`
This will show you the current time/date, DOS/EMS free, the directory
that C: and D: are logged to and how much space is on each drive. Of course
you'll need to put it all back together.
--- GEcho 1.00/beta+
* Origin: Generic Origin Line (916) 363-1424 (1:203/1369)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: BARRY GELMAN Num: 94 Date: 11/20/1992
From: HUGO LANDSMAN Re: Time: 6:30 pm
Subj: Setting file date with 4 Prvt: N Read: N
Hi Barry,
10 Nov 1992 00:36, Barry Gelman (1:244/112) wrote to Dave M. Walker:
BG> Oh Rex! <nudge> <nudge> Howz about making "touch" an internal
BG> command?
You don't have it already? alias touch=for %f in (%&) (iff exist %f then ^
copy/b %f+nul ^ else ^ echos>%f ^ endiff)
regards,
hugo
--- FastEcho 1.21/b5
* Origin: st. anna pbbs, nijmegen nl (2:512/154.5@fidonet.org)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: ALL Num: 112 Date: 11/25/1992
From: SCOTT WUNSCH Re: Time: 5:23 pm
Subj: SHELL.BTM... Hopefully fi Prvt: N Read: N
Salutations, All!
Well, I'm getting kind of tired of seeing everyone talking about how
they can't seem to get my SHELL.BTM to work right, so here is (another
:() repost, that should work. I have gotten rid of the MONTHS.DAT
file, and gone the way of Maynard Hogg in using %@WORD to pick a month
(you'll see it in the .BTM). The one double-percent I forgot has been
amended.
I also improved the cursor restoration stuff, thanks to Jasen Betts
for that.
Oh yes, and most importantly, my date format is DD-MM-YY, so some of
the date stuff using %@SUBSTR may work a little funny on your system
if you use a different format - you'll just have to play with it.
_______O_/___________________| Cut |___________________\_O_______
O \ | Here! | / O
@ECHO OFF
: * * * * * * * * * * [ SHELL.BTM v2.02 ] * * * * * * * * *
: * 4DOS Prompt Shell Batch File *
: * *
: * Originally by Mark Stiebel (3:633/159) -- 05/10/92 *
: * Revised by Scott Wunsch (1:140/23.1701) -- 25-Nov-92 *
: * Special thanks to Maynard Hogg and Jasen Betts *
: * *
: * Description: SHELL.BTM will keep looping, updating *
: * the prompt every second or so. *
: * Commands and aliases are entered as *
: * usual, and are added to the command *
: * history. *
: * *
: * Commands while in SHELL.BTM: *
: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
: * ON - Turn the Status Line ON *
: * OFF - Turn the Status Line OFF *
: * END - Quit SHELL.BTM *
: * *
: * Anything else will run as it would *
: * from a normal 4DOS command line. *
: * *
: * New Features: *
: * ~~~~~~~~~~~~~~~ *
: * Handles multi-command lines (using "^") and other *
: * embedded commands the previous version would choke *
: * on. Special commands now implemented through *
: * aliases. Plus, it should work! ;) *
: * *
: * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SETLOCAL
Set _SL=1
Set _FL=0
Set _ST=%@EVAL[%_ST+1]
SETDOS | SET Cursor=%@SUBSTR[%@LINE[CON,8],18]:%@SUBSTR[%@LINE[CON,0],14]
ALIAS ON=SET _SL=1
ALIAS OFF=SET _SL=0
ALIAS END=SET _GOOD=BYE
:MainLoop
Set _cmd=%@CHAR[32]
if %_CWDS == %cudir goto nochange
set cudir=%_CWDS
pushd
:nochange
IF '%_SL' == '0' GOTO NoStat
Setdos /s0:0
IFF %@DISKFREE[%_DISK:,M] LT 1 THEN^SET _CLR1=%@CHAR[27][0;31;46m^...
...ELSE^SET _CLR1=%@CHAR[27][34m^ENDIFF
IFF %@DOSMEM[k] LT 400 THEN^SET _CLR2=%@CHAR[27][0;31;46m^ELSE^SET...
... _CLR2=%@CHAR[27][34m^ENDIFF
IFF %@EMS[K] LT 500 THEN^SET _CLR3=%@CHAR[27][0;31;46m^ELSE^SET ...
..._CLR3=%@CHAR[27][34m^ENDIFF
IFF %_SHELL GT 0 THEN^SET _CLR4=%@CHAR[27][0;31;46m^ELSE^SET ...
..._CLR4=%@CHAR[27][34m^ENDIFF
IFF %_ST GT 1 THEN^SET _CLR5=%@CHAR[27][0;31;46m^ELSE^SET _CLR5=...
...%@CHAR[27][34m^ENDIFF
echos %@CHAR[27][s%@CHAR[27][H%@CHAR[27][1;30;46m%@CHAR[27][K
echos %@CHAR[27][1;30m[%@CHAR[27][34m%@SUBSTR[%_DATE,0,2]/
echos %@WORD[%@SUBSTR[%_DATE,3,2],x Jan Feb Mar Apr Jun Jul Aug Sep...
... Nov Dec]
echos %@CHAR[27][1;30m][%@CHAR[27][34m%_TIME%%@CHAR[27][1;30m][
echos %_DISK:%_CLR1%%@DISKFREE[%_DISK:,K]Kb%@CHAR[27][1;30m][Mem:%_CLR2%
echos %@DOSMEM[K]Kb%@CHAR[27][1;30m][EMS:%_CLR3%%@EMS[K]Kb
echos %@CHAR[27][1;30m][Extended:%@CHAR[27][34m%@EXTENDED[K]Kb
echos %@CHAR[27][1;30m][Shell:%_CLR4%%_SHELL%%@CHAR[27][1;30m/%_CLR5%
echos %@EVAL[%_ST-1]%@CHAR[27][1;30m]
IF %_DISK == A ECHOS %@CHAR[27][0;37m
IF %_DISK == B ECHOS %@CHAR[27][0;32m
IF %_DISK == C ECHOS %@CHAR[27][0;35m
IF %_DISK == D ECHOS %@CHAR[27][0;36m
IF %_DISK == E ECHOS %@CHAR[27][0;33m
IF %_DISK == F ECHOS %@CHAR[27][0;1;30m
echos %@CHAR[27][%_ROWS;1H%_CWDS%%@CHAR[27][1;33m`| >`
SETDOS /S100:1
GOTO SubLoop
:SubLoop
IF '%_SL' == '0' GOTO NoStat
Setdos /s0:0
echos %@CHAR[27][s%@CHAR[27][H%@CHAR[27][1;30;46m%@CHAR[27][1;30m[
echos %@CHAR[27][34m%@SUBSTR[%_DATE,0,2]/
echos %@SUBSTR[%@LINE[D:\BATCH\MONTHS.DAT,%@EVAL[%@SUBSTR[%_DATE,...
...3,2]-1]],0,3]
echos %@CHAR[27][1;30m][%@CHAR[27][34m%_TIME%%@CHAR[27][1;30m]
echos %@CHAR[27][u%@CHAR[27][0;1;33m
IF %_FL == 0 (ECHOS %@CHAR[27][3D`|\>`%@CHAR[27][33m ^ SET _FL=1)
IF %_FL == 1 (ECHOS %@CHAR[27][3D`||>`%@CHAR[27][33m ^ SET _FL=2)
IF %_FL == 2 (ECHOS %@CHAR[27][3D`|/>`%@CHAR[27][33m ^ SET _FL=3)
IF %_FL == 3 (ECHOS %@CHAR[27][3D`|->`%@CHAR[27][34m ^ SET _FL=0)
SETDOS /S%Cursor
GOTO IP
:NoStat
IF %_DISK == A ECHOS %@CHAR[27][0;37m
IF %_DISK == B ECHOS %@CHAR[27][0;32m
IF %_DISK == C ECHOS %@CHAR[27][0;35m
IF %_DISK == D ECHOS %@CHAR[27][0;36m
IF %_DISK == E ECHOS %@CHAR[27][0;33m
IF %_DISK == F ECHOS %@CHAR[27][0;1;30m
ECHOS %@CHAR[27][%_ROWS;1H%_CWDS%%@CHAR[27][1;33m`|`
echos %@CHAR[240]`>`%@CHAR[27][34m
:IP
INPUT /w0 %%_cmd
:Execute
History /A %_cmd
CALL %_cmd
IF "%_GOOD" == "BYE" (SET _ST=%@EVAL[%_ST-1]^UNSET _GOOD^ENDLOCAL^QUIT
IF "%@READSCR[0,0,1]" == "[" GOTO SubLoop
GOTO MainLoop
:NoHist
CALL %@SUBSTR[%_cmd,1]
GOTO MainLoop
_______O_/___________________| Cut |___________________\_O_______
O \ | Here! | / O
And that better be all! ;)
/\ LLAP...
> \ cott \\'unsch <
>> Message length exceeded, split by WILDMAIL! v2.04 <<
>> Continued in next message <<
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: SCOTT WUNSCH Num: 77 Date: 11/21/1992
From: DAYTON LIVINGSTON Re: Time: 11:21 am
Subj: SHELL.BTM... version 2.0 Prvt: N Read: N
SW>> echos %@SUBSTR[%@LINE[D:\BATCH\MONTHS.DAT,%@EVAL[%@SUBSTR[%_DATE,...
MD> What is this?
SW> Oops. Forgot to tell you about that one. I found the
SW> quickest way to come up with the month name in text form was
SW> to put all twelve of the months in a text file and to use
SW> %@LINE to extract the one I wanted. The %@SUBSTR just trims
SW> it down to size for an abbrieviation. Just adjust the
SW> pathname and make a text file with all of the months listed
SW> in it, one line after the other.
Yeah, some of us firured that one out. I modified mine to keep
it all in one file (don't recall how, but I think it was
something like using:
%@SUBSTR[JanFebMar...,%@EVAL[%@INDEX...]*3],3]
or some such.
- Dayton
* OLX 994 * All stressed up and nowhere to go.
--- Maximus 2.00
* Origin: T.V. BBS - Glendale, AZ - (602) 930-8542 (1:114/148)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: MIKE DUNNAGAN Num: 45 Date: 11/20/1992
From: JOHN VAN GRINSVEN Re: Time: 2:15 pm
Subj: SHELL.BTM... version 2.00 Prvt: N Read: N
Hi Mike,
Saturday November 14 1992, Mike Dunnagan writes to Scott Wunsch:
SW>> echos %@SUBSTR[%@LINE[D:\BATCH\MONTHS.DAT,%@EVAL[%@SUBSTR[%_DATE,...
MD> What is this?
A way to get the month display as Nov. I do it this way...
echos %@WORD[%@EVAL[%@SUBSTR[%_DATE,0,2] -1],Jan Feb Mar...
... Apr May Jun Jul Aug Sep Oct Nov Dec]
SW>> echos %_DISK:%_CLR1%@DISKFREE[%_DISK:,K]Kb%@CHAR[27][1;30m][Mem:%_CLR2%
Change it to: %_DISK:%_CLR1%%@DISKF... (double the %)
4DOS thinks the % from %@DI.. is a terminator to %_CLR1 i.e. %_CLR1%. Then it
runs into @DIS.. and does not recognize the command.
Gr. __o
John o/--
---
* Origin: The Frenz Experiment (2:500/131.2053)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: MIKE DUNNAGAN Num: 101 Date: 11/25/1992
From: DAVE MUNHOLLON Re: Time: 5:23 pm
Subj: SHELL.BTM... version 2.01 Prvt: N Read: N
Monday November 23 1992, Mike Dunnagan writes to Scott Wunsch:
SW> echos %@SUBSTR[%@LINE[{Month Filename
Here!!!!},%@EVAL[%@SUBSTR[%_DATE,...
SW> ...3,2]-1]],0,3]
^^^
Mike, if your using standard US dates (mm/dd/yy), you need to change the 3 to
a zero. The "**E" your seeing is the first three characters of the EOF
marker (**EOF**).
The Month.dat should be:
Jan
Feb
Mar
etc....
-=*Dave
--- DB 1.50/003118 & GoldED 2.40+
---
* Origin: Jackpot!! (1:128/86)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: KRIS VERBEECK Num: 93 Date: 11/20/1992
From: HUGO LANDSMAN Re: Time: 6:07 pm
Subj: Some Useful Aliases... Prvt: N Read: N
Hi Kris,
10 Nov 1992 17:42, Kris Verbeeck (2:292/877.5@fidonet.org) wrote to All:
KV> alias up=`cd ..`
alias down=`dir/bad>&>nul|cd %@line[con,0]`
alias next=`set _d=%@substr[%_cwd,%@len[%@path[%_cwd]]]^set
_f=%@unique[%temp]^dir../bad>&>nul>!%_f^for %f in (@%_f) (iff %f == %_d
then^set _n=1^elseiff %_n=1 then^cd %f^set _n=2^endiff)^del/q %_f^unset _f _n
_d`
groeten,
hugo
--- FastEcho 1.21/b5
* Origin: st. anna pbbs, nijmegen nl (2:512/154.5@fidonet.org)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: MIKE DUNNAGAN Num: 64 Date: 11/20/1992
From: DAYTON LIVINGSTON Re: Time: 11:20 am
Subj: Space.Btm Prvt: N Read: N
MD> Replying to _Dayton Livingston_ on the subject of Space.Btm:
MD> Could you post your version please. The original one I got
MD> here was missing some things in some of the SCRPUT lines. I
MD> don't know enought about it to hack it. Thanks.
No problem-o (below), though I think I've seen some variations
posted as well that you might find more interesting. Please note
that this has been modified so that no line is longer that 56
characters, so all lines ending with "..." must be joined to the
following lines (which begin with "...". Also high-ASCII
characters have been changed to low-ASCII for transmission in the
net. You may want to change them.
SPACE.BTM (as modified by Dayton Livingston):
___--8<----- CUT HERE -----8<-----
@ECHO OFF
:: Author : Mark Stiebel, 3:633/159
:: (The Gate - (03)879-9082) Written : 31/10/92
::
:: Please feel free to distribute and modify
::
:: There are a few things that could be modified and made better,
:: but as long as you specify a correct disk name, nothing can
:: go wrong. Have fun.
:: Check if the user wants help - not that he'd need it.
IF %@SUBSTR[%1,1,1] == h GOTO Usage
IF %@SUBSTR[%1,1,1] == ? GOTO Usage
IF %@SUBSTR[%1,0,1] == h GOTO Usage
IF %@SUBSTR[%1,0,1] == ? GOTO Usage
:: Get rid of the cursor, set values, and if no drive was
:: specified, use the default drive instead.
REM SETDOS /s0:0
Set c=4
Set drive=%1:
IF %1. == . SET drive=%_DISK:
:: If the selected drive is ready, work out how many blocks will
:: be needed (for the usage graph), and if not to go to the error
:: message.
CLS
IFF %@READY[%drive] == 1 THEN (
Set x=%@INT[%@EVAL[(%@DISKUSED[%drive,b]/%@DISKTOTAL...
...[%drive,b])*61]]
)
ELSE GOTO NotReady
ENDIFF
:: Draw the boxes and display the numerical stats.
DRAWBOX 1 3 9 63 2 whi on bla FILL BLA
DRAWBOX 1 30 3 63 1 whi on bla
DRAWBOX 3 3 7 63 1 whi on bla
DRAWBOX 1 3 9 63 2 whi on bla
SCRPUT 2 31 whi on bla SPACE.BTM - Mark Stiebel (c)1992
SCRPUT 2 6 whi on bla Statistics for drive %@UPPER[%drive]
SCRPUT 4 6 whi on bla Total space : %@DISKTOTAL[%drive,K] Kbytes
SCRPUT 5 6 whi on bla Used space : %@DISKUSED[%drive,K] Kbytes
SCRPUT 6 6 whi on bla Free space : %@DISKFREE[%drive,K] Kbytes
SCRPUT 4 34 whi on bla - %@DISKTOTAL[%drive,M] Mbytes
SCRPUT 5 34 whi on bla - %@DISKUSED[%drive,M] Mbytes
SCRPUT 6 34 whi on bla - %@DISKFREE[%drive,M] Mbytes
SCRPUT 4 48 whi on bla - 100`%`
SCRPUT 5 48 whi on bla - %@INT[%@EVAL[(%@DISKUSED...
...[%drive,b] / %@DISKTOTAL[%drive,b]) * 100]]`%`
SCRPUT 6 48 whi on bla - %@INT[%@EVAL[(%@DISKFREE...
...[%drive,b] / %@DISKTOTAL[%drive,b]) * 100]]`%`
:: Draw the usage bar. If anyone can find a quicker way
:: (preferably instantaeous) way to do this, can you please give
:: me a buzz.
REM :Bar
REM IFF %x gt %c THEN SCRPUT 8 %c bri whi on bla *
REM ELSE IFF %x le %c THEN SCRPUT 8 %c bri whi on bla -
REM ENDIFF
REM Set c=%@EVAL[%c +1]
REM IF %c lt 63 GOTO Bar
SET
b=%@SUBSTR[**************************************************...
...*********,0,%@EVAL[%x-4]]
SET b=%b%%@SUBSTR[-------------------------------------------...
...--------------,%@EVAL[%x-4]]
SCRPUT 8 5 WHI ON BLA %b ^ UNSET b
Goto End
:: The 'Drive Not Ready' error message
:NotReady
echo.
echo ERROR: Drive %drive Is not ready. Please insert a disk
echo or make sure that the hard drive is operational.
echo.
SETDOS /s10:100
QUIT
:: The 'Help' message
:Usage
TEXT
USAGE:
SPACE <drive>
Where <drive> is the drive letter. This may be specified
in upper or lower case.
SPACE.BTM will use current drive if none specified.
ENDTEXT
QUIT
:: unset all the environment variables used, restore the cursor,
:: and put it just below the output from the .BTM file.
:End
SCREEN 12 0
UNSET c x drive
REM SETDOS /s10:100
___--8<----- CUT HERE -----8<-----
- Dayton
* OLX 994 * Psychic convention cancelled due to unforeseen problems.
--- Maximus 2.00
* Origin: T.V. BBS - Glendale, AZ - (602) 930-8542 (1:114/148)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: BILL-STEVEN KERR Num: 107 Date: 11/21/1992
From: KLAUS KETTNER Re: Time: 3:12 pm
Subj: SPACE.BTM Prvt: N Read: N
Hi Bill-Steven !
I like your Batch a lot! It looks great - I've just added some lines,
so it shows now the amount of free DOS Memory (percentage of 640 kB).
Sorry for the German translation, but I didn't like to translate it
back to English.....
________________o
/_______________C_U_T__H_E_R_E______________________________
o \
@ECHO OFF
SETLOCAL
CLS
SCREEN 19 0
DRAWBOX 0 0 22 79 0 BRI BLA ON WHI FILL WHI
SCRPUT 22 1 BRI BLA ON WHI
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
SCRPUT 0 1 BRI WHI ON WHI
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
SCRPUT 0 78 BRI BLA ON WHI ▀
DRAWVLINE 0 0 23 0 BRI WHI ON WHI
SCRPUT 22 1 BRI WHI ON WHI ▄
DRAWBOX 2 2 14 37 0 RED ON WHI FILL RED
DRAWHLINE 1 2 11 0 RED ON WHI
DRAWHLINE 15 4 35 0 BRI BLA ON WHI
DRAWVLINE 3 38 13 0 BRI BLA ON WHI
DRAWVLINE 3 39 13 0 BRI BLA ON WHI
DRAWBOX 18 2 20 75 0 GRE ON WHI FILL GRE
DRAWHLINE 17 2 11 0 GRE ON WHI
DRAWHLINE 21 4 74 0 BRI BLA ON WHI
DRAWVLINE 19 76 2 0 BRI BLA ON WHI
DRAWVLINE 19 77 2 0 BRI BLA ON WHI
DRAWBOX 2 42 6 75 0 BLU ON WHI FILL BLU
DRAWHLINE 1 42 11 0 BLU ON WHI
DRAWHLINE 7 44 34 0 BRI BLA ON WHI
DRAWVLINE 3 76 5 0 BRI BLA ON WHI
DRAWVLINE 3 77 5 0 BRI BLA ON WHI
DRAWBOX 10 42 14 75 0 MAG ON WHI FILL MAG
DRAWHLINE 9 42 11 0 MAG ON WHI
DRAWHLINE 15 44 34 0 BRI BLA ON WHI
DRAWVLINE 11 76 5 0 BRI BLA ON WHI
DRAWVLINE 11 77 5 0 BRI BLA ON WHI
SCRPUT 1 4 BRI WHI ON RED GENERAL
SCRPUT 17 4 BRI WHI ON GRE MEMORY
SCRPUT 1 44 BRI WHI ON BLU DISK C:
SCRPUT 9 44 BRI WHI ON MAG DISK D:
SCRPUT 3 4 BRI WHI ON RED 4DOS Version : %_4ver
SCRPUT 4 4 BRI WHI ON RED DOS Version : %_dosver
SCRPUT 5 4 BRI WHI ON RED Alias-Platz : %_alias b
SCRPUT 6 4 BRI WHI ON RED Environment-Platz : %_env b
SCRPUT 7 4 BRI WHI ON RED Uhrzeit : %_time
SCRPUT 8 4 BRI WHI ON RED System-Datum : %_date
SCRPUT 9 4 BRI WHI ON RED Wochentag : %_dow
SCRPUT 10 4 BRI WHI ON RED Monitor Typ : %_monitor
SCRPUT 11 4 BRI WHI ON RED Video Karte : %@UPPER[%_video]
IFF "%_NDP"=="387" .AND. "%_CPU"=="486" THEN
SCRPUT 12 4 BRI WHI ON RED Co-Prozessor : 487
ELSE
SCRPUT 12 4 BRI WHI ON RED Co-Prozessor : %_ndp
ENDIFF
SCRPUT 13 4 BRI WHI ON RED Shell Level : %_shell
SCRPUT 3 44 BLA ON BLU ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
SCRPUT 11 44 BLA ON MAG ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
SCRPUT 19 4 BLA ON GRE
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
SCRPUT 5 44 BRI WHI ON BLU Belegt: %@diskused[c:,K] von %@disktotal[c:,K] Kb
SCRPUT 13 44 BRI WHI ON MAG Belegt: %@diskused[d:,K] von %@disktotal[d:,K]
Kb
DRAWHLINE 3 44
%@INT[%@EVAL[(%@INT[%@EVAL[(%@DISKUSED[c:]/%@DISKTOTAL[c:])*100]]/10)*3]] 0
WHI ON WHI
DRAWHLINE 11 44
%@INT[%@EVAL[(%@INT[%@EVAL[(%@DISKUSED[d:]/%@DISKTOTAL[d:])*100]]/10)*3]] 0
WHI ON WHI
DRAWHLINE 19 4 %@INT[%@EVAL[(%@INT[%@EVAL[(%@DOSMEM[k]/640)*100]]/10)*7.1]]
0 WHI ON WHI
SCRPUT 3 45 BRI WHI ON WHI
%@INT[%@EVAL[(%@DISKUSED[c:]/%@DISKTOTAL[c:])*100]]%
SCRPUT 11 45 BRI WHI ON WHI
%@INT[%@EVAL[(%@DISKUSED[d:]/%@DISKTOTAL[d:])*100]]%
SCRPUT 19 5 BRI WHI ON WHI %@INT[%@EVAL[(%@DOSMEM[k]/640)*100]]%
SCRPUT 3 47 BRI WHI ON WHI `%`
SCRPUT 11 47 BRI WHI ON WHI `%`
SCRPUT 19 7 BRI WHI ON WHI `%`
SCRPUT 19 9 BRI WHI ON WHI (%@dosmem[b] Byte)
:EXIT
SCREEN 23 0
ENDLOCAL
________________o
/_______________C_U_T__H_E_R_E______________________________
o \
Salve .....
KLAUS
--- Yuppie! v2.10
* Origin: IF %@EVAL[2+2] NE 4 THEN SET WINDOWS=TRUE... [4.01D] (2:2400/26.6)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/28/1992
To: MAYNARD HOGG Num: 95 Date: 11/20/1992
From: HUGO LANDSMAN Re: Time: 6:31 pm
Subj: Space.Btm 1/2 Prvt: N Read: N
Hi Maynard,
06 Nov 1992 16:31, Maynard Hogg (6:730/9) wrote to Mark Stiebel:
>MS>::SETDOS /s0:0
MH> At this point, you should save the current cursor shape, but I've
MH> forgotten how. <sigh> I've therefore disabled it so that others don't
You again? ;-) Watch:
SETLOCAL
SETDOS | FIND "CURSOR" >tmpfile
SET /r tmpfile ^ rem silly SET won't read stdin :-(
DEL /q tmpfile
: insert batch file here
:END
SETDOS /s%[CURSOR OVERSTRIKE]:%[CURSOR INSERT]
ENDLOCAL
regards,
hugo
--- FastEcho 1.21/b5
* Origin: st. anna pbbs, nijmegen nl (2:512/154.5@fidonet.org)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/30/1992
To: ALL Num: 78 Date: 11/26/1992
From: PHI NGUYEN Re: Time: 8:42 pm
Subj: Filter.btm Prvt: N Read: N
:: FILTER.BTM - Use to delete identical filenames entries.
::
:: Created by Phi P. Nguyen on 11/10/1992
::
:: Usage: I have 2 file lists from two BBSes and I don't
:: want to download the same file from both boards.
:: This BTM will do just that. Since both listings
:: will be combine into one, make sure you know
:: the different between lines from two listings.
::
:: Note: This BTM makes use of DOS' SORT command. Replace
:: 'c:\dos\sort' with whatever.
::
:: Also, If there are chars inside the listings such
:: as commas which 4DOS' function 'substr' chokes on
:: then you will see a 'Syntax Error' on the screen.
::
:: This BTM will only comparing the first 12 chars.
:: Or it can be set via environment variable Length
::
@echo off
iff '%1'=='' then
text
FILTER.BTM V1.0 - Phi P. Nguyen 1992
Syntax: FILTER File_to_be-filter
or FILTER File1 File2 Output_File
where File1 and File2 will be combined into Output_File
and Output_File will be filtered. If Output_File is
not specified then OUTPUT.TXT will be used.
endtext
quit
else iff '%2' NE '' then
iff not exist %1 .OR. not exist %2 then
echoError! Input file(s) does not exist!
quit
endiff
iff '%3'=='' then
set Output=OUTPUT.TXT
else
set Output=%3
endiff
iff exist %Output then
echoWarning: File --%Output-- existed!
set key=N
inkey /k"YN" Do you want to overwrite this ...
...file? (Y/N) %%key
if '%key'=='N' (unset /q key Output^quit)
set key=
endiff
-----Continue Next Message
--- TosScan 1.00
* Origin: Carolina Forum (704)568-1663 *IBM/AMIGA/MAC* 1031 Meg (1:379/10)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 11/30/1992
To: ALL Num: 79 Date: 11/26/1992
From: PHI NGUYEN Re: Time: 8:43 pm
Subj: Filter.btm continue Prvt: N Read: N
copy /q %1 + %2 %Output
%0 %Output
quit
else
iff not exist %1 then
echoError! File --%1-- does not exist!
unset /q Output
quit
endiff
echo.
echo FILTER.BTM V1.0 - Phi P. Nguyen 1992
echo.
set Output=%@unique[%_CWD]
if '%Length'=='' set Length=12
set Max=%@LINES[%1]
echo File: %@UPPER[%1] Size: %@FILESIZE[%1,b] by...
...tes Lines: %@EVAL[%Max + 1]
echo.
set i=0
set Count=0
set Old_File=*
echos Sorting.....
c:\dos\sort < %1 > %Output
iff '%1' NE 'OUTPUT.TXT' then
if exist %@name[%1].BAK del /q %@name[%1].BAK
ren /q %1 %@name[%1].BAK
else
del /q %1
endiff
ren /q %Output %1
echo Begin filtering....
:Loop
iff %i LE %Max then
set Cur_Line=%@line[%1, %i]
set Filename=%@lower[%@substr...
...[%Cur_Line, 0, %Length]]
iff %Filename NE %Old_File then
echo %Cur_Line >> %Output
set Old_File=%Filename
echos o
else
echos .
set Count=%@EVAL[%Count + 1]
endiff
set i=%@eval[%i + 1]
goto Loop
else
del /q %1
ren /q %Output %1
echo.
echo.
echo Result: %Count duplicated entries found ...
...and removed.
echo.
unset /q Output Old_File Cur_Line i Max ...
...Filename Length Count
quit
endiff
:: End-of-File
--- TosScan 1.00
* Origin: Carolina Forum (704)568-1663 *IBM/AMIGA/MAC* 1031 Meg (1:379/10)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/01/1992
To: DAYTON LIVINGSTON Num: 111 Date: 11/28/1992
From: DOUGLAS KING Re: Time: 1:12 am
Subj: Boxer Prvt: N Read: N
DL=>The only difference I saw there was that it allowed vertical
DL=>splits as well as horizontal ones. Otherwise, QEdit does the
DL=>same thing (only it doesn't waste space with all the fancy lines
DL=>used as separators).
In Boxer v4.0 you can tell it to omit the fancy windows.
Unless you're using a rodent they are not too helpful. I
use a rodent for block marking and for little used menu
functions.
DL=>Can't relate to that at all. I WANT my backups in the same
DL=>directory, not hidden away somewhere where I'll rarely remember
DL=>to go to and delete them. But then, I also have QEdit prompt me
DL=>after every use about what I want to do with the backup, and I
DL=>back up my hard drive on a near-nightly basis. (Automated.)
If you want the backups in the current directory just
eliminate the boxer backup dir. It will then put all
backups in the same dir as the original file.
DL=>Yup! Thanks for the tip. It's quite a good program, just not
DL=>suited to my personal tastes. Wouldn't mind switching myself
DL=>except for the limited macros, the slow read/write & execution
DL=>times, and the putting of tabs into text files that I'm going to
DL=>want to run as BTM's (I think that last one is fixable - not
DL=>sure). Might even be able to live with only 26 macros if he
DL=>could speed it up, put in the scrolling and the large file
DL=>capability. I'll be keeping my eye out for newer versions now!
I find the new boxer to be quicker. It takes only about 5.5
seconds to load in a 165k file and exit. I also have a slow
hard drive. eg. It takes 5.85 seconds to load telemate and
exit it. I don't find a mere 26 macros limiting when I have
26 clipboards at my disposal.
The scrolling is there now and large files can be taken care
of also. BTW, I've NEVER seen a 1Mb .btm file. [grin] If
you find the new and improved [advertising anyone?][grin]
boxer is for you, great. If you don't, I'm just glad that
Qedit works so well for you. Have a great time. For me
it's real nice to find this editor. I see you're using OLX
for a reader. Write a .btm to access Boxer instead of the
built in editor. I find boxer to be much nicer as a mail
editor. I just hit ^S and it runs a spelling check then I
reformat the text to take care of any line length changes
made by share spell. Here's my .btm file:
:: B.BTM
:: access Boxer from 1st reader or Offline 1.42.
pushd
keystack /w12 @99 /w2 "s" /w2 13 /w2 @98 /w2 @97 "60" 13
b.exe %&
popd
real simple, but it works wonders.
* 1st 1.01 #742 + Support your right to keep and arm bears!
--- Maximus 2.01wb
* Origin: C.R.I.M.E. BBS Mail Central of Ottawa, CANADA (1:163/407)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/01/1992
To: ARTTU YL{RAKKOLA Num: 124 Date: 11/25/1992
From: JASEN BETTS Re: Time: 12:20 am
Subj: Group Describe Prvt: N Read: N
AY>> PROG1.ZIP .. PROG4.ZIP
AY>> And I wanted to describe them:
AY>> PROG1.ZIP Program 1/4
TS>> For %a in (1 2 3 4) *describe prog%a.zip "Program %a/4"
AY> Thanks, but that works only if there's 4 packets.
I'm sure you can see what to change :-) or has it got to be automated??
try this.
:::: numdesc.btm ::::makes numbered descriptions:::
@echo off
if %# gt 1 goto main
echo %@name[%0]
echo generates numbered descriptions for multipart archives etc
echo useage:
echo %@name[%0] Wildspec description
endtext
quit
:main
setlocal
dir /b %1| set numprogs=%@lines[con] ^ rem count the files
set numprogs=%@eval[%numprogs%+1]
set counter=1
dir /b %1 | for %q in (%1) do (
describe %@line[con,0] "%2& %counter%/%numprogs%"
set counter=%@eval[%counter%+1]
)
endlocal
::::::::::::::::::::::::::::::::::::::::::::::::::::
(the "dir /b %1 | for .... " bit is because there's no guarantee that
for will get the files in the right order whereas dir sorts them :-)
but the for is used as a means to loop through the right number of
repitions)
--- Maximus 2.01wb
* Origin: Mirth Control Chch, NZ 64-3-3890898 v32b/v42b/FAX (3:770/140)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/01/1992
To: SCOTT WUNSCH Num: 126 Date: 11/25/1992
From: JASEN BETTS Re: Time: 2:19 pm
Subj: SHELL.BTM... version 2.0 Prvt: N Read: N
SW> Remember that SHELL.BTM that was originally posted by
SW>Mark Stiebel? Well, I think I have improved it. And now
SW>I've even fixed my improvements ;). By using aliases to
SW>implement its ON, OFF and END commands, it no longer has to
SW>do very much with the commands you enter. Hopefully this
SW>will allow things like variable functions and multiple
SW>commands (^) to work properly. Anyhow, here it is...
hmm, I've got one minor mod...
your month-word expression:
echos %@SUBSTR[%@LINE[D:\BATCH\MONTHS.DAT,%@EVAL[%@SUBSTR[...
...%_DATE,3,2]-1]],0,3]
becomes
echos %@WORD[%@SUBSTR[%_date,3,2], x Jan Feb Mar Apr May Jun...
...Jul Aug Sep Oct Nov Dec]
which is slightly faster and doesn't need an external file or a pipe.
--- Maximus 2.01wb
* Origin: Mirth Control Chch, NZ 64-3-3890898 v32b/v42b/FAX (3:770/140)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/02/1992
To: TONY PATER Num: 88 Date: 11/29/1992
From: WILLIAM HUGHES Re: Time: 5:42 pm
Subj: 1/3 Standard mail arc Prvt: N Read: N
TP> Gentlemen,
Who, me?
TP> Perhaps you could help !
Maybe...
TP> Problem: Some Bulletin Boards "insist" on using a specific archival
TP> mail packet format (eg. LZH or ZIP or ARJ) for QWK packets
TP> [god knows why!). Perforce, I recourse to using 3
TP> different offline-mail reader setups ?
TP> Required: 4DOS alias/BTM that will :
TP> 1. Interrogate what archiver was used in the
TP> downloaded mail packet.
TP> 2. Convert it (ie.standardise) to one format (say ZIP)
What offline reader are you using? SLMR will let me define up to four
archive formats, and will automatically match the reply packet format
with the downloaded mail packet format. If the reader you are using
does not allow this option, the following might be useful; at least, it
may give you some ideas that you can use. This BTM has not been tested.
All archivers (I believe) return an errorlevel. Try 'interrogating' the
packet with a view function (ARJ V, LHA V, PKUNZIP -V) redirected to NUL
and then act on the errorlevel.
:: -----------------------------------------------------------------------
:: File : MAILCONV.BTM version 1.0 [untested]
:: Purpose : Convert multiple formats of offline reader packets
:: to a single archive format
:: Parameters : MAILCONV [function] [mail packet name]
:: Comments : Untested; no warranty implied
:: Modify as necessary
:: Author : William W. Hughes at Fido 1:387/255
:: usenet whughes@lonestar.utsa.edu
:: for Tony Pater at Fido 3:712/619
:: Date : Sun, 29 Nov 92
::----------------------------------------------------------------------
:: Notes: in this listing, the following directories are used
::
:: C:\ZZ - download and upload directory
:: C:\Z - work directory
:: C:\SLMR\MAIL - offline reader mailpacket directory
:: (These are my directories -- feel free to change)
::
:: It is assumed that ZIP is the archive format of the reader you are
:: using, and that you do not want to keep the original, unconverted
:: mail packet. However, the converted mail packet & the original,
:: unreconverted reply packets are kept in the C:\SLMR\MAIL
:: directory. In simpler terms:
::
:: 1. Download mail packet in ARJ format to download directory
:: 2. Convert ARJ format mailpacket in download directory to
:: ZIP format mail packet in mail reader directory
:: 3. Delete ARJ format mail packet from download directory
:: 4. Read and reply to mail
:: 5. Convert ZIP format reply packet in mail reader directory
:: to ARJ format reply packet in upload directory
:: 6. Upload ARJ format reply packet, then delete it (manually)
::
:: It is also assumed that the reply packet keeps the same
:: name as the mail packet; i.e. NUL-RBBS.REP is a reply packet for
:: NUL-RBBS.QWK -- I rename my packets to the date I downloaded them,
:: so today's mail packet will be 921129.QWK, while the reply packet
:: containing this message will be 921126.REP [I'm a bit behind on my
:: echomail :-) ].
::
:: The routine for autoconverting the packet name is left to the
:: student.
::
:: Finally. lines that end in ellipses (...) and following lines that
:: begin the same way should be joined into one line.
[End part 1 of 3]
* SLMR 2.1a *
--- MsgToss 2.0b (r)
* Origin: Nul 512-615-NUL1 HST/V32b,615-NUL2, NUL3, 1.2Gig (1:387/255)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/02/1992
To: TONY PATER Num: 89 Date: 11/29/1992
From: WILLIAM HUGHES Re: Time: 5:42 pm
Subj: 2/3 Standard mail arc Prvt: N Read: N
[Begin part 2 of 3]
setlocal
echo off
cls
if %1==M goto Mail
if %1==R goto Reply
goto Help
:: Part A - convert downloaded mail packet to standard archiver
: Mail
:: Step 1 - Check mail packet format, set function flag ArcType,
:: and goto conversion routine
arj v C:\ZZ\%2 > nul
if %?==0 set ArcType=A ^ goto Convert
lha v C:\ZZ\%2 > nul
if %?==0 set ArcType=L ^ goto Convert
pkunzip -v C:\ZZ\%2 > nul
if %?==0 set ArcType=Z ^ goto Convert
goto Error
:: Step 2 - Execute the conversion, based on ArcType flag
:Convert
echo Converting mailpacket %2 to ZIP format.
echo.
:: Unarchive original mail packet
iff %ArcType==A then
arj e C:\ZZ\%2 C:\Z > nul
elseiff %ArcType==L then
lha e C:\ZZ\%2 C:\Z > nul
else
pkunzip C:\ZZ\%2 C:\Z > nul
endiff
:: Rearchive in preferred format, moving to offline reader
:: directory in the process
pkzip -m C:\SLMR\MAIL\%@name[%2].QWK C:\Z\*.* > nul
:: Create a 0-length flagfile in the mail reader directory to
:: control the later conversion of the reply packet
>C:\SLMR\MAIL\%@name[%2].%ArcType
:: Delete original, unconverted mail packet
del C:\ZZ\%2 > nul
echo Conversion completed. %@name[%2].QWK now resides in...
... C:\SLMR\MAIL.
echo.
goto Coda
:: Part B - convert reply packet to archive format required
:: by the BBS
:Reply
:: Unarchive reply packet to work directory
pkunzip C:\SLMR\MAIL\%@name[%2].REP C:\Z > nul
[End part 2 of 3]
* SLMR 2.1a *
--- MsgToss 2.0b (r)
* Origin: Nul 512-615-NUL1 HST/V32b,615-NUL2, NUL3, 1.2Gig (1:387/255)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/02/1992
To: TONY PATER Num: 90 Date: 11/29/1992
From: WILLIAM HUGHES Re: Time: 5:44 pm
Subj: 3/3 Standard mail arc Prvt: N Read: N
[Begin part 3 of 3]
:: Rearchive in the format preferred by the BBS, moving it to the
:: upload directory in the process
iff exist C:\SLMR\MAIL\%@name[%2].A then
arj m C:\ZZ\%@name[%2].REP C:\Z\*.* > nul
elseiff exist C:\SLMR\MAIL\%@name[%2].L then
lha m C:\ZZ\%@name[%2].REP C:\Z\*.* > nul
elseiff exist C:\SLMR\MAIL\%@name[%2].Z then
pkzip -m C:\ZZ\%@name[%2].REP C:\Z\*.* > nul
else
goto Error
endiff
:: Delete ArcType flagfile to indicate that reply packet has been
:: re-converted for the BBS
del C:\SLMR\MAIL\%@name[%2].? > nul
echo Conversion completed. %@name[%2].REP now resides in...
... upload directory C:\ZZ.
echo.
goto Coda
:: Program error
echo ERROR! Unknown archive format!
echo.
echo Human assistance required!
echo.
goto Coda
:: Program Help
:Help
TEXT
The correct syntax for this command is:
MAILCONV x filename.ext
where x is M to indicate a conversion from downloaded
mail packet to standardised archive
format
or R to indicate a conversion from standardised
reply packet to BBS-compatible archive
format
filename.ext is the name of the mail packet, without
path information
ENDTEXT
:Coda
endlocal
::----------------------------------------------------------------------
TP> PS. Though I enjoy this echo - where do you all get the time to
TP> devise these solutions to conundrums ?
Some of us are computer professionals who use 4DOS regularly and have
developed techniques for doing these things. Others just like to solve
puzzles. One of us is the author of 4DOS.
Hope this helped.
Bill
@B-{)}>
* SLMR 2.1a *
--- MsgToss 2.0b (r)
* Origin: Nul 512-615-NUL1 HST/V32b,615-NUL2, NUL3, 1.2Gig (1:387/255)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/02/1992
To: ALL Num: 80 Date: 11/28/1992
From: SEAN SULLIVAN Re: Time: 11:17 am
Subj: delmsg.btm Prvt: N Read: N
Hello All!
This is something I wrote to allow me to del all but my mail for my FIDO echo
subs. It seems a little rough to me, but it works. I starts by reading my
AREAS.BBS file to create a menu to let me choose which area to purge and how
many messages to keep and creates a TEMP.BBS file. It then uses SGREP to
search for any *.msg files with my name in them and marks them READ-ONLY. I
then call ECHOMGRC to delete only the files from the specified area leaving
all my mail untouched. I tried to have ECHOMGR renumber the messages using
the /r parm, but it gets a runtime error. At the end, the READ-ONLY attrib
is turned off. Anybody got any suggestions on making this tighter, faster,
etc let me know.
---------------------------------- CUT HERE ---------------------------------
:DELMSG - A echomail messaged purge 4DOS batch file.
: Deletes all but your personal mail for any specified message sub
:----------------------------------------------------------------------------
cls
set numitems=%@LINES[c:\fd\qm\areas.bbs]
set item=1
:menu
set sel=%@NAME[%@WORD[0,%@LINE[c:\fd\qm\areas.bbs,%item]]]
set area=%@WORD[1,%@LINE[c:\fd\qm\areas.bbs,%item]]
echo %item ) %area >> menu.dat
set item=%@EVAL[%item+1]
if %item==%numitems goto which_1
goto menu
:which_1
type menu.dat
echo ------------------------------
input Enter area to prune: %%a
input Enter number of msg to save: %%numsave
set sub=%@NAME[%@WORD[0,%@LINE[c:\fd\qm\areas.bbs,%a]]]
set fido=%@WORD[1,%@LINE[c:\fd\qm\areas.bbs,%a]]
echo searching %fido area for your mail...hold a minute!
sgrep -f "sean&sullivan" c:\fd\echo\%sub\*.msg > temp.dat
echo C:\FD\ECHO\%sub %fido %numsave > temp.bbs
echo starting to mark your mail "read-only"
set numhits=%@LINES[temp.dat]
if %numhits==-1 then goto byebye
:loop
if %numhits LT 0 goto del_time
set record=%@LINE[temp.dat,%numhits]
set hit=%@WORD[0,%record]
iff "%hit"=="***FILE-NAME:" then
set file=%@WORD[-0,%record]
echo %file now read-only...
attrib +r %file > nul
endiff
set numhits=%@EVAL[%numhits-1]
goto loop
:del_time
echo starting deletions...
c:\fd\qm\echomgrc /f=temp.bbs
del temp.bbs temp.dat menu.dat > nul
attrib -r %@PATH[%file]*.*
:byebye
------------------------------- CUT HERE ----------------------------------
Sean
--- GoldED 2.40.P0623
* Origin: COMNET Point #28 [Watervliet, NY] (1:267/113.28)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/02/1992
To: HUGO LANDSMAN Num: 85 Date: 11/28/1992
From: SIMON JOSEFSSON Re: Time: 11:47 am
Subj: Some Useful Aliases... Prvt: N Read: N
* In a msg on 20 Nov (18:07), hugo landsman of 2:512/154.5@fidonet.org
writes:
KV>> alias up=`cd ..`
hl> alias down=`dir/bad>&>nul|cd %@line[con,0]`
hl> alias next=`set _d=%@substr[%_cwd,%@len[%@path[%_cwd]]]^set
hl> _f=%@unique[%temp]^dir../bad>&>nul>!%_f^for %f in (@%_f) (iff %f == %_d
hl> then^set _n=1^elseiff %_n=1 then^cd %f^set _n=2^endiff)^del/q %_f^unset
_f
hl> _n _d`
Great! Great!!! I like'em, did some rework and come up with this... first
DOWN.BTM:
_ _ _ O / _ _ C_U_T_ H_E_R_E_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
O \
@echo off
::
:: last updated: 11/28/92 sj (based on Hugo Landsmans alias, thanks!)
:: DOWN - Jumps to the first directory below the current one.
::
*dir/bad>&>nul|set _f=%@line[con,0]
if %@WORD[0,%_f]! eq **EOF**! (Echo No directories found^quit)
*cd %_f
_ _ _ O / _ _ C_U_T_ H_E_R_E_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
O \
And then for the NEXT.BTM:
_ _ _ O / _ _ C_U_T_ H_E_R_E_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
O \
@echo off
::
:: last updated: 11/28/92 sj (based on Hugo Landsmans alias, thanks!)
:: NEXT - Jumps to the directory next to the current one. ::
set _d=%@substr[%_cwd,%@len[%@path[%_cwd]]]
set _f=%@unique[%temp]
*dir../bad>&>nul>!%_f
if %_d! == ! (*cd %@line[%_f,0]^quit)
for %f in (@%_f) do (
iff %@WORD[0,%f]! == %_d! then
set _n=1
elseiff %_n=1 then
*cd ..\%f
set _n=2
endiff)
del/q %_f
unset/q _f _n _d
_ _ _ O / _ _ C_U_T_ H_E_R_E_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
O \
Note! The Temp-variable should preferable point to a ramdisk.. or, replace
the %temp variable with for instance 'e:\'
// JaS
--- msgedsq/2 2.1
* Origin: Simon Josefsson - Sweden, Stockholm. (2:201/111.34)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/02/1992
To: HERMOD PEDERSEN Num: 92 Date: 11/26/1992
From: BILL-STEVEN KERR Re: Time: 6:55 pm
Subj: SYSINFO.BTM Prvt: N Read: N
> I've tried your BTM and it works great - up to one
> point. At the bottom
> line (the white border) I get the following:
> Unknown command "
> and then the rest of the line is bright white, as I
> suppose it should be.
I've searched for this Hermod and can't find anything, what version of 4DOS
are you using?
> One more item:
> I'm running three hard drives, two RLL's and one IDE
> with the help of the
> 3_Drives program. How could the third drive be
> incorporated??
Here's sysinfo for three drives - (C, D and E)
--------------------- SNIP HERE -----------
:: Sysinfo.btm - three drives version - by Steven Kerr '92
:: Email - Fido : 2:259/27.5
:: Usenet : bill-steven.kerr@almac.co.uk
::
@ECHO OFF
SETLOCAL
CLS
SCREEN 19 0
:: //
DRAWBOX 2 0 18 79 0 BRI BLA ON WHI FILL WHI
SCRPUT 18 1 BRI BLA ON WHI ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄...
...▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
SCRPUT 2 1 BRI WHI ON WHI ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀...
...▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
SCRPUT 2 78 BRI BLA ON WHI ▀
DRAWVLINE 2 0 17 0 BRI WHI ON WHI
SCRPUT 18 1 BRI WHI ON WHI ▄
:: //
DRAWBOX 4 2 16 37 0 RED ON WHI FILL RED
DRAWHLINE 3 2 11 0 RED ON WHI
DRAWHLINE 17 4 35 0 BRI BLA ON WHI
DRAWVLINE 5 38 13 0 BRI BLA ON WHI
DRAWVLINE 5 39 13 0 BRI BLA ON WHI
:: //
DRAWBOX 4 42 16 75 0 BLU ON WHI FILL BLU
DRAWHLINE 3 42 11 0 BLU ON WHI
DRAWHLINE 17 44 34 0 BRI BLA ON WHI
DRAWVLINE 5 76 13 0 BRI BLA ON WHI
DRAWVLINE 5 77 13 0 BRI BLA ON WHI
SCRPUT 3 4 BRI WHI ON RED GENERAL
:: //
SCRPUT 5 4 BRI WHI ON RED 4DOS Version No. : %_4ver
SCRPUT 6 4 BRI WHI ON RED DOS Version No. : %_dosver
SCRPUT 7 4 BRI WHI ON RED Alias Free : %_alias b
SCRPUT 8 4 BRI WHI ON RED Environment Free : %_env b
SCRPUT 9 4 BRI WHI ON RED System Time : %_time
SCRPUT 10 4 BRI WHI ON RED System Date : %_date
SCRPUT 11 4 BRI WHI ON RED Day of the week : %_dow
SCRPUT 12 4 BRI WHI ON RED Monitor Type : %_monitor
SCRPUT 13 4 BRI WHI ON RED Video Card : %@UPPER[%_video]
IFF "%_NDP"=="387" .AND. "%_CPU"=="486" THEN
SCRPUT 14 4 BRI WHI ON RED Maths Copro. : 487
ELSE
SCRPUT 14 4 BRI WHI ON RED Maths Copro. : %_ndp
ENDIFF
SCRPUT 15 4 BRI WHI ON RED Shell level : %_shell
:: //
SCRPUT 5 44 BLA ON BLU ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
SCRPUT 9 44 BLA ON BLU ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
SCRPUT 13 44 BLA ON BLU ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
SCRPUT 7 44 BRI WHI ON BLU ...
...%@diskused[c:,M] of %@disktotal[c:,M] Mb used on C:
SCRPUT 11 44 BRI WHI ON BLU ...
...%@diskused[d:,M] of %@disktotal[d:,M] Mb used on D:
SCRPUT 15 44 BRI WHI ON BLU ...
...%@diskused[e:,M] of %@disktotal[e:,M] Mb used on E:
DRAWHLINE 5 44 %@INT[%@EVAL[(%@INT[%@EVAL[(%@DISKUSED[C:]...
.../%@DISKTOTAL[C:])*100]]/10)*3]] 0 WHI ON WHI
DRAWHLINE 9 44 %@INT[%@EVAL[(%@INT[%@EVAL[(%@DISKUSED[D:]...
.../%@DISKTOTAL[D:])*100]]/10)*3]] 0 WHI ON WHI
DRAWHLINE 13 44 %@INT[%@EVAL[(%@INT[%@EVAL[(%@DISKUSED[E:]...
.../%@DISKTOTAL[D:])*100]]/10)*3]] 0 WHI ON WHI
SCRPUT 5 45 BRI WHI ON WHI %@INT[%@EVAL[(%@DISKUSED[C:]...
.../%@DISKTOTAL[C:])*100]]%
SCRPUT 9 45 BRI WHI ON WHI %@INT[%@EVAL[(%@DISKUSED[D:]...
/%@DISKTOTAL[C:])*100]]%
SCRPUT 13 45 BRI WHI ON WHI %@INT[%@EVAL[(%@DISKUSED[E:]...
.../%@DISKTOTAL[D:])*100]]%
SCRPUT 5 47 BRI WHI ON WHI `%`
SCRPUT 9 47 BRI WHI ON WHI `%`
SCRPUT 13 47 BRI WHI ON WHI `%`
:: //
:EXIT
SCREEN 19 0
ENDLOCAL
------------------ SNIP HERE -----------
I Just re-chopped this out of this message and joined up the ...'s and all
works fine. Hope this one works fine, but I can't see why the other one did
not, other's reported no problems at all. Glad you liked it :-)
Steven.
Fidonet : 2:259/27.5
Usenet : bill-steven.kerr@almac.co.uk
--- FMail 0.90
* Origin: Bill-Steven Kerr, Mid Calder, SCOTLAND (2:259/27.5)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/03/1992
To: MAYNARD HOGG Num: 150 Date: 12/01/1992
From: FURLAN PRIMUS Re: Time: 1:04 pm
Subj: Dump.Btm Prvt: N Read: N
here's something i use to dump files off to a flopy disk:
setlocal
alias dump2a=`if %@filesize[%1] lt %@diskfree[a:] move %1 a:`
keystack "*" 13
select /ozr /a-d dump2a (*.*)
endlocal
--------------------
i call it dump.btm :-)
omit the keystack line for manual selection
ciao,
fl
--- timEd/B5
* Origin: old age = you + 20 years. (1:141/590)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/03/1992
To: MARK STIEBEL Num: 121 Date: 11/30/1992
From: MAYNARD HOGG Re: Time: 8:32 am
Subj: Saving Cursor Prvt: N Read: N
Upgrading to V4.01D broke my version of SPACE.BTM! The CURSOR
specifications are now one line lower! To remain backwardly compatible
and to guard against future incidents, I have therefore added an
FGREP. Those who are totally deprived can use DOS FIND.
rem Save cursor shape.
rem The fgrep became necessary because of a change in SETDOS layout
rem between 4.0B and 4.01D.
setdos |c:\bin\fgrep -s CURSOR >&>nul |
...set curshape=%@substr[%@line[con,0],18]:%@substr[%@line[con,0],14]
setdos /s0:0
:
:
:End
SCREEN 12 0
color %oldfb
setdos /s%curshape
quit %du
* SPEED 1.10 [NR] *
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/04/1992
To: PHI NGUYEN Num: 159 Date: 11/30/1992
From: SCOTT WUNSCH Re: Time: 8:40 pm
Subj: Projects Prvt: N Read: N
Salutations, Phi!
On 26 Nov 92, Phi Nguyen entered the following ASCII codes for the express
viewing pleasure of Saul Levy...
PN> BTW Do you think you can design a routine that will return an random
PN> number? I think it can be done using @substr and time.
Oh, that's too easy ;). This...
ALIAS RND=SET R=%@EVAL[%@SUBSTR[%_TIME,6,2] %% %1]
...should be good enough for most applications. First (and only) parameter
gives the high end range. Lowest value is 0.
/\ LLAP...
> \ cott \\'unsch <
\/
--- GoldED 2.40
* Origin: Pointedly pointless point. -=- Regina, Sask, Canada
(1:140/23.1701)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/04/1992
To: KLAUS KETTNER Num: 154 Date: 11/28/1992
From: TONY DUNLAP Re: Time: 3:40 pm
Subj: SPACE.BTM Prvt: N Read: N
> Hi Bill-Steven !
> I like your Batch a lot! It looks great - I've just
> added some lines,
> so it shows now the amount of free DOS Memory
> (percentage of 640 kB).
Try something like the following. (I had to put it into a debug script
because it contains hi-bit characters.)
Save this message to a file, edit off everything above the line "N USAGE.BTM"
then exit and at your DOS prompt type
"DEBUG<file"
You can either type "USAGE" or "USAGE d:" where d: is the drive letter (with
the colon).
N USAGE.BTM
E 0100 53 45 54 4C 4F 43 41 4C 0D 0A 53 45 54 20 41 3D B0 B0 B0 B0 B0
E 0115 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0
E 012A B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0
E 013F B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0
E 0154 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 0D 0A 53 45 54 20 42 3D DB
E 0169 DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB
E 017E DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB
E 0193 DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB
E 01A8 DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB 0D 0A 53 45 54
E 01BD 20 44 55 53 41 47 45 3D 25 40 53 55 42 53 54 52 5B 25 42 2C 30
E 01D2 2C 25 40 49 4E 54 5B 25 40 45 56 41 4C 5B 2E 38 2A 25 40 44 49
E 01E7 53 4B 55 53 45 44 5B 25 31 2C 4B 5D 2F 25 40 44 49 53 4B 54 4F
E 01FC 54 41 4C 5B 25 31 2C 4B 5D 2A 31 30 30 5D 5D 5D 0D 0A 53 45 54
E 0211 20 44 55 53 41 47 45 3D 25 44 55 53 41 47 45 25 25 40 53 55 42
E 0226 53 54 52 5B 25 41 2C 30 2C 25 40 45 56 41 4C 5B 38 30 2D 25 40
E 023B 4C 45 4E 5B 25 44 55 53 41 47 45 5D 5D 5D 0D 0A 45 43 48 4F 20
E 0250 44 52 49 56 45 20 25 31 0D 0A 45 43 48 4F 53 20 25 44 55 53 41
E 0265 47 45 0D 0A 45 43 48 4F 53 20 C3 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4
E 027A C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C4 C5
E 028F C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4
E 02A4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4
E 02B9 C4 C4 C4 C4 C4 B4 20 0D 0A 45 43 48 4F 53 20 31 20 20 20 20 20
E 02CE 31 30 20 20 20 20 20 20 32 30 20 20 20 20 20 20 33 30 20 20 20
E 02E3 20 20 20 34 30 20 20 20 20 20 20 35 30 20 20 20 20 20 20 36 30
E 02F8 20 20 20 20 20 20 37 30 20 20 20 20 20 20 38 30 20 20 20 20 20
E 030D 20 39 30 20 20 20 20 20 31 30 30 0D 0A 45 43 48 4F 2E 0D 0A 45
E 0322 43 48 4F 20 44 4F 53 20 4D 45 4D 4F 52 59 0D 0A 53 45 54 20 4D
E 0337 55 53 41 47 45 3D 25 40 53 55 42 53 54 52 5B 25 42 2C 30 2C 25
E 034C 40 49 4E 54 5B 25 40 45 56 41 4C 5B 38 30 2D 28 2E 38 2A 25 40
E 0361 44 4F 53 4D 45 4D 5B 4B 5D 2F 36 34 30 2A 31 30 30 29 5D 5D 5D
E 0376 0D 0A 53 45 54 20 4D 55 53 41 47 45 3D 25 4D 55 53 41 47 45 25
E 038B 25 40 53 55 42 53 54 52 5B 25 41 2C 30 2C 25 40 45 56 41 4C 5B
E 03A0 38 30 2D 25 40 4C 45 4E 5B 25 4D 55 53 41 47 45 5D 5D 5D 0D 0A
E 03B5 45 43 48 4F 53 20 25 4D 55 53 41 47 45 0D 0A 45 43 48 4F 53 20
E 03CA C3 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4
E 03DF C4 C5 C4 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4
E 03F4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4
E 0409 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 B4 20 0D 0A 45
E 041E 43 48 4F 53 20 31 20 20 20 20 20 31 30 20 20 20 20 20 20 32 30
E 0433 20 20 20 20 20 20 33 30 20 20 20 20 20 20 34 30 20 20 20 20 20
E 0448 20 35 30 20 20 20 20 20 20 36 30 20 20 20 20 20 20 37 30 20 20
E 045D 20 20 20 20 38 30 20 20 20 20 20 20 39 30 20 20 20 20 20 31 30
E 0472 30 0D 0A 0D 0A
Rcx
0377
W
Q
--- GEcho 1.00
* Origin: DISCOVER (1:2220/30.1)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/06/1992
To: ALL Num: 131 Date: 12/03/1992
From: DAYTON LIVINGSTON Re: Time: 5:17 pm
Subj: %@SUBSTR tip - Filenames Prvt: N Read: N
Hiya folks... Just working on a BTM here and found a shortcut to
displaying filenames in a formatted output. This did NOT work
(for me) in version 3.xx, but works fine here in version 4.01D.
%@SUBSTR[%@UPPER[%@NAME[%a]] ,0,8].%@UPPER[%@EXT[%a]]
This will output file %a in the format:
testtest.txt -> TESTTEST.TXT
file.tmp -> FILE .TMP
a.1 -> A .1
...and so on. In short, adding spaces to line things up nicely.
I used to have to use a real work-around that really slowed down
my BTM file processes, so when I found that this now works, I
thought I should share it with the world. No more having to use
%@CHAR[255]'s to do simple formatting!
Of course, it probably won't work so well if your filenames
contain some of those odd characters I see from time to time
like the back-quote character (`). (Whoever decided that these
should be allowed in filenames should be shot!)
(Please! Don't everyone write back and say, "I could have told
you that!" (Grin))
- Dayton
* OLX 994 * Parting is such sweet sorrow. - Figaro
--- Maximus 2.01wb
* Origin: T.V. BBS - Glendale, AZ - (602) 930-8542 (1:114/148)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/06/1992
To: PHI NGUYEN Num: 57 Date: 12/03/1992
From: JAY CURRY Re: Time: 12:02 am
Subj: projects Prvt: N Read: N
-=> Quoting Phi Nguyen to Saul Levy <=-
PN> BTW Do you think you can design a routine that will return an random
PN> number? I think it can be done using @substr and time.
I suppose Saul could, but here is mine:
----8<----8<----8<--------------------
::+--------------------------------------------------------------------+
::| RndGen.btm |
::| a program that returns a random number |
::| format: RNDGEN [limit] |
::| limit limits the top end of the random number created. |
::| This program generates a random number and will return that number |
::| mod 256 as an errorlevel, and that number as text out. |
::| no number will be larger than 8192, edit this limit and the |
::| multiplier as desired |
::+--------------------------------------------------------------------+
if !%rndkey!==!! gosub makekey
set rndkey=%@eval[%rndkey * 314]
set rndkey=%@eval[%rndkey %% 8192]
iff !%1! == !! then
echo %rndkey
quit %@eval[%rndkey %% 256]
else
echo %@eval[%rndkey %% %1]
quit %eval[(%rndkey%% %1) %% 256]
:makekey
set rndkey=%@substr[%_date,0,2]%@substr[%_date,3,2]%@substr[%_date,6,2]
set rndkey=%rndkey%@substr[%_time,0,2]%@substr[%_time,3,2]
set rndkey=%rndkey%@substr[%time,6,2]
return
========>8=======>8==========>8==========>8=====
note the number 8192, and 314 are arbitrary selections, I used 2^13 for
8192, and one digit less then the number of digits 2^13 used of the
digits in the number pi. what you use for your multiplier and your
modulus are up to you, but for most efective use, make the multiplier
one digit less then the mod number. stay away from really large
numbers, and also really small numbers.
The result of this btm is an integer, not a real number.
If you wish to do away with the rndkey variable after each use, place a
setlocal at the begining of the program. Doing so will make the program
take longer to complete.
a sample batch routine that could use this looks like:
@echo off
call rndgen 8
type joke%rndkey.txt
quit
or use the errorlevel set in rndgen for some fun.
@echo off
call rndgen
if errorlevel 1 goto skip
echo rndgen returned a 0
:skip
whatever...
you get the picture...
Legal note, the algorithm used is the additive congruential algorithm,
and comes from the second edition Algorithms by Robert Sedgewick,
copyright 1988. The algorithm is very common, and further notes on the
algorithm may be found there.
-Jay
... Answers: $1, Short: $5, Correct: $25, dumb looks are still free.
--- FMail 0.92
* Origin: Le Cross Roads 608-788-8086 HST/DS LaCrosse, WI (1:2360/12.0)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/08/1992
To: ALL Num: 105 Date: 12/01/1992
From: JAN VANHOOF Re: Time: 11:38 pm
Subj: men.btm 1/2 Prvt: N Read: N
Hoi All!
For those who like it, adapt it to your own needs and use it.
******************** MEN.BTM part 1 ********************************
@echo off
loadbtm on
:menulabel
cls black on cyan
drawbox 1 1 23 57 2 red on white fill black
drawbox 1 58 23 78 2 red on white fill blue
drawhline 21 2 55 1 red on black
iff %_dow eq Sun then scrput 3 60 bright yellow on blue Sunday
else iff %_dow eq Mon then scrput 3 60 bright yellow on blue Monday
else iff %_dow eq Tue then scrput 3 60 bright yellow on blue Tuesday
else iff %_dow eq Wed then scrput 3 60 bright yellow on blue Wednesday
else iff %_dow eq Thu then scrput 3 60 bright yellow on blue Thursday
else iff %_dow eq Fri then scrput 3 60 bright yellow on blue Friday
else iff %_dow eq Sat then scrput 3 60 bright yellow on blue Saturday
endiff
scrput 4 62 white on blue %_date
scrput 5 62 white on blue %_time
scrput 7 60 bright yellow on blue Free Memory
scrput 8 62 bright white on blue DOS Kb
scrput 8 71 white on blue %@dosmem[K]
scrput 9 62 bright white on blue XMS Kb
scrput 9 70 white on blue %@xms[K]
scrput 10 62 bright white on blue ENV b
scrput 10 71 white on blue %_env
scrput 11 62 bright white on blue ALI b
scrput 11 71 white on blue %_alias
scrput 13 60 bright yellow on blue Harddisk C
scrput 14 62 bright white on blue Total Kb
scrput 14 69 white on blue %@disktotal[C:,K]
scrput 15 62 bright white on blue Used Kb
scrput 15 69 white on blue %@diskused[C:,K]
scrput 16 62 bright white on blue Free Kb
scrput 16 69 white on blue %@diskfree[C:,K]
scrput 21 62 red on blue DOS :
scrput 21 68 bright red on blue %_dosver
scrput 22 61 red on blue 4DOS :
scrput 22 68 bright red on blue %_4ver
scrput 3 19 bright magenta on black M A I N M E N U
scrput 4 18 magenta on black -------------------
scrput 6 6 bright yellow on black * Lotus 123
scrput 6 9 bright red on black L
scrput 7 6 bright yellow on black * Quick Editor
scrput 7 9 bright red on black Q
scrput 8 6 bright yellow on black * PC Shell
scrput 8 9 bright red on black P
scrput 9 6 bright yellow on black * Norton Commander
scrput 9 9 bright red on black N
scrput 10 6 bright yellow on black * Frontdoor
scrput 10 9 bright red on black F
scrput 11 6 bright yellow on black * Telix
scrput 11 9 bright red on black T
scrput 12 6 bright yellow on black * GoldEd
scrput 12 9 bright red on black G
scrput 13 6 bright yellow on black * Privad
scrput 13 10 bright red on black r
scrput 14 6 bright yellow on black * TriText
scrput 14 11 bright red on black i
scrput 15 6 bright yellow on black * ModPlay
scrput 15 9 bright red on black M
scrput 16 6 bright yellow on black * Flight Simulator
scrput 16 16 bright red on black S
scrput 6 33 bright green on black F1 - Help
scrput 7 33 bright green on black F2 - Memory
scrput 8 33 bright green on black F3 - Q...telix.cap
scrput 9 33 bright green on black F4 -
scrput 10 33 bright green on black F5 -
scrput 11 33 bright green on black F6 -
scrput 12 33 bright green on black F7 -
scrput 13 33 bright green on black F8 -
scrput 14 33 bright green on black F9 - Compress HD
scrput 15 32 bright green on black F10 - Printer Codes
scrput 16 32 bright green on black F11 - Format Menu
scrput 17 32 bright red on black F12 - Exit
scrput 20 4 yellow on black 1 New Files 2 Dwarz 3 Cost FD 4 Cost
Telix
scrput 20 4 mag on black 1
scrput 20 19 mag on black 2
scrput 20 30 mag on black 3
scrput 20 43 mag on black 4
scrput 22 15 white on black This is day of your life!
scrput 22 27 bright red on black %@eval[%@date[%_date]+8695]
screen 24 1
set menuevar=▓
*************************end part 1**********************************
--- GoldED 2.40.P0720+ & Fmail 0.92+
* Origin: ==[ INFO-CENTER BBS <> 32-14-312818 <> Blok-Point ]= (2:292/401.3)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/08/1992
To: ALL Num: 106 Date: 12/01/1992
From: JAN VANHOOF Re: Time: 11:51 pm
Subj: men.btm 2/2 Prvt: N Read: N
******************** MEN.BTM part 2 ********************************
:loop
scrput 5 62 white on blue %_time
inkey /w0 %%menuevar
if "%menuevar"=="▓" goto loop
iff "%menuevar"=="l" then
cd\lotus^123^goto menulabel
elseiff "%menuevar" == "q" then
q^goto menulabel
elseiff "%menuevar" == "p" then
pcshell^goto menulabel
elseiff "%menuevar" == "n" then
nc^goto menulabel
elseiff "%menuevar" == "r" then
cd\prive^start^goto menulabel
elseiff "%menuevar" == "t" then
cd\telix^keystack 13^telix^goto menulabel
elseiff "%menuevar" == "s" then
mouse^cd\fs^fs4^goto menulabel
elseiff "%menuevar" == "f" then
cd\fd^info^goto menulabel
elseiff "%menuevar" == "i" then
cd\tritext^tt^goto menulabel
elseiff "%menuevar" == "m" then
cd\mod^mp -i^goto menulabel
elseiff "%menuevar" == "g" then
cd\fd\golded^golded^goto menulabel
elseiff "%menuevar" == "@59" then
help^goto menulabel
elseiff "%menuevar" == "@60" then
mem /c^pause^goto menulabel
elseiff "%menuevar" == "@61" then
cd\telix^q telix.cap^goto menulabel
elseiff "%menuevar" == "@63" then
up^goto menulabel
elseiff "%menuevar" == "@64" then
up^goto menulabel
elseiff "%menuevar" == "@67" then
cd\pctools^compress^goto menulabel
elseiff "%menuevar" == "@68" then
clr^print.btm
elseiff "%menuevar" == "@133" then
clr^form.btm
elseiff "%menuevar" == "@134" then
cls white on black^quit
elseiff "%menuevar" == "1" then
cd\bbs^q newfiles.lst newfiles.bbs^goto menulabel
elseiff "%menuevar" == "2" then
cd\bbs\dwarz^q bull45.bbs bull46.bbs^goto menulabel
elseiff "%menuevar" == "3" then
cd\fd\telcost\phone^q telcost.txt^goto menulabel
elseiff "%menuevar" == "4" then
cd\telix^telebill^goto menulabel
else
beep 200 4
goto menulabel
endiff
*************************end part 2**********************************
CU
-= JVH =-
When all else fails, read the instructions.
--- GoldED 2.40.P0720+ & Fmail 0.92+
* Origin: ==[ INFO-CENTER BBS <> 32-14-312818 <> Blok-Point ]= (2:292/401.3)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/08/1992
To: KRIS VERBEECK Num: 108 Date: 12/04/1992
From: HUGO LANDSMAN Re: Time: 12:54 pm
Subj: Some Useful Aliases... Prvt: N Read: N
Hoi Kris,
30 Nov 1992 20:04, Kris Verbeeck (2:292/877.5@fidonet.org) wrote to hugo
landsman:
>> alias down=`dir/bad>&>nul|cd %@line[con,0]`
>> alias next=`set _d=%@substr[%_cwd,%@len[%@path[%_cwd]]]^
>> set _f=%@unique[%temp]^dir../bad>&>nul>!%_f^
>> for %f in (@%_f) (iff %f == %_d then^set _n=1^
>> elseiff %_n=1 then^cd %f^set_n=2^endiff)^del/q %_f^
>> unset _f _n _d`
KV> Sorry but these aliases don't work over here.
If you have aliases called 'dir', 'cd', 'set' and so on, don't forget to insert
an asterisk (*) before those commands.
KV> What is the option /bad after the DIR-command ????
/B: single column of file names only
/AD: only files which have the Directory Attribute set
KV> And what are these aliases supposed to do ???
DOWN: goes to the first subdirectory from the current directory (down the
tree).
NEXT: goes to next subdirectory after the current in the current directory's
parent directory (next branch in tree).
These (and UP) were little gems published as DEBUG scripts in some PC rag years
ago. I thought it was time to finaly free up the clusters they occupied. :-)
seasonal greetings,
hugo
--- FastEcho 1.21
* Origin: Zeg Nein tegen Die Niklaus, No tegen Santaclaus! (2:512/154.5)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/10/1992
To: ALL Num: 122 Date: 12/05/1992
From: TONY DUNLAP Re: Time: 9:18 pm
Subj: Instructions for 4BOOT.BT Prvt: N Read: N
The listing for 4BOOT.BTM and 4BOOT.SYS are in the following message.
4BOOT.BTM -- Multiple AUTOEXEC/CONFIG manager.
Initial release 12-05-92
WARNING! this btm will overwrite files. It may require
editing before use. Take the time to look it over so
you will understand how it works.
Questions? Suggestions?
Tony Dunlap
1309 1/2 Hutchins
Portsmouth, Ohio 45662
You can also ask me in the Fidonet 4DOS echo.
Or send NETMAIL to Fidonet 1:2220/30 (2400 MNP)
The latest version will always be available for F'req
there as 4BOOT.ARJ or
Available via FREQ or first time callers from
The Outer Limits I (1:2220/10) at 1-614-772-5520
(USR Dual Standard) or The Outer Limits II
(1:2220/15) at 1-614-772-5583 (USR 14.4 HST).
Any ideas or suggestions are urged and welcome.
This BTM and accompanying files are designed to allow you
to have up to 19 separate AUTOEXEC/CONFIG configurations.
One feature is that if you don't choose, the BTM times out
in 15 seconds and reboots your computer with your default
configuration.
IMPORTANT: Before continuing, format a blank diskette with
DOS and a copy of your current AUTOEXEC.BAT and CONFIG.SYS
just in case something goes wrong (not likely but... you
know Murphy).
REQUIREMENTS:
4DOS (of course!)
DOS 5 (I'm not sure if 4.xx supports the INSTALL command in
CONFIG.SYS)
An ANSI driver
Enough room on your hard drive for all the configurations you
want.
A "4START.BAT" (or .BTM) with the following line added to
the top if you already have one:
IF %_SHELL=0 COPY C:\4BOOT.SYS C:\CONFIG.SYS
=============================================
SETUP
Copy 4BOOT.BTM and 4BOOT.SYS to the root directory of C:
Copy your existing CONFIG.SYS to 4BOOT_A
Copy your existing AUTOEXEC.BAT to 4AUTO_A
Create up to 18 other configs and name them 4BOOT_B
through 4BOOT_R
Create up to 18 other autoexecs and name them 4AUTO_B
through 4AUTO_R
Modify 4BOOT.BTM to put in comments or reduce the number
of configurations.
Edit the ansi.sys line in 4BOOT.SYS to point to your favorite
Ansi program. If you use a COM ansi driver you will have to use
the INSTALL command instead of DEVICE.
If you are by chance shelling 4DOS to a ramdisk, you will also
have to put your ramdisk line in 4BOOT.SYS (preferably first).
Copy 4BOOT.SYS to CONFIG.SYS
Reboot your computer.
Thats it!
You can also run 4BOOT x (where x is the letter of the configuration you want
to boot with) from a batch file or the command line. For instance if you wanted
to defrag your bbs drive with no TSRs you might make that configuration "D"
where 4AUTO_D contained the command to defrag your drive on the first line and
"REBOOT" on the second. Then create 4BOOT_D with just a few files and buffers
and the shell line. You could then put in your nightly maintenance batch file:
4BOOT D
Under a DESQVIEW environment, you may have to change the "reboot" commands in
4BOOT.BTM to "reboot /c".
One minor problem to look out for is if you install software that modifies
config.sys or autoexec.bat. In this case you should copy your originals back to
C:\ before you do the install, then afterwards be sure to update all your
4BOOT_* and 4AUTO_* files accordingly. Then copy 4BOOT.SYS to CONFIG.SYS and
reboot.
--- GEcho 1.00
* Origin: DISCOVER (1:2220/30.1)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/10/1992
To: ALL Num: 123 Date: 12/05/1992
From: TONY DUNLAP Re: Time: 9:18 pm
Subj: Listing for 4BOOT.BTM and Prvt: N Read: N
::Start of 4BOOT.BTM
@echo off
if "%1" NE "" (set answ=%1 ^ goto ifparam)
setdos /S0:0
color bri yel on blu
:top
set answ=!!
cls
drawbox 0 0 24 63 2 BRI YEL ON BLU FILL BLU
drawhline 2 1 62 1 BRI YEL ON BLU
drawhline 22 1 62 1 BRI YEL ON BLU FILL BLU
screen 1 22 CONFIGURATION MENU
screen 3 2 A - Config 1 (this will be the default )
screen 4 2 B - Config 2 (put a short description here)
screen 5 2 C - Config 3 ( )
screen 6 2 D - Config 4 ( )
screen 7 2 E - Config 5 ( )
screen 8 2 F - Config 6 ( )
screen 9 2 G - Config 7 ( )
screen 10 2 H - Config 8 ( )
screen 11 2 I - Config 9 ( )
screen 12 2 J - Config 10 ( )
screen 13 2 K - Config 11 ( )
screen 14 2 L - Config 12 ( )
screen 15 2 M - Config 13 ( )
screen 16 2 N - Config 14 ( )
screen 17 2 O - Config 15 ( )
screen 18 2 P - Config 16 ( )
screen 19 2 Q - Config 17 ( )
screen 20 2 R - Config 18 ( )
screen 21 2 R - Config 19 ( )
screen 23 6 Press a letter or wait 15 seconds for the default.
inkey /w15 %%answ
:ifparam
if %@index[ABCDEFGHIJKLMNOPQR,%answ] EQ -1 set answ=A
if exist c:\4boot_%answ goto pick
cls
echo No matching configuration (%answ) found. (Wait 5 seconds.)
delay 5
goto top
:pick
*copy c:\4boot_%answ c:\config.sys>NUL
*copy c:\4auto_%answ c:\autoexec.bat>NUL
reboot
::End of 4BOOT.BTM
::Start of 4BOOT.SYS
DEVICE=C:\SYS\ZANSI.SYS
INSTALL=C:\4DOS\4DOS.COM C:\4DOS /CC:\4BOOT.BTM
::End of 4BOOT.SYS
--- GEcho 1.00
* Origin: DISCOVER (1:2220/30.1)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/10/1992
To: ALL Num: 132 Date: 12/08/1992
From: SAUL LEVY Re: Time: 3:34 am
Subj: USAGE2.BTM Prvt: N Read: N
All,
Here's a bit of a modification to Tony Dunlap's USAGE.BTM (given
as a DEBUG script):
===============================CUT HERE===============================
N USAGE2.BTM
E 0100 52 45 4D 20 55 53 41 47 45 32 2E 42 54 4D 0D 0A 52 45 4D 20 4F
E 0115 72 69 67 69 6E 61 6C 20 62 79 20 54 6F 6E 79 20 44 75 6E 6C 61
E 012A 70 0D 0A 52 45 4D 20 41 64 64 69 74 69 6F 6E 73 20 62 79 20 53
E 013F 61 75 6C 20 4C 65 76 79 2C 20 63 6F 6C 6F 72 20 61 6E 64 20 64
E 0154 65 66 61 75 6C 74 20 64 72 69 76 65 20 6C 65 74 74 65 72 0D 0A
E 0169 52 45 4D 0D 0A 53 45 54 4C 4F 43 41 4C 0D 0A 53 45 54 20 41 3D
E 017E B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0
E 0193 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0
E 01A8 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0
E 01BD B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 B0 0D 0A 53 45
E 01D2 54 20 42 3D DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB
E 01E7 DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB
E 01FC DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB
E 0211 DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB
E 0226 0D 0A 53 45 54 20 44 55 53 41 47 45 3D 25 40 53 55 42 53 54 52
E 023B 5B 25 42 2C 30 2C 25 40 49 4E 54 5B 25 40 45 56 41 4C 5B 2E 38
E 0250 2A 25 40 44 49 53 4B 55 53 45 44 5B 25 31 2C 4B 5D 2F 25 40 44
E 0265 49 53 4B 54 4F 54 41 4C 5B 25 31 2C 4B 5D 2A 31 30 30 5D 5D 5D
E 027A 0D 0A 53 45 54 20 44 55 53 41 47 45 3D 25 44 55 53 41 47 45 25
E 028F 25 40 53 55 42 53 54 52 5B 25 41 2C 30 2C 25 40 45 56 41 4C 5B
E 02A4 38 30 2D 25 40 4C 45 4E 5B 25 44 55 53 41 47 45 5D 5D 5D 0D 0A
E 02B9 43 4F 4C 4F 52 20 42 52 49 47 48 54 20 52 45 44 20 4F 4E 20 42
E 02CE 4C 55 45 0D 0A 49 46 46 20 22 25 31 22 3D 22 22 20 54 48 45 4E
E 02E3 0D 0A 20 20 20 45 43 48 4F 20 44 52 49 56 45 20 25 5F 44 49 53
E 02F8 4B 3A 0D 0A 45 4C 53 45 0D 0A 20 20 20 45 43 48 4F 20 44 52 49
E 030D 56 45 20 25 40 55 50 50 45 52 5B 25 31 5D 0D 0A 45 4E 44 49 46
E 0322 46 0D 0A 43 4F 4C 4F 52 20 47 52 45 45 4E 20 4F 4E 20 42 4C 55
E 0337 45 0D 0A 45 43 48 4F 53 20 25 44 55 53 41 47 45 0D 0A 43 4F 4C
E 034C 4F 52 20 42 52 49 47 48 54 20 59 45 4C 4C 4F 57 20 4F 4E 20 42
E 0361 4C 55 45 0D 0A 45 43 48 4F 53 20 C3 C4 C4 C4 C4 C4 C4 C5 C4 C4
E 0376 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C4
E 038B C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4
E 03A0 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4
E 03B5 C4 C4 C4 C4 C4 C4 B4 0D 0A 45 43 48 4F 53 20 31 20 20 20 20 20
E 03CA 31 30 20 20 20 20 20 20 32 30 20 20 20 20 20 20 33 30 20 20 20
E 03DF 20 20 20 34 30 20 20 20 20 20 20 35 30 20 20 20 20 20 20 36 30
E 03F4 20 20 20 20 20 20 37 30 20 20 20 20 20 20 38 30 20 20 20 20 20
E 0409 20 39 30 20 20 20 20 20 31 30 30 0D 0A 45 43 48 4F 2E 0D 0A 43
E 041E 4F 4C 4F 52 20 42 52 49 47 48 54 20 52 45 44 20 4F 4E 20 42 4C
E 0433 55 45 0D 0A 45 43 48 4F 20 44 4F 53 20 4D 45 4D 4F 52 59 0D 0A
E 0448 53 45 54 20 4D 55 53 41 47 45 3D 25 40 53 55 42 53 54 52 5B 25
E 045D 42 2C 30 2C 25 40 49 4E 54 5B 25 40 45 56 41 4C 5B 38 30 2D 28
E 0472 2E 38 2A 25 40 44 4F 53 4D 45 4D 5B 4B 5D 2F 36 34 30 2A 31 30
E 0487 30 29 5D 5D 5D 0D 0A 53 45 54 20 4D 55 53 41 47 45 3D 25 4D 55
E 049C 53 41 47 45 25 25 40 53 55 42 53 54 52 5B 25 41 2C 30 2C 25 40
E 04B1 45 56 41 4C 5B 38 30 2D 25 40 4C 45 4E 5B 25 4D 55 53 41 47 45
E 04C6 5D 5D 5D 0D 0A 43 4F 4C 4F 52 20 43 59 41 4E 20 4F 4E 20 42 4C
E 04DB 55 45 0D 0A 45 43 48 4F 53 20 25 4D 55 53 41 47 45 0D 0A 43 4F
E 04F0 4C 4F 52 20 42 52 49 47 48 54 20 59 45 4C 4C 4F 57 20 4F 4E 20
E 0505 42 4C 55 45 0D 0A 45 43 48 4F 53 20 C3 C4 C4 C4 C4 C4 C4 C5 C4
E 051A C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4
E 052F C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4
E 0544 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5 C4 C4 C4 C4 C4 C4 C4 C5
E 0559 C4 C4 C4 C4 C4 C4 C4 B4 0D 0A 45 43 48 4F 53 20 31 20 20 20 20
E 056E 20 31 30 20 20 20 20 20 20 32 30 20 20 20 20 20 20 33 30 20 20
E 0583 20 20 20 20 34 30 20 20 20 20 20 20 35 30 20 20 20 20 20 20 36
E 0598 30 20 20 20 20 20 20 37 30 20 20 20 20 20 20 38 30 20 20 20 20
E 05AD 20 20 39 30 20 20 20 20 20 31 30 30 0D 0A 43 4F 4C 4F 52 20 57
E 05C2 48 49 54 45 20 4F 4E 20 42 4C 55 45 0D 0A 45 4E 44 4C 4F 43 41
E 05D7 4C 0D 0A
RCX
04DA
W
Q
===============================CUT HERE===============================
Extract this file as USAGE2.SCR and use DEBUG <USAGE2.SCR to
recreate USAGE2.BTM.
I added color and include the default disk drive (if you don't
add x: when running this batch file. It looks very nice (change
the colors to suit yourself). Thanks Tony!
Saul
--- QM v1.30/b
* Origin: Bigfoot's RBBS - Tucson,AZ - HST - (8:902/1) or (1:300/11.0)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/11/1992
To: JAN VANHOOF Num: 120 Date: 12/09/1992
From: MAYNARD HOGG Re: Time: 5:16 am
Subj: Men.Btm Prvt: N Read: N
JV> iff %_dow eq Sun then scrput 3 60 bright yellow on blue Sunday
>else iff %_dow eq Mon then scrput 3 60 bright yellow on blue Monday
>else iff %_dow eq Tue then scrput 3 60 bright yellow on blue Tuesday
>else iff %_dow eq Wed then scrput 3 60 bright yellow on blue Wednesday
>else iff %_dow eq Thu then scrput 3 60 bright yellow on blue Thursday
>else iff %_dow eq Fri then scrput 3 60 bright yellow on blue Friday
>else iff %_dow eq Sat then scrput 3 60 bright yellow on blue Saturday
^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>endiff
Two quick comments addressed not just to you but to TERRY PINTO (who
posted SYSTEM.BTM in early November) and others.
(1) Please use environment variables for the color scheme--standard
programming practise: a. to save yourself typing, b. in the
interests of consistency, c. make it easier on those who still use
B&W (on laptops, in particular) or don't happen to agree with your
"tropical fruit salad" choice of colors.
e.g. set byob=bri yel on blu
set byox=bri yel on bla
(2) The highly repetitive nature of the lines in the block should warn
you that you're doing something wrong (i.e. inefficiently). You
can start by factoring out the SCRPUT part.
iff %_dow eq Sun then set day=Sunday
else iff %_dow eq Mon then set day=Monday
else iff %_dow eq Tue then set day=Tuesday
else iff %_dow eq Wed then set day=Wednesday
else iff %_dow eq Thu then set day=Thursday
else iff %_dow eq Fri then set day=Friday
else iff %_dow eq Sat then set day=Saturday
endiff
scrput 3 60 %byob %day
If you want to get fancy, try the following one-line version.
for %x in (Sunday Monday Tuesday Wednesday Thursday Friday Saturday)
if %@substr[%x,0,3]==%_dow set day=%x
-- SPEED 1.10 [NR]:
--- GEcho 1.00/beta+
* Origin: SuperBBS Support/Sales/Beta Avxia_bbs Tokyo Line 1 (6:730/9)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/14/1992
To: ARIE RIETKERK Num: 43 Date: 12/08/1992
From: HENK SIMMELINK Re: Time: 4:56 pm
Subj: 0 bytes files Prvt: N Read: N
Hello Arie!
Saturday December 05 1992, Arie Rietkerk writes to All:
AR> Does anybody know a option in 4dos to delete only 0 bytes files in a
AR> directory, del ??????
Hmm, I think you should use SST for this...
But if you ensist on using 4DOS, you could use this:
for %f in (*.*) (if %@filesize[%f,b] == 0 del /n %f)
rem ^^ remove this if you have
rem convinced you're self.. :-)
Yours sincerely,
Henk `HeSitated' Simmelink
--- GEcho 1.00/beta+
* Origin: (2:283/4.6)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/14/1992
To: MAYNARD HOGG Num: 76 Date: 12/10/1992
From: DENNIS MCCUNNEY Re: Time: 8:48 pm
Subj: Binary Search Prvt: N Read: N
** From Maynard Hogg to Phi Nguyen on 07 Dec 92 13:37:03
** Subj: Binary Search
PN>I even write binary search routine in 4DOS BTM which is very
PN>similiar to PASCAL, C language. You want me to post the search routine?
MH> Yes, please. (In chunks under 100 lines, pending arrival of a better
MH> mail reader. <g>)
-Area: 4DOS Echo (FidoNet) --------------------------------------------
Msg#: 192 Date: 17 Sep 92 00:56:00
From: Phi Nguyen Read: Yes Replied: No
To: All Mark:
Subj: Binary search
-----------------------------------------------------------------------
I asked several people on how to search a TXT file in 4DOS and got many
responds. I think most of them deal with linear search which is very slow!
Since my txt file contained all filenames which are already sorted, so I figure
the best way to do this is with binary search.
Here is what I got after translated a routine from PASCAL to 4DOS:
setlocal
iff "%1" eq "" then
input Type in filename to search: %%filename
else
set filename=%1
endiff
set filename=%@lower[%filename]
set file=DOWNLOAD.DAT
set bottom=1
set top=%@lines[%file]
if %top lt 0 quit 2
:LOOP
iff %top GT %bottom then
set middle=%@int[%@eval[(%top+%bottom)/2]]
set linein=%@lower[%@line[%file,%middle]]
iff %filename EQ %linein then
endlocal
quit 1
elseiff %filename GT %linein then
set bottom=%@eval[%middle+1]
else
set top=%middle
endiff
goto loop
endiff
iff %top EQ 0 then
endlocal
quit 2
elseiff %filename EQ %linein then
endlocal
quit 1
else
endlocal
quit 2
endiff
-!!!!!!!!!!-
It is not perfect yet but it does work!
I used this routine to check for a filename in DOWNLOAD.DAT to see if I already
downloaded a file or not. It's very useful if you are collecting GIFs!!!
If you think you can make it work better, please do just that and let me know.
Thank
Phi
--- Blue Wave/Max v2.11 [NR]
* Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709.0)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/14/1992
To: DAN SCHOR Num: 79 Date: 12/11/1992
From: DENNIS MCCUNNEY Re: Time: 8:25 pm
Subj: File delete problem Prvt: N Read: N
** From Dan Schor to All on 05 Dec 92 15:49:16
** Subj: File delete problem
DS> I'm looking for a way to delete the oldest of a certain type of files.
DS> For the program or batch file, the specified information would be the
DS> filename (with wildcards) and the number of updates to keep. For
DS> example:
DS> KeepLast nodediff.a?? 4
DS> would keep the last (newest) files which fit into the type
DS> nodediff.a??. Any ideas?
Untested, but something like this should be a start.
: keeplast.btm - keep last X versions of files
@echo off
iff "%2"=="" then
echo Syntax %0 [filespec] [number]
quit
endiff
if "%TEMP"=="" set TEMP=%_CWD
: get files in date order
dir /b /od %1 > %TEMP%\filelist.$$$
set numfiles=%@lines[%TEMP\filelist.$$$]
set kill=%@eval[%numfiles-%2]
set count=1
:loop
set oldfile=%@line[%TEMP\filelist.$$$,%count]
del %oldfile
set count=%@eval[%count+1]
iff %count eq %kill then
echo %0 done
del %TEMP\filelist.$$$
unset numfiles kill oldfile count
quit
else
goto loop
endiff
--- Blue Wave/Max v2.11 [NR]
* Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709.0)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/14/1992
To: DAN SCHOR Num: 96 Date: 12/12/1992
From: TOM BAILEY Re: Time: 3:04 pm
Subj: File delete problem Prvt: N Read: N
Greetings Dan,
On Saturday December 05 1992, Dan Schor wrote to All:
DS> Hi folks...
DS> I'm looking for a way to delete the oldest of a certain type of files.
DS> For the program or batch file, the specified information would be the
DS> filename (with wildcards) and the number of updates to keep. For
DS> example:
DS> KeepLast nodediff.a?? 4
DS> would keep the last (newest) files which fit into the type
DS> nodediff.a??. Any ideas?
Sure, basically you can just write a directory listing of the files to a temp
file sorted inversely by date (the default) and using @%line[] check if there
are indeed more than X files in the list. If so start at filename number X+1
and delete them, try something like this:
--------------------
: Keeplast.BTM
: Call this with the file mask you want to delete as the first parameter and
the number to keep as the second.
:
@Loadbtm on
@iff not "%1" GT "" Then
@Echo You must specify a file mask for this batch file.
@beep
@goto end
@Endiff
@iff not "%2" GT "0" Then
@Echo You must supply a numeric argument for the second parameter.
@beep
@goto end
@Endiff
: Just so we don't accidentally delete all files except the first %2+1 :)
: That might be fun...
@if exist \tempfile delete \tempfile
: Keep temp's in the root directory
@Dir %1 /Od /bf>\tempfile
@Set count=%@eval[%2 + 1]
:Modify the initial count value to # of files you want to keep plus one
:loop
@Iff "%@line[tempfile,%count]" GT "" Then
@Del %@line[tempfile,%count]
: Above you could optionally write the output to the null for a quiet delete
@Set count=%@eval[%count + 1]
@Goto Loop
: Yes, jumping out of an if is perfectly acceptable!
@Endiff
:end
@if exist \tempfile delete \tempfile^unset count>&nul
: Clean up any messes we made in the root dir and remove our temp variable for
counting.
@Echo Done.
--------------
This is untested but I know it do what you asked. If you get confused read
through the docs for the "dir" command and the "%@line[]" and "%@eval[]"
functions. Others will probably post other solutions to the same problem,
should be interesting.
Regards,
-TB
--- GEcho 1.00
* Origin: ...and love lies bleeding in my hand... (FidoNet 1:105/62.69)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/16/1992
To: GUILLAUME LE ROYER Num: 83 Date: 12/13/1992
From: ERIC THAV Re: Time: 7:10 pm
Subj: Day of Week Prvt: N Read: N
GL> I'm looking for a batch file (With 4DOS) which execute different
GL> programm depending of the day of the week ?
I believe the easiest way is to create batch files by the name of
MON.BTM, TUE.BTM, WED.BTM, THU.BTM, FRI.BAT, SAT.BTM, SUN.BTM (with each
batch file containing the program that you want to execute for each day
of the week) and then create one batch file called DOTHIS.BTM (for
example) that contains only the following line:
%_DOW
The %_DOW is a 4DOS internal variable that returns the day of the week
(Mon for Monday, Tue for Tuesday, so on and so forth). So, whenever you
run DOTHIS.BTM, it would execute the correct batch file for the current
day of the week.
I hope this helps.
/* Eric */
...MegaMail 2.10 #1573.If this were an actual tagline, it would be funny.
--- WM v2.05/92-0311
* Origin: Silicon Beach 305-474-6512 USR DS (1:369/68)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/17/1992
To: ALL Num: 171 Date: 12/15/1992
From: JOHN SUTCLIFFE Re: Time: 11:46 pm
Subj: ANSI detection Prvt: N Read: N
This assembler file might help those who need a means of checking for a
resident ANSI driver. It assembles and links to a 56-byte .COM file that
can be called from within a 4DOS batch file and sets the Errorlevel to 1
if an ANSI driver is present.
; Program ANSIchek
; Purpose Check for ANSI driver
; Input None
; Output ERRORLEVEL 1 for yes or 0 for no
cseg segment
assume cs:cseg, ds:cseg ;Standard .COM setup
org 100h
ANSIchek proc far
curpos db 27,'[6n$' ;ANSI string to get current position
delete db 8,8,8,8,'$' ;4 backspaces to delete ANSI string
start: mov ax,0C06h ;Clear the keyboard buffer
mov dl,0FFh
int 21h
mov dx,offset curpos ;Print an ANSI string to get the cursor
mov ah,09h ; position. If ANSI is enabled, this will
int 21h ; output the position to the console.
mov ah,06h ;Check whether the keyboard buffer has
mov dl,0FFh ; been written to.
int 21h
jnz enabled ;If it has, ANSI is enabled.
mov dx,offset delete ;ANSI is not enabled, so delete our
mov ah,09h ; string from the screen
int 21h
sub al,al ;Exit code = 0 for no ANSI
jmp short seterror
enabled: mov ax,0C06h ;Clear returned ANSI keys out of buffer
mov dl,0FFh
int 21h
mov al,1 ;Exit code = 1 for ANSI enabled
seterror: mov ah,4Ch ;Exit with ERRORLEVEL set
int 21h
ANSIchek endp
cseg ends
end start
I hope this might help.
John.
--- GEcho 1.00/beta+
* Origin: INDEX III - Nottm UK - +44-602-855607/61 - (2:250/413)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/17/1992
To: GUILLAUME LE ROYER Num: 102 Date: 12/14/1992
From: JAY CURRY Re: Time: 9:54 pm
Subj: Day of Week Prvt: N Read: N
-=> Quoting Guillaume Le Royer to all <=-
GLR> Hello All,
GLR> I'm looking for a batch file (With 4DOS) which execute different
GLR> programm depending of the day of the week ?
GLR> Does anyone know a way to do that ?
something like :
dayrunr.btm
@echo off
goto %_dow
echo not running 4dos
goto done
:0
rem replace with call for batch file for sunday
goto done
:1
rem replace with call for batch file for monday
goto done
:2
rem replace with call for batch file for tuesday
goto done
:3
rem replace with call for batch file for wednesday
goto done
:4
rem replace with call for batch file for thursday
goto done
:5
rem replace with call for batch file for friday
goto done
:6
rem replace with call for batch file for saturday
:done
quit
Alternatively you could name appropriate batchfiles as day0.btm,
day1.btm, etc. Then call it with a CALL DAY%_DOW.
You will probably get several responses to this.
-Jay
... The OFFICIAL tagline of the 1996 Olympics!
--- FMail 0.92
* Origin: Le Cross Roads 608-788-8086 USR/DS LaCrosse, WI (1:2360/12.0)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/17/1992
To: ALL Num: 161 Date: 12/14/1992
From: SCOTT WUNSCH Re: Time: 4:19 pm
Subj: Here we go again - v2.04 Prvt: N Read: N
Salutations, All!
Ok, let's give this one more shot. This time it _should_ (oh brother ;))
identify the date format being used, and show the date appropriately.
_______O_/___________________| SNIP |___________________\_O_______
O \ | HERE | / O
@ECHO OFF
: * * * * * * * * * * [ SHELL.BTM v2.04 ] * * * * * * * * *
: * 4DOS Prompt Shell Batch File *
: * *
: * Originally by Mark Stiebel (3:633/159) -- 05/10/92 *
: * Revised by Scott Wunsch (1:140/23.1701) -- 14-Dec-92 *
: * *
: * Description: SHELL.BTM will keep looping, updating *
: * the prompt every second or so. *
: * Commands and aliases are entered as *
: * usual, and are added to the command *
: * history. *
: * *
: * Commands while in SHELL.BTM: *
: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
: * ON - Turn the Status Line ON *
: * OFF - Turn the Status Line OFF *
: * END - Quit SHELL.BTM *
: * *
: * Anything else will run as it would *
: * from a normal 4DOS command line. *
: * *
: * New Features: *
: * ~~~~~~~~~~~~~~~ *
: * Handles multi-command lines (using "^") and other *
: * embedded commands the previous version would choke *
: * on. Special commands now implemented through *
: * aliases. Automatically identifies the date format *
; * being used and adapts. Plus, it might even work! *
: * :-) *
: * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SETLOCAL
Set _SL=1
Set _FL=0
Set _ST=%@EVAL[%_ST+1]
SET CursorStyle=100:1
ALIAS ON=SET _SL=1
ALIAS OFF=SET _SL=0
ALIAS END=SET _GOOD=BYE
IFF %@DATE[01-02-03] == 8434 THEN
SET _DD=0^SET _DM=3
ELSEIFF %@DATE[01-02-03] == 8402 THEN
SET _DD=3^SET _DM=0
ELSEIFF %@DATE[01-02-03] == 7704 THEN
SET _DD=6^SET _DM=3
ENDIFF
:MainLoop
Set _cmd=%@CHAR[32]
if %_CWDS == %cudir goto nochange
set cudir=%_CWDS
pushd
:nochange
IF '%_SL' == '0' GOTO NoStat
Setdos /s0:0
IFF %@DISKFREE[%_DISK:,M] LT 1 THEN^SET _CLR1=%@CHAR[27][0;31;46m^...
...ELSE^SET _CLR1=%@CHAR[27][34m^ENDIFF
IFF %@DOSMEM[k] LT 400 THEN^SET _CLR2=%@CHAR[27][0;31;46m^ELSE^SET...
... _CLR2=%@CHAR[27][34m^ENDIFF
IFF %@EMS[K] LT 500 THEN^SET _CLR3=%@CHAR[27][0;31;46m^ELSE^SET ...
..._CLR3=%@CHAR[27][34m^ENDIFF
IFF %_SHELL GT 0 THEN^SET _CLR4=%@CHAR[27][0;31;46m^ELSE^SET ...
..._CLR4=%@CHAR[27][34m^ENDIFF
IFF %_ST GT 1 THEN^SET _CLR5=%@CHAR[27][0;31;46m^ELSE^SET _CLR5=...
...%@CHAR[27][34m^ENDIFF
echos %@CHAR[27][s%@CHAR[27][H%@CHAR[27][1;30;46m%@CHAR[27][K
echos %@CHAR[27][1;30m[%@CHAR[27][34m%@SUBSTR[%_DATE,%_DD,2]/
echos %@WORD[%@SUBSTR[%_DATE,%_DM,2],x Jan Feb Mar Apr May Jun Jul Aug...
...Sep Oct Nov Dec]
echos %@CHAR[27][1;30m][%@CHAR[27][34m%_TIME%%@CHAR[27][1;30m][
echos %_DISK:%_CLR1%%@DISKFREE[%_DISK:,K]Kb%@CHAR[27][1;30m][Mem:%_CLR2%
echos %@DOSMEM[K]Kb%@CHAR[27][1;30m][EMS:%_CLR3%%@EMS[K]Kb
echos %@CHAR[27][1;30m][Extended:%@CHAR[27][34m%@EXTENDED[K]Kb
echos %@CHAR[27][1;30m][Shell:%_CLR4%%_SHELL%%@CHAR[27][1;30m/%_CLR5%
echos %@EVAL[%_ST-1]%@CHAR[27][1;30m]
IF %_DISK == A ECHOS %@CHAR[27][0;37m
IF %_DISK == B ECHOS %@CHAR[27][0;32m
IF %_DISK == C ECHOS %@CHAR[27][0;35m
IF %_DISK == D ECHOS %@CHAR[27][0;36m
IF %_DISK == E ECHOS %@CHAR[27][0;33m
IF %_DISK == F ECHOS %@CHAR[27][0;1;30m
echos %@CHAR[27][%_ROWS;1H%_CWDS%%@CHAR[27][1;33m`| >`
SETDOS /S100:1
GOTO SubLoop
:SubLoop
IF '%_SL' == '0' GOTO NoStat
Setdos /s0:0
echos %@CHAR[27][s%@CHAR[27][H%@CHAR[27][1;30;46m%@CHAR[27][1;30m[
echos %@CHAR[27][34m%@SUBSTR[%_DATE,%_DD,2]/
echos %@WORD[%@SUBSTR[%_DATE,%_DM,2],x Jan Feb Mar Apr May Jun Jul Aug...
...Sep Oct Nov Dec]
echos %@CHAR[27][1;30m][%@CHAR[27][34m%_TIME%%@CHAR[27][1;30m]
echos %@CHAR[27][u%@CHAR[27][0;1;33m
IF %_FL == 0 (ECHOS %@CHAR[27][3D`|\>`%@CHAR[27][33m ^ SET _FL=1)
IF %_FL == 1 (ECHOS %@CHAR[27][3D`||>`%@CHAR[27][33m ^ SET _FL=2)
IF %_FL == 2 (ECHOS %@CHAR[27][3D`|/>`%@CHAR[27][33m ^ SET _FL=3)
IF %_FL == 3 (ECHOS %@CHAR[27][3D`|->`%@CHAR[27][34m ^ SET _FL=0)
SETDOS /S%CursorStyle
GOTO IP
:NoStat
IF %_DISK == A ECHOS %@CHAR[27][0;37m
IF %_DISK == B ECHOS %@CHAR[27][0;32m
IF %_DISK == C ECHOS %@CHAR[27][0;35m
IF %_DISK == D ECHOS %@CHAR[27][0;36m
IF %_DISK == E ECHOS %@CHAR[27][0;33m
IF %_DISK == F ECHOS %@CHAR[27][0;1;30m
ECHOS %@CHAR[27][%_ROWS;1H%_CWDS%%@CHAR[27][1;33m`|`
echos %@CHAR[240]`>`%@CHAR[27][34m
:IP
INPUT /w0 %%_cmd
:Execute
History /A %_cmd
CALL %_cmd
IF "%_GOOD" == "BYE" (SET _ST=%@EVAL[%_ST-1]^UNSET _GOOD^ENDLOCAL^QUIT)
IF "%@READSCR[0,0,1]" == "[" GOTO SubLoop
GOTO MainLoop
:NoHist
CALL %@SUBSTR[%_cmd,1]
GOTO MainLoop
_______O_/___________________| SNIP |___________________\_O_______
O \ | HERE | / O
And let's hope I did _something_ right this time ;).
/\ LLAP...
> \ cott \\'unsch <
\/
>> Message length exceeded, split by WILDMAIL! v2.05 <<
>> Continued in next message <<
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/19/1992
To: WILLIAM HUGHES Num: 120 Date: 12/13/1992
From: DAYTON LIVINGSTON Re: Time: 3:19 pm
Subj: %@SUBSTR tip - Filenames Prvt: N Read: N
** From: William Hughes to Dayton Livingston on 06 Dec 92 23:46:08
** Subj: %%%%@SUBSTR tip - Filenames
DL> Hiya folks... Just working on a BTM here and found a shortcut to
DL> displaying filenames in a formatted output.
DL> %@SUBSTR[%@UPPER[%@NAME[%a]] ,0,8].%@UPPER[%@EXT[%a]]
WH> This looks very interesting. It should also work with
WH> regular environment variables when a formatted output is
WH> wanted. I wonder of it'll work in reverse?
WH> i.e. %@substr[ %var,0,-8]
Yeah, works fine here. Sorry I forgot to mention it. I use it
commonly for showing filesizes:
ECHO %@SUBSTR[ %@FILESIZE[%a],6,-7]
WH> This could be used in a calculation loop to output a
WH> right-justified column of figures.
DL> (Please! Don't everyone write back and say, "I could have
DL> told you that!" (Grin))
WH> I could have told you that, but did you ask? Nooooo....... :-)
Thanks BUNCHES!
- Dayton
... 2+2=5, for sufficiently large values of 2.
--- Blue Wave/Max v2.11 [NR]
* Origin: T.V. BBS - Glendale, AZ - (602) 930-8542 (1:114/148.0)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/19/1992
To: ERA ERIKSSON Num: 105 Date: 12/16/1992
From: DENNIS MCCUNNEY Re: Time: 2:32 am
Subj: Couple more suggestions Prvt: N Read: N
** From era eriksson to Rex Conn on 10 Dec 92 19:27:36
** Subj: Couple more suggestions
ee> 1) A variable %_DIRS which tells how many levels of pushed
ee> directories there are
ee> 2) Something similar which tells which directory is the topmost on the
ee> DIRS stack
Good thoughts.
Not directly pertinant tto what you are trying to do, but you might
find this of interest:
dirs>d:\dtmp
iff not %@filesize[d:\dtmp]=0 then
set newd=%@select[d:\dtmp,1,40,15,78, Directories ]
if not "%newd"=="" pushd %newd
endiff
This creates a pop-up directory history window similar to the
command history window produced by pressing PgUp. I have it attached
as an alias to Ctrl-PgUp. Things are quickest if the temp file is
created on a ramdisk.
--- Blue Wave/Max v2.11 [NR]
* Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709.0)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/19/1992
To: MAYNARD HOGG Num: 145 Date: 12/17/1992
From: JAY CURRY Re: Time: 11:53 pm
Subj: Merg.btm Prvt: N Read: N
this is a BTM implementation of Mergesort. notes on problems with it
follow...
------------------------------------------------------------------
Merge.btm
==================================================================
@echo off
if !%_4ver! == !! goto 4require
if !%1! == !! goto form
if !%2! == !! goto form
if !%3! == !! goto form
setlocal
if exist %3 del %3
set lines_1=%@lines[%1]
set lines_2=%@lines[%2]
set cur_count_1=0
set cur_count_2=0
if %lines_1 lt cur_count_1 goto empty
if %lines_2 lt cur_count_2 goto empty
set cur_line_1=%@line[%1,%cur_count_1]
set cur_line_2=%@line[%2,%cur_count_2]
:top
iff %cur_line_1 lt %cur_line_2 then
echo %cur_line_1 >> %3
set %cur_count_1 = %@eval[%cur_count_1+1]
if %cur_count_1 gt %lines_1 goto done1
set %cur_line_1 = %line[%1,%cur_count_1]
else
echo %cur_line_2 >> %3
set %cur_count_2 = %@eval[%cur_count_2+1]
if %cur_count_2 gt %lines_2 goto done2
set %cur_line_2 = %line[%2,%cur_count_2]
endiff
goto top
:done1
echo %cur_line_2 >> %3
set %cur_count_2 = %@eval[%cur_count_2+1]
if %cur_count_2 gt %lines_2 goto done
set %cur_line_2 = %line[%2,%cur_count_2]
goto done1
:done2
echo %cur_line_1 >> %3
set %cur_count_1 = %@eval[%cur_count_1+1]
if %cur_count_1 gt %lines_1 goto done
set %cur_line_1 = %line[%1,%cur_count_1]
goto done2
:4require
echo this program requires 4dos
goto done
:form
text
The format to use this program is
%0 INFILE_1 INFILE_2 OUTFILE
infile_1 and infile_2 should be files already sorted in
assending order. If outfile exists, it will be deleated. If
you wish to use infile_1 or infile_2 as you final outfile, use
an alias that makes a temporary file of outfile, then copies
that temporary file over the appropriate infile.
endtext
goto done
:empty
text
one of the input files is an empty file. The output file was
not created.
endtext
:done
endlocal
quit
------------------------------------------------------------------
Ok now for some problems... The order of a true MergeSort is O(n), what
this means can be derived from most texts on progrmming, but ammounts to
the fact that the time this program should take is directly proportional
to the number of elements being worked upon. If a task works on 2
elements one time then 4 elements the next, the time taken for the 4
elemnt task should be exactly twice the time taken for the 2 element
task.
The order of magnatude for the BTM file above is O(n^2) or n Squared.
This is because of the fact that to get a line from a text file in 4dos,
the routine ALLWAYS looks at each and every line prior to that line.
In other words the time taken for those same tasks described above, (2 &
4 element tasks) the 4 element task will take 4 times as long as the 2
element task, and a 16 element task will take 64 times as long. I will
leave any calculations of time taken on something like generating a 2000
line output file to the reader interested in figuring that out. I have
other calculations to do... Like how to feed three people for 5 days on
$2.50, in the US. Solution, borrow heavily... |-(
-Jay
... Go straight to the docs. Do not pass GO. Do not collect $200!
--- FMail 0.92
* Origin: Le Cross Roads 608-788-8086 HST/DS LaCrosse, WI (1:2360/12.0)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/19/1992
To: ALL Num: 164 Date: 12/17/1992
From: MORRIS TURPIN Re: Time: 7:32 pm
Subj: Running DOSMAX/DESQview u Prvt: N Read: N
I have just stumbled onto a trick that increased my DV window size from 601K
to 616K and, since this _is_ the Christmas season, decided to share it with
you <g>. If you are running DOSMAX and DESQview under 4DOS, using "loadbtm
on" in your autoexec.bat file and also loading DV from your autoexec.bat file,
read on.
Before trying DOSMAX, my first DV window was 601K and subsequent windows were
600K in size. Loading DOSMAX increased the first window to 615K with
subsequent windows of 600K. So far not too impressive.
I discovered, however, that if I exited to DOS and then loaded DV, ALL my DV
window sizes increased to 616K. This was consistent and very repeatable. It
took a day or so of head-scratching to figure out why I was losing 15K of
memory. My autoexec.bat file looked like:
loadbtm on
unset cmdline comspec
@c:\utility\hyperdkx.exe xs ui c:1536 s a t:0 or
@c:\qemm\loadhi /r:2 \utility\capslock
@c:\qemm\loadhi /r:2 \bnu.com /l:2=0 /f+ /m-
@c:\qemm\loadhi /r:2 \vfos_ibm.com
@c:\qemm\loadhi /r:2 \utility\ansi.com /b 0
set /r \env
alias /r \alias
...
bunch of other stuff mainly copying files to my ramdisk
...
echo `setdos /a0 /m1 /v0 /i-list^iff %_dv eq 1 then^dvclk14
(continuation from above line) x^dvansi^cls^endiff` > d:\4start.btm
cls
dv
I decided to try adding "loadbtm off" as the line immediately preceeding "dv"
in my autoexec.bat file. Voila! This was sufficient to dump the file from
memory and give me 616K windows right from boot-up.
My autoexec.bat file now ends with:
echo `setdos /a0 /m1 /v0 /i-list^iff %_dv eq 1 then^dvclk14
(continuation from above line) x^dvansi^cls^endiff` > d:\4start.btm
cls
loadbtm off
dv
Changing the last line to "quit^dv" should do the same thing, but I didn't
bother to test it since "loadbtm off" did the trick for me.
Manifest now reports:
DESQview version 2.42
DESQview window number 2
Window memory size 616K
Window max height 25
Window max width 80
Window height 25
Window width 80
Window row 0
Window column 0
Hope this helps some of you.
Merry Christmas
--- msged 2.07
* Origin: Ansi's Escape, Echo Point -- Ottawa, Ontario (1:163/140.3)
(1:163/140.3)
(1:163/140.3)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/19/1992
To: MAYNARD HOGG Num: 171 Date: 12/08/1992
From: JASEN BETTS Re: Time: 8:21 pm
Subj: Standardising Mail Packe Prvt: N Read: N
MH>Why bother? Just get a mail reader that merges QWK packets into a
MH>database. It never ceases to amaze me how otherwise intelligent people
MH>can put up with OLX, which forces you to close the current QWK packet
Yeah, messagebase based readers are great.. They do gobble disk space
though (unless there's one that squeezes it's message base somehow , and
some of them can't purge old mail without generating a new messagebase.
I'm using one, megamail 2.10 (and would be looking for something better
(ie fewer bugs) if I didn't call a bbs that only supports megamail's
proprietry format.
OB-4dos: I use 4dos to enhance the integrity of this program by setting
an envoronment variable which causes mark.com to be run in 4start.btm
and release in 4exit... this allows me to load TSRs in shells without
having to remember to unload them before EXITing, also I've aliased
alt-X to ^xEEXIT^xR which gives me a way to hot-key out of dos shells in
a fashion similar to most of the other software I run.
For a short period a strange software fault caused one BBS to loose it's
ability to handle ZIP format QWK packets and I thus built into my
reader .BTM file routines to convert to/from ARJ format.
Bye.
--- Maximus 2.01wb
* Origin: Mirth Control Chch, NZ 64-3-3890898 v32b/v42b/FAX (3:770/140)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/23/1992
To: REX CONN Num: 89 Date: 12/18/1992
From: HUGO LANDSMAN Re: Time: 12:55 pm
Subj: ansi detection does not w Prvt: N Read: N
Hi Rex,
06 Dec 1992 21:58, Rex Conn (1:109/423) wrote to Bonno Bloksma:
>> 4DOS refuses to recognize the ansi driver.
RC> 4DOS uses the *documented* way ot detecting an ANSI driver: an INT
RC> 2Fh call with AX=1A00h. Unfortunately, a lot of the third-party ANSI
RC> drivers don't properly implement this call, so 4DOS then tries
Of course. That method to detect ANSI didn't exist until DOS 4.0, so 4DOS will
fail to detect all older ANSI drivers (and some newer too, especialy the
smaller/faster ones). The following alias should detect any & all:
HAVEANSI = set y=%_row
if %y=0 echos %@char[10]
echos %@char[27][H
iff %_row=0 then
echo %@char[27][%y;0HANSI driver detected
set ANSI=1
else
echo %@char[13]No ANSI available
set ANSI=0
endiff
unset y
You might want to set the foreground color equal to the background before
emitting the ESC[H.
regards,
hugo
--- FastEcho 1.21a/beta
* Origin: st. anna pbbs - nimwegen nl (2:512/154.5@fidonet.org)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/23/1992
To: ALL Num: 95 Date: 12/20/1992
From: SCOTT WUNSCH Re: Time: 11:52 am
Subj: Files in Directory Prvt: N Read: N
Seasons Greetings, All!
I finally figured out a good way to determine the number of files in a
directory! It seems to me that this had been a big discussion a little while
ago, so I hope this hasn't been done before. Anyhow,
DIRCNT=*DIR/B|ECHO %@LINES[CON]
That will count both files and subdirectories. Add a /A:-D switch to the DIR
command for files only.
/\ LLAP...
> \ cott \\'unsch <
\/
... Taco Bell is _not_ a Mexican phone company!
--- GoldED 2.40
* Origin: Season's Greetings from Regina, Sask, Canada! (1:140/23.1701)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/23/1992
To: DOMINIC STRANGE Num: 88 Date: 12/20/1992
From: MORRIS TURPIN Re: Time: 7:06 pm
Subj: History and Cmdline Prvt: N Read: N
In a message dated Dec 19 at 00:04, Dominic Strange of 2:252/21.22
wrote to All:
DS> Hi All
Hi, Dominic
DS> I've been playing around trying to get and up to the moment History
DS> copied from one DV window to another.
DS> Unfortunatly this is only updated as I exit one window. What I
DS> would really like is to put something like this in my prompt
DS> %@exec[echo %cmdline>>c:\4dos\hist.lst]
DS> so that my hist.lst file is updated after each commnad is
DS> completed.
DS> This however will only work for external commands whereas I would
DS> like to be able to put both internals and aliases in history.
DS> Anyone got any bright ideas???
Yes. I used to do this, but haven't bothered since I started using DV. You
need three things. First, your prompt must be:
prompt %@exec[readhist]$h...rest of your prompt here...
Second, READHIST is an alias (all on one line, of course):
READHIST=iff exist c:\hist.lst then^history /f^history /r c:\hist.lst^del
c:\hist.lst >& nul
and third, your 4EXIT.BTM (or .bat) file:
4exit.btm
---------
history >> c:\4dos\hist.lst
That's all there is to it. Good luck.
--- msged 2.07
* Origin: Ansi's Escape, Echo Point -- Ottawa, Ontario (1:163/140.3)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/23/1992
To: ALL Num: 92 Date: 12/20/1992
From: JAN NOLAN Re: Time: 4:42 pm
Subj: Lil' Calendar That Could Prvt: N Read: N
I found it unusual and a bit confusing that all the calendars I saw
presented here used for the left most day, the day that happens to be
the 1st day of the month. I prefer the usual "Su Mo Tu We Th Fr Sa"
order.
This btm also gives the time OR lets you pick any month/year to view
:-) run it with the "/?" option for help
*** CHANGE the "set d=...." line to be <one long line> !!
It is shown here as split into two lines.
*** The 6 spacing lines that seem to contain only "echo" actually end
with an invisible phantom space. (ie. "echo", then a normal space,
then a phantom space) A phantom space is made by holding down the
Alt key and tapping 255 on the numeric keypad.
---------------CAL.BTM follows this line------------------
#echo off
if %#substr[%1,0,2]#=/?@ goto help_txt
setlocal
set d= 1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
echo
echo
set bak=%_date
keystack 13
iff %1* = * then
iff %@substr[%_time,0,2] GT 12 then
set tim=%#EVAL[%#substr[%_time,0,2] -12]%@substr[%_time,2,3]pm
else
set tim=%@substr[%_time,0,5]am
endiff
date | echo %#substr["%@Line[con,0]",1,17]
echo
echo %tim
date %#substr[%_date,0,2]/01/%@substr[%_date,6,2]
elseiff %2* = * then
date %1/01/%@substr[%_date,6,2]
date | echo %#substr["%#Line[con,0]",5,4] 19%@substr[%bak,6,2]
else
date %1/01/%2
date | echo %#substr["%#Line[con,0]",5,4] 19%@substr[%_date,6,2]
endiff
set day=%_dow
iff %day = Sat then
set g=0
elseiff %day = Fri then
set g=1
elseiff %day = Thu then
set g=2
elseiff %day = Wed then
set g=3
elseiff %day = Tue then
set g=4
elseiff %day = Mon then
set g=5
else
set g=6
endiff
echo
echo
set m=%@substr[%_date,0,2]
if %m = 02 (gosub FEB^GOTO ONWARD)
if %m=4 .OR. %m=6 .OR. %m=9 .OR. %m=11 (set d=%d 29 30^GOTO ONWARD)
set d=%d 29 30 31
:ONWARD
echo Su Mo Tu We Th Fr Sa
set c=%@eval[(%g*4)]
echo %#substr[%d,%c,28]
set c=%#eval[(%c+28)]
:
echo %#substr[%d,%c,27]
set c=%#eval[(%c+28)]
:
echo %#substr[%d,%c,27]
set c=%#eval[(%c+28)]
:
echo %#substr[%d,%c,27]
set c=%#eval[(%c+28)]
:
echo %#substr[%d,%c,27]
set c=%#eval[(%c+28)]
IF %c LT %#LEN[%d] echo %@substr[%d,%c,27]
date %bak
echo
endlocal
quit
:help_txt
text
Format: CAL [mm [yy]]
default's to calendar of current month
[mm] cal of month in current year Ex: "cal 12"
[mm yy] cal of month and year Ex: "cal 12 91"
endtext
quit
:FEB
set year=%#eval[1900+%#substr[%_date,6,2]]
if %#eval[%year %%4] = 0 if %@eval[%year %%100] NE 0 (set d=%d 29^RETURN)
if %@eval[%year %%400] = 0 set d=%d 29
RETURN
--- FidoPCB v1.3 [ff025/x]
* Origin: XON/XOFF Information Service - Montreal - USENET! (1:167/159)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 12/28/1992
To: ALL Num: 27 Date: 12/21/1992
From: JOHN THOMPSON Re: Time: 9:23 pm
Subj: @select Questions Prvt: N Read: N
Inspired by the "SELECT-like" convenience of the shareware utilities
4ZIP/4UNZIP, I set out to hone my novice batch file programing skills by
writing a batch file to allow this with other archive types.
By using the 4DOS executable extensions to point to the batch file ("set
.lzh=c:\bat\4arcs", etc.) and reading a temporary file containing the
archive directory into the "@select" variable function I was able to make a
functional utility for this purpose, although it lacks some of the polish
and features of 4ZIP/4UNZIP. Specifically, it does not support file
descriptions in the archive, but I guess I can live without that.
I do have a couple other questions/concerns:
1. @select does not appear to support passing multiple arguments to the
command; therefore I find it necessary to do one file at a time with
this. I would be happy to be shown that there is a better way :-).
2. @select does not appear to trap for "control-c;" therefore one must be
imaginative when you decide not to extract any files. I have found
that placing the cursor bar on a spurious line will often serve the
purpose. One again, hints to a better way would be appreciated.
3. There are an awful lot of "gosubs" and redundancy in the code; I'm no
expert at this, and that is just the way I finally got it to work!
Maybe some of you code-experts can give it a "going-over" I can learn from;
the rest of you may find it interesting at least.
What follows is the batch file (indented lines continue from previous line):
@echo off
break on
if "%@ext[%1]" == "lzh" gosub lha
if "%@ext[%1]" == "arj" gosub arj
if "%@ext[%1]" == "sqz" gosub sqz
if "%@ext[%1]" == "arc" gosub arc
if "%@ext[%1]" == "pak" gosub pak
:lha
d:\arcs\lha l %1>d:\temp\temp.lst
d:\arcs\lha e %1 %@word[0,%@select[d:\temp\temp.lst,0,0,24,79,Press ESC...
...to unpack all files]]
goto end
:arj
d:\arcs\arj l %1>d:\temp\temp.lst
d:\arcs\arj e %1 %@word[0,%@select[d:\temp\temp.lst,0,0,24,79,Press ESC...
...to unpack all files]]
goto end
:sqz
d:\arcs\sqz l %1>d:\temp\temp.lst
d:\arcs\sqz e %1 %@word[0,%@select[d:\temp\temp.lst,0,0,24,79,Press ESC...
...to unpack all files]]
goto end
:arc
d:\arcs\pkxarc -v %1>d:\temp\temp.lst
d:\arcs\pkxarc -x %1 %@word[0,%@select[d:\temp\temp.lst,0,0,24,79,Press...
...ESC to unpack all files]]
goto end
:pak
d:\arcs\pak l %1>d:\temp\temp.lst
d:\arcs\pak e %1 %@word[0,%@select[d:\temp\temp.lst,0,0,24,79,Press ESC...
...to unpack all files]]
goto end
:end
inkey Another file? Y/N: %%4yn
if "%4yn"=="Y".or."y" return
del d:\temp\temp.lst /q^unset 4yn
* KingQWK 1.05 # 39 * Tighten 'til it cracks, then back off 1/2 turn.
--- SuperQWK 1.17 Beta-2 (Reg)
* Origin: APPLEGATE; "You got the right one baby, UH HUH!" (1:139/631)
------------------------------------------------------------------------
Echo Flag : Permanent: N Export: N Personal Read: N
BBS: ESCMAIL Conference: 4dos Imported: 1/02/1993
To: JOHN THOMPSON Num: 69 Date: 12/26/1992
From: TONY DUNLAP Re: Time: 10:39 pm
Subj: @select Questions Prvt: N Read: N
> 1. @select does not appear to support passing multiple arguments to the
> command; therefore I find it necessary to do one file at a time with
> this. I would be happy to be shown that there is a better way :-).
Me too! I'd also like a timeout on @select.
> 2. @select does not appear to trap for "control-c;" therefore one must be
> imaginative when you decide not to extract any files. I have found
> that placing the cursor bar on a spurious line will often serve the
> purpose. One again, hints to a better way would be appreciated.
> if "%@ext[%1]" == "lzh" gosub lha
> if "%@ext[%1]" == "arj" gosub arj
> if "%@ext[%1]" == "sqz" gosub sqz
> if "%@ext[%1]" == "arc" gosub arc
> if "%@ext[%1]" == "pak" gosub pak
Instead of having a separate gosub for each extension, try this:
if "%@ext[%1]" == "lzh" set oper=lha e
if "%@ext[%1]" == "arj" set oper=arj e
if "%@ext[%1]" == "sqz" set oper=sqz e
if "%@ext[%1]" == "arc" set oper=pkxarc -x
if "%@ext[%1]" == "pak" set oper=pak e
Then you'll only need one unarc line:
%oper% %1
which, if the extension were pak, would expand to:
pak e %1
> d:\arcs\lha e %1 %@word[0,%@select[d:\temp\temp.lst,0,
> 0,24,79,Press ESC...
> ...to unpack all files]]
If you have disk space to spare, you might consider unarcing the whole archive
to a temporary directory then "select move (*.*) /r" the files you want to the
directory you want then deleting the rest.
Later
--- GEcho 1.00
* Origin: DISCOVER (1:2220/30.1)